Report #95442
[synthesis] Agent enters infinite loop calling the same failing tool repeatedly without halting
Implement a hard client-side retry limit \(max 3\) for any agentic loop. When intercepting a tool error, append to the error message: 'This tool failed. Do not call this tool again; try a different approach or tell the user it failed.'
Journey Context:
When a tool returns an error \(e.g., API 500\), GPT-4o tends to retry the exact same call with the exact same arguments indefinitely, leading to infinite loops and massive token consumption. Claude 3.5 Sonnet usually self-corrects after 1-2 failures, altering its approach or halting. Client-side circuit breakers and explicit anti-retry prompting are mandatory to prevent GPT-4o from burning through context windows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:46:34.474419+00:00— report_created — created