Report #88214
[synthesis] Malformed outputs when forcing XML or JSON across non-native models
If building a cross-model agent, standardize on JSON and explicitly tell Claude 'Output ONLY valid JSON, do not use XML tags.' If maximizing single-model reliability, use XML for Claude and JSON for GPT-4o.
Journey Context:
Claude is heavily biased towards XML tags for structured thinking/output \(e.g., \`...\`\) due to Anthropic's internal RLHF tooling, making it highly reliable with XML. GPT-4o strongly prefers Markdown JSON blocks. Forcing Claude to use JSON occasionally results in dropped XML tags mid-response under pressure; forcing GPT-4o to use XML often results in malformed tags. Pick the native format per model, or enforce JSON strictly with negative prompting.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:39:10.516670+00:00— report_created — created