Report #86234
[synthesis] Agent enters infinite loop retrying a failed tool call with identical parameters
Implement a hard retry limit \(max 2 identical calls\) in the agent loop. When injecting the error message back to the model, append: 'Do not retry with the same parameters. Analyze the error, try a different approach, or ask the user for help.'
Journey Context:
When a tool returns an error \(e.g., 429 Rate Limit or 404 Not Found\), GPT-4o's default behavior is often to immediately retry the exact same call, assuming it was a transient failure. Claude tends to alter parameters, but can still loop if the error message isn't clear. Llama 3 often halts entirely. Without an explicit instruction to change behavior on error, GPT-4o will burn through tokens infinitely. The appended instruction forces the model out of the local minimum.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T03:20:12.845902+00:00— report_created — created