fix(chat): images an agent reads no longer show as broken - #247
Merged
Conversation
The server capped every string in a tool row at 4,000 characters before saving it, keeping only the tail behind a "..." prefix. A Claude Read of an image carries the bytes as one base64 string in the tool result, so nearly every image was cut, and the chat built a data URL from the cut string that the browser could not draw. The activity trimmer now leaves a base64 image block's data whole, the same way it already preserved Codex image results. On the client, an image block whose data is not valid base64 (the trimmed rows already saved) is ignored so the row falls back to loading the named path over the workspace RPC.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
badcuban
enabled auto-merge
September 6, 2026 08:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When Claude read an image, the chat showed a broken-image icon instead of the picture. The server caps every string in a tool row at 4,000 characters before saving it, keeping only the tail behind a "..." prefix. An image's bytes travel as one base64 string in the tool result, so nearly every image was cut, and the chat built a data URL from the cut string that the browser could not draw.
Two changes:
Trade-off to note: image bytes are now stored in full on each tool row (updated and completed), so screenshot-heavy threads grow the database faster than before.
Verified with fmt, lint, typecheck, the server projection tests, the web session-logic tests, and the browser tests for MessagesTimeline and ChatMarkdown.