[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

  1. Ask the agent to ‎Read a file.
  1. Manually edit the file (outside the agent) and save.
  1. Ask the agent to ‎Edit the 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.
  1. Manually edit the file again and save.
  1. 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.)
  1. Ask the agent to ‎Read the file again.
  1. Manually edit the file again and save.
  1. Ask the agent to ‎Edit the file.
  • Actual: no notification about the step-7 manual change; the ‎Read in 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_

View original on GitHub ↗