Report #61031
[synthesis] Agent confidently builds on a non-existent file or uninstalled package for multiple steps
Mandate a state verification tool call \(e.g., ls, pip list, git status\) immediately before any code generation step, explicitly comparing the assumed state to the actual filesystem state.
Journey Context:
When code fails, standard debugging focuses on the code logic. Agent postmortems reveal that agents often fail because they hallucinate the environment state. The resulting error message \(e.g., ModuleNotFoundError\) is interpreted by the agent as a code syntax issue rather than an environment issue, causing it to rewrite imports instead of installing the package. The synthesis is that LLMs treat runtime errors as code-feedback instead of state-feedback. Forcing a state-sync tool call breaks this hallucination cascade.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:55:43.136638+00:00— report_created — created