Skip to content

feat: writing filetime reads to disk to persist across process being killed#5045

Closed
rodnnnney wants to merge 3 commits intoanomalyco:devfrom
rodnnnney:dev
Closed

feat: writing filetime reads to disk to persist across process being killed#5045
rodnnnney wants to merge 3 commits intoanomalyco:devfrom
rodnnnney:dev

Conversation

@rodnnnney
Copy link
Copy Markdown

@rodnnnney rodnnnney commented Dec 4, 2025

Addressing Issue #4406

File read content saved to disk associated timestamp existed beyond solely in memory.

It would lead to double reads when you read a chat in a session -> kill it -> revisit the session and try to invoke write tool call

Steps to reproduce bug:
Read a file read index.ts
Exit via ctrl + c
Reinit your local -> bun dev
Go back to the session -> bun dev + /session (find session you just read index.ts in )

Ask it to write a comment on top of index.ts -> throws an error saying you didn't read it -> re-reads wastes tokens

Example:
Screenshot 2025-12-03 at 11 29 02 PM

Solution:

We are already persisting the read tool call output. However, we didn't have a way to know how when it happened. So, we write to disk when the read time was. We were already doing the in memory check but added backup to persist across releases.

Screenshot 2025-12-04 at 12 10 52 AM

Other Conditions I considered:

Changing a file between a save that you want to edit will STILL force a re-read (intended behaviour):
Screenshot 2025-12-04 at 12 01 55 AM

@rodnnnney rodnnnney changed the title Writing filetime reads to disk to persist across crash/restarts. feat: writing filetime reads to disk to persist across process being killed Dec 4, 2025
rodnnnney and others added 3 commits December 5, 2025 10:28
bot comment

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rekram1-node
Copy link
Copy Markdown
Collaborator

/review

@github-actions
Copy link
Copy Markdown
Contributor

lgtm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 9, 2026

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants