Report #31111
[agent\_craft] Infinite retry loops on tool errors cause agent hallucination of fake fixes
Hard-limit tool error retries to exactly one attempt with modified arguments; on second failure, halt and report to user rather than auto-retrying.
Journey Context:
When a tool call fails \(e.g., file not found or syntax error\), agents often enter a 'panic loop' where they hallucinate increasingly incorrect parameter mutations trying to 'fix' the issue without understanding the root cause. This is a form of sunk-cost fallacy in the context window. Limiting to one retry forces the model to either succeed with a minor correction or escalate, preventing the drift into hallucinated solutions that consume tokens and corrupt the session state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:36:31.161422+00:00— report_created — created