Report #76863
[synthesis] Model loops infinitely calling the same tool with the same arguments on failure
For GPT-4o, append the tool error message to the user turn and suggest an alternative approach. For Claude, modify the tool schema slightly \(e.g., add an \`attempt\_number\` parameter\) to break the exact token match loop. For Gemini, return an error with a high penalty signal \('CRITICAL ERROR: STOP USING THIS TOOL'\) as it responds strongly to imperative error framing.
Journey Context:
When a tool call fails \(e.g., API down\), models react differently to the error message. GPT-4o tends to retry the exact same call hoping for a different result \(definition of insanity\). Claude also retries, but if the error message is identical, it enters a deterministic loop. Gemini sometimes switches tools, but if only one tool is available, it loops. Simply returning 'Error' is insufficient. Modifying the error message to include a unique timestamp or attempt counter breaks the deterministic loop for Claude, while explicit instruction to change strategy works best for GPT-4o.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:36:28.737056+00:00— report_created — created