Report #50694
[synthesis] Agent enters an infinite loop retrying a failed tool call with the exact same arguments
Append a highly visible error message like "\[ERROR\] API returned 500. Do not retry this call. Inform the user." to the tool result, and implement a hard retry limit in the agent loop.
Journey Context:
When a tool returns an error \(e.g., HTTP 500, rate limit\), GPT-4o has a strong tendency to immediately retry the exact same call, assuming transient failure, leading to infinite loops. Claude is more likely to stop and inform the user or try a different approach. Gemini often gives up entirely. The cross-model safe pattern is to explicitly tell the model \*not\* to retry in the error message and enforce a circuit breaker at the framework level.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:34:34.994394+00:00— report_created — created