Skip to content

fix(channels): preserve filesystem path references in deferred image history#8167

Open
yuxuan-7814 wants to merge 4 commits into
zeroclaw-labs:masterfrom
yuxuan-7814:fix/issue-8151-deferred-image-reference
Open

fix(channels): preserve filesystem path references in deferred image history#8167
yuxuan-7814 wants to merge 4 commits into
zeroclaw-labs:masterfrom
yuxuan-7814:fix/issue-8151-deferred-image-reference

Conversation

@yuxuan-7814

Copy link
Copy Markdown

The channel_history_content_for_user_turn function was stripping all [IMAGE:...] markers from historical turns, including filesystem path references. This caused deferred image attachments to lose their re-loadable reference, making the bot deny seeing images on later turns.

This fix:

  • Only strips inline base64 data URIs (too large for history)
  • Keeps filesystem paths and URLs intact for re-loading
  • Changes the placeholder text to indicate re-loading availability

Fixes #8151

…history

The channel_history_content_for_user_turn function was stripping all
[IMAGE:...] markers from historical turns, including filesystem path
references. This caused deferred image attachments to lose their
re-loadable reference, making the bot deny seeing images on later turns.

This fix:
- Only strips inline base64 data URIs (too large for history)
- Keeps filesystem paths and URLs intact for re-loading
- Changes the placeholder text to indicate re-loading availability

Fixes zeroclaw-labs#8151
@github-actions github-actions Bot added the channel Auto scope: src/channels/** changed. label Jun 22, 2026
@Audacity88 Audacity88 added bug Something isn't working provider Auto scope: src/providers/** changed. labels Jun 22, 2026
@Audacity88 Audacity88 added this to the v0.8.2 milestone Jun 22, 2026
@Audacity88 Audacity88 added runtime Auto scope: src/runtime/** changed. channel:matrix Auto module: channel/matrix changed. risk: high Auto risk: security/runtime/gateway/tools/workflows. size: S Auto size: 81-250 non-doc changed lines. labels Jun 22, 2026
…_user_turn

- Fix duplicate variable declaration (result was declared twice)
- Keep the original placeholder text for test compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot removed provider Auto scope: src/providers/** changed. runtime Auto scope: src/runtime/** changed. channel:matrix Auto module: channel/matrix changed. labels Jun 23, 2026
yuxuan-7814 and others added 2 commits June 23, 2026 19:36
…ent_for_user_turn

- Prefix unused `cleaned` variable with underscore to silence clippy warning
- Keep the original placeholder text for test compatibility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working channel Auto scope: src/channels/** changed. risk: high Auto risk: security/runtime/gateway/tools/workflows. size: S Auto size: 81-250 non-doc changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: deferred image attachment loses its re-loadable reference in cached history; bot later denies seeing it

2 participants