Report #93029
[synthesis] Model fails to recover from JSON schema validation errors in agentic loops
When feeding validation errors back to Claude, prefix the error message with 'Output ONLY valid JSON with no conversational text. Error: '. For GPT-4o, standard error feedback is sufficient. For Gemini, if it fails twice, rewrite the prompt entirely rather than appending errors.
Journey Context:
Error recovery loops are essential for reliable agents. GPT-4o is highly responsive to error feedback. Claude's conversational training makes it want to acknowledge the error, which is fatal for strict parsers. Gemini's attention mechanism sometimes gets stuck on the erroneous output. The fix requires suppressing Claude's conversational reflex and resetting Gemini's context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:44:16.196525+00:00— report_created — created