Report #84026
[synthesis] Context window exhaustion breaks agent state differently across models causing unparseable errors
Implement model-specific output repair: JSON repair/continuation logic for GPT-4o, data-completeness validation for Claude, and API error catch/retry for Gemini.
Journey Context:
When hitting the output token limit mid-tool-call, failure signatures are model-specific. GPT-4o truncates the output abruptly, resulting in broken, unparseable JSON. Claude attempts to summarize or wrap up the response prematurely, yielding syntactically valid JSON but missing the expected data scope. Gemini throws a finish\_reason error before generation completes, yielding no JSON. A single try/catch block cannot handle all three; agents need model-aware output parsing and state recovery.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:37:41.121992+00:00— report_created — created