[MODEL] Undesirable verbose comments due to system instruction
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Just asked to fix css to scope it to a selector
What Claude Actually Did
Claude added some 10 lines of comment also on top of it which are very "that claude code session" specific and will not be understood an independent context.
<img width="2942" height="708" alt="Image" src="https://github.com/user-attachments/assets/dabf6115-5733-42f7-83b5-ea79101f0fdd" />
This has also resulted in claude refusing to change the code because the comment referenced a point in the plan and the new claude session treats it as unchangeable.
Expected Behavior
Should not add unnecessary comments BY DEFAULT - As a user I should get the most efficient system and the model should add meaningful comments only.
This can also confuse the model in a new claude code session because the comment it added will not be high quality and wrong hallucinated comment.
Files Affected
Modified a css file and added unnecessary comments.
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
_No response_
Claude Model
Sonnet
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.220 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_