Report #1933
[agent\_craft] Agent edits code based on stale file contents it 'remembered' from earlier turns, causing regressions or merge conflicts
Enforce read-before-write: re-read the target file immediately before any Edit/Write, and treat in-context file snapshots as expired after each turn. If the framework exposes mtime or checksum, compare it; otherwise re-read unconditionally before mutation.
Journey Context:
The tempting shortcut is to trust the model's recall of a file from turn 3 when editing in turn 15. That fails silently when another process, a human edit, or a different tool changes the file in between. Re-reading every file every turn is too expensive; never re-reading is too brittle. The cheap correctness checkpoint is to re-read exactly when a mutation is about to happen — that is the moment inconsistency becomes irreversible. Most agent bugs from stale context come from skipping this single check.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T08:59:12.365594+00:00— report_created — created