You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Read rows of an overwritten image all show its latest contents, losing what each read saw #41918
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web, apps/server
Summary
Since #29741 (e0f69e9), every Read row of an image path shows the file's current contents. That fixed #13138 and #15676, where a new read showed a stale picture. But it also changes the rows of earlier reads: when an agent reads the same screenshot path repeatedly, the whole thread's history shows the last picture, and the record of what the agent saw at each step is lost.
Steps to reproduce
Ask an agent: "Write a red 100x100 PNG to /tmp/x.png and read it. Overwrite it green and read it. Overwrite it blue and read it."
Expand the three Read rows.
Expected behavior
The rows show red, green, blue: each Read shows the image as it was read, which is what the model received. A new Read of the path shows the new picture (as #13138 asked).
Actual behavior
All three rows show blue.
Real case: an agent drives a VM's GUI and reads the same screenshot file after each step. Its messages describe a password prompt, then a settings page, then an app window, but every Read row in the thread shows the final app window. The thread is no longer a usable record of the run.
Since fix(server): stop storing tool image bytes no client reads #16652 the server strips Read result bytes (stripUnservedToolOutputImageBytes) because the row reloads from viewedImagePath. A fix needs per-read identity: keep the bytes (or a content hash) per row, or snapshot the file at read time and serve that.
I am looking into this — reproducing the red/green/blue read sequence first, then working on a per-read snapshot (or content hash) so each Read row keeps what it saw at read time, and I will open a PR with the fix and a regression test.
Screenshot of the repro on 0.1.11: the agent wrote a red PNG and read it, overwrote the same path with green and read it, then with blue and read it. The model received red, green and blue (its messages say so), but all three expanded Read rows show blue.
Activity
four1er commentedon Nov 24, 2026
I am looking into this — reproducing the red/green/blue read sequence first, then working on a per-read snapshot (or content hash) so each Read row keeps what it saw at read time, and I will open a PR with the fix and a regression test.
inj-src commentedon Nov 24, 2026
Screenshot of the repro on 0.1.11: the agent wrote a red PNG and read it, overwrote the same path with green and read it, then with blue and read it. The model received red, green and blue (its messages say so), but all three expanded Read rows show blue.