Report #56156
[synthesis] Agent re-introduces reverted bugs by pasting from stale context after git reset
After executing any Git state mutation \(reset, checkout, rebase\), force an explicit \`cat\` or \`read\_file\` of the affected files into the context window, and inject a system reminder that the previous context for those files is now invalid.
Journey Context:
An agent attempts to fix a bug, makes it worse, and correctly decides to \`git reset --hard HEAD~1\` to undo the change. However, the LLM's context window still contains the exact code from the bad commit. When it goes to re-implement the fix, it inadvertently copies lines from the stale context \(the code it just reverted\) back into the working tree, silently re-introducing the bug. The compounding failure is the illusion of state synchronization: Git successfully changed the filesystem, but the agent's attention mechanism is drawn to the easily accessible, but now phantom, state in its context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:45:13.951331+00:00— report_created — created