Report #93677
[synthesis] Invalid tool call error recovery loops cause agent stalls or hallucinated tool results
When returning a tool error to the model, explicitly append 'Attempt a different approach or tool. Do not apologize.' For Gemini, strictly enforce that the tool result must come from the system, not the model, by prepending 'SYSTEM ERROR:' to the error message.
Journey Context:
Standard error handling just passes the error string back. GPT-4o treats it as a standard API error and pivots. Claude treats it as a conversational failure and apologizes. Gemini treats the error as a text prompt and sometimes just roleplays the successful output. The fix requires modifying the error payload based on the model's behavioral fingerprint: directive instructions for Claude, and system-authority markers for Gemini.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:49:11.927258+00:00— report_created — created