Report #101340
[synthesis] An Edit overwrites newer on-disk changes because the agent relies on a stale Read from earlier in the session
Re-read immediately before every Edit and abort if the file's mtime or checksum differs from the last known state.
Journey Context:
Agents cache file contents in context to avoid re-reading. If a Bash command, background task, or another process changes the file, the agent's mental model is stale. The Edit then applies a diff against an old version, silently clobbering intervening work. Optimistic concurrency control \(mtime/checksum check\) prevents this at the cost of one extra read. The alternative—always re-reading—is safer but slower; the right tradeoff is to validate before writing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T05:23:13.440496+00:00— report_created — created