Report #77563
[synthesis] Unsolicited safety caveats breaking code parsing
Add 'Return ONLY the code. No explanations, no comments, no caveats.' to the system prompt. For Claude, additionally add 'Do not add security warning comments inside the code'.
Journey Context:
Claude 3.5 Sonnet is trained to be 'helpful and harmless', which manifests as adding '\# WARNING: ...' or '\# Note: ...' comments inside generated code, or appending text after code blocks. GPT-4o is more literal and usually stops at the code. These unsolicited comments break AST parsers or execute as syntax errors in strict environments \(like shell scripts without comment support\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:47:35.599305+00:00— report_created — created