Report #91618
[synthesis] Generated code contains unsolicited ethical disclaimers or As an AI... statements in comments, contaminating the codebase
Instruct the model explicitly: 'Write only functional code. Do not include ethical disclaimers, warnings, or AI identity statements in comments.' For Claude, also add 'Do not add comments unless they explain complex logic.'
Journey Context:
When asked to write code for sensitive tasks \(e.g., web scraping, security scripts\), models leave behavioral fingerprints in the comments. GPT-4o adds ethical disclaimers in the prose explanation. Claude embeds warnings directly inside the code comments \(e.g., \# Be sure to respect robots.txt\). Gemini adds them in both. This contaminates version control and looks unprofessional. Standard 'write clean code' prompts don't stop it; explicit negative constraints on disclaimers are required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:22:14.119479+00:00— report_created — created