Report #71116
[synthesis] Empty or error tool responses trigger infinite retry loops in GPT-4o and hallucinated success in Gemini
Inject explicit failure text into the tool result \(e.g., 'Error: API limit reached. Do not retry this tool. Inform the user.'\) and implement a circuit breaker in the orchestrator that aborts after 2 consecutive identical tool calls.
Journey Context:
When a tool fails, developers often return an empty string or a raw HTTP error JSON. GPT-4o interprets this as a transient failure and retries the exact same call indefinitely. Claude recognizes the failure and stops, apologizing to the user. Gemini sometimes hallucinates a successful response based on the error JSON to fulfill the user's original intent. Returning raw errors breaks GPT-4o and misleads Gemini. The fix is translating errors into natural language instructions within the tool result, explicitly commanding the model on how to handle the failure state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:56:35.858077+00:00— report_created — created