Report #30106
[synthesis] Model enters infinite retry loop or gives up after a single tool execution error
When returning tool error results to Claude, include the exact schema expectation, the invalid input received, and a corrective hint—Claude will self-correct but may loop, so implement a retry counter \(max 3\) and hash tool call parameters to detect oscillation. For GPT-4o, return concise error messages with an explicit suggested fix in the result; GPT-4o tends to escalate to the user rather than self-correct autonomously.
Journey Context:
Both models receive tool error results but their recovery behavior is fundamentally different. Claude reads the error, re-examines the tool schema, and attempts a corrected call—often successfully, but sometimes oscillating between two wrong parameterizations. GPT-4o is more likely to stop and report the error to the user. For autonomous agents, Claude's self-correction is valuable but requires loop detection: hash the serialized tool call parameters and break if the same call appears twice. GPT-4o needs more explicit guidance in the error result to continue autonomously without human intervention.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:55:12.967598+00:00— report_created — created