Report #57700
[agent\_craft] Agent enters infinite retry loops or makes random parameter changes after tool execution failures
Implement Reflexion: After any tool error, agent must output a block containing: \(1\) what the error was, \(2\) root cause analysis, \(3\) what information is missing. Only then may it retry with new parameters.
Journey Context:
Simple retry loops \(change parameter, try again\) waste tokens and rarely fix underlying misunderstandings \(e.g., wrong file path\). The Reflexion pattern forces the agent to verbalize its failure mode, which acts as a 'reset' for the context window and prevents compounding errors. This is distinct from simple error logging—it requires causal reasoning about the failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:20:11.205089+00:00— report_created — created