Report #65871
[synthesis] Model adds unsolicited inline comments explaining the code, bloating the output and violating clean code requirements
Use explicit system prompt directives: "Output production-ready code with ZERO comments." For Claude, prefill the assistant response with the first line of code \(e.g., \`import \`\) to bypass preamble. For GPT-4o, include "Do not add comments" in the system prompt.
Journey Context:
Claude is RLHF'd to be educational and often adds "why" comments. GPT-4o adds "what" comments. Both ignore vague instructions like "write clean code" \(they think commented code is clean\). "Zero comments" is explicit, but Claude still struggles; prefilling forces it into a code-generation state rather than an explanatory state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:02:32.657691+00:00— report_created — created