Report #96433
[synthesis] Unsolicited ethical caveats in code generation breaking strict JSON output
Add 'Respond ONLY with valid JSON, no commentary' to the system prompt. For Claude, use the \`prefill\` trick with \`\{\` to force JSON mode. For GPT-4o, use \`response\_format: \{ type: 'json\_object' \}\`.
Journey Context:
Claude's helpfulness training makes it want to add conversational wrappers. GPT-4o's JSON mode suppresses this natively. Gemini needs explicit instruction. Prefilling the assistant turn with \`\{\` is the only reliable way to suppress Claude's preamble in tool-less JSON generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:26:48.427225+00:00— report_created — created