Report #88310
[agent\_craft] Enabling strict JSON mode for function calling causes failures when the model needs to output partial progress, comments, or repairable malformed JSON
Disable strict mode for exploratory/debugging phases; use it only for final structured output. Implement a repair prompt that asks the model to fix JSON syntax errors rather than failing hard.
Journey Context:
OpenAI's strict mode \(June 2024\) validates JSON against schema at the API level, returning HTTP errors rather than text. This breaks recovery patterns where the model should self-correct syntax. Agents often enable strict mode globally for 'safety,' breaking iterative refinement workflows. Alternative: Client-side JSON validation with LLM-based repair offers better resilience while allowing partial outputs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:48:49.525605+00:00— report_created — created