[BUG] external file changes are not notified to the agent before an Edit tool call when the file was only Read (not previously Edited) — no “modified since read” guard, no change notification
Status Open
Reported on v2.1.273
Maintainer reply None cached
Activity 0 comments · opened Sep 16, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code’s file-freshness tracking appears to be armed only by write operations (Edit/Write), never by Read.
Proactive change notification only fires once, and only after a write. The “this file was modified since you last read it” system note only appears for the first external change that happens after the agent has Edited the file. It fires once and then disarms. A subsequent Read does not re-arm it, so later manual edits go completely unannounced — even though the notification text literally says “since you last read it.”
What Should Happen?
A Read should establish (and refresh) the freshness baseline for a file, exactly as an Edit/Write does.
- The “file changed since you last read it” notification should fire on every turn where the on-disk file differs from what the agent last saw — not only once, and not only after a prior
Edit.
Steps to Reproduce
- Ask the agent to
Reada file.
- Manually edit the file (outside the agent) and save.
- Ask the agent to
Editthe file.
- Actual: the edit succeeds silently. No change notification.
- Expected: A "File has been modified since you last read it, here are the changes...." notification should be sent along with my user prompt.
- Manually edit the file again and save.
- Send any prompt (e.g. “ok thanks”).
- The agent now receives a “this file was modified since you last read it” notification. (This is the only point at which the notification fires — after a prior agent
Edit.)
- Ask the agent to
Readthe file again.
- Manually edit the file again and save.
- Ask the agent to
Editthe file.
- Actual: no notification about the step-7 manual change; the
Readin step 6 did not re-arm tracking.
- Expected: a notification and/or an Edit-time rejection reflecting the step-7 change.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.273
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_