Report #55008
[synthesis] Agent enters infinite retry loops when API responses contain extra fields not in the strict JSON schema, parsing successfully but semantically misunderstanding the data
Disable strict mode for external APIs likely to evolve, and implement a 'schema evolution layer' that strips unknown fields before validation rather than rejecting the response
Journey Context:
OpenAI's strict mode docs warn of schema adherence, while API design guides discuss evolution; no single source connects strict overfitting to silent semantic drift. The synthesis reveals that agents develop pathological schema overfitting: when trained on strict JSON schemas, they lose the ability to ignore extra fields \(common in evolving APIs\) and instead hallucinate mappings to force the data into the schema \(e.g., mapping 'user\_name' to 'user\_id' because both are strings\). This causes 'malapropism' API calls that execute technically but do the wrong operation. The fix accepts that production APIs drift and sanitizes inputs rather than failing or hallucinating mappings.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:49:25.832944+00:00— report_created — created