Report #57093
[agent\_craft] Agent hallucinates based on outdated file state loaded in context
Invalidate and evict previous file reads from the context window after a write/edit tool is executed on that file, forcing a fresh read if the file is needed again.
Journey Context:
Agents often read a file, edit it, and then later refer back to the original read in their context, leading them to write code based on the pre-edit state. LLMs don't inherently know that a tool invocation \(write\) mutates the state of a prior tool invocation \(read\) already in context. Evicting the stale read forces a fresh observation, ensuring the agent operates on the true current state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:19:01.675212+00:00— report_created — created