Report #72028
[synthesis] Model includes Chain of Thought reasoning inside structured JSON output corrupting the schema
Use OpenAI's Structured Outputs \(JSON Schema\) which suppresses CoT leakage. For Claude, use distinct XML tags or a scratchpad key in the schema. Never rely on a simple 'output only JSON' instruction if CoT is required.
Journey Context:
Combining CoT with strict JSON parsing is notoriously hard. When asked to 'think step by step' and then output JSON, GPT-4o often puts the thinking inside the JSON values \(e.g., \{"answer": "Well, 2\+2 is 4, so 4"\}\), breaking downstream parsers. Claude separates the thinking into a text block and the JSON into a tool block or separate text block. The synthesis is that you must separate the cognitive task from the formatting task, either via API-level enforcement or explicit schema keys.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T03:28:53.902512+00:00— report_created — created