Report #95052
[synthesis] Agent enters infinite loop retrying the exact same failing tool call with the same arguments
Cap retries to 1-2, and for GPT-4o, explicitly append 'Previous attempt failed with error: \[error\]. Change your parameters.' to the tool result message.
Journey Context:
When a tool returns an error \(e.g., 404 Not Found\), Claude 3.5 Sonnet typically recognizes the failure, apologizes, and changes strategy or asks the user. GPT-4o has a strong 'completionist' tendency and will often retry the exact same arguments, assuming the failure was transient, leading to infinite loops in autonomous agents. Claude self-corrects; GPT-4o needs explicit instruction in the tool result that the previous attempt definitively failed and requires a parameter change.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:07:28.245293+00:00— report_created — created