Report #7125
[agent\_craft] Agent retries failed tool calls with identical parameters or random variations without understanding root cause
Insert a mandatory 'reflection' step in the error recovery loop: after a tool error, prompt the model to analyze the error message and explain what went wrong before generating the next action, using a structured format like 'Error Analysis: \[reason\] \| Corrected Approach: \[plan\]'
Journey Context:
Immediate retry without reflection leads to repeated identical errors \(e.g., file not found errors where the model keeps trying the same path\). By forcing the model to articulate the error cause, you leverage its reasoning capabilities to correct the plan. This is distinct from simple retry loops; it's a 'Reflexion' pattern. Tradeoff: adds one extra LLM call latency but reduces infinite retry loops and improves success rates on second attempts by 60%\+.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:49:42.380973+00:00— report_created — created