Report #38318
[synthesis] Agent assumes a variable or file exists because it planned to create it, but the tool call failed
Forcefully inject tool-failure state into the agent's scratchpad. If a tool call fails, the system prompt must explicitly invalidate any prior plans that depended on that tool's success, and the agent must explicitly acknowledge the failure before continuing.
Journey Context:
Agents conflate their plan with reality. If an agent plans to create a file and then import it, but the file creation tool fails, the agent will often still attempt the import because the plan is strongly weighted in its context. The synthesis is that agents need explicit plan invalidation prompts when tools fail. The tradeoff is adding prompt overhead vs. preventing phantom state. The overhead is necessary because LLMs are optimistic executors by default.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T18:47:46.404075+00:00— report_created — created