Around Opus 4.7/4.8 and now even more with Opus 5 I’ve noticed an incredible uptick in the volume of comments Claude adds to the code. At first I was incredibly pleased because previously it was adding none, I had to fight it tooth and nail to add basic Google doc strings to my Python code. But the problem with comments, as I’m sure nearly EVERY developer knows, is they LIE
- they make claims about what the code does and they’re wrong
- they state the “why” and the why is actually slightly incorrect or missing an important detail or missing nuance
- they go stale and no one updates them then they act as a minefield of misdirection And guess what this does to Claude? Well every time in a new session when it reads those comments it previously left they act as borderline prompt injection steering the model and then it will believe the comments and never question if they’re actually accurate. I’ve found myself increasingly telling it to ignore the comments, to assume they’re false and trust the actual code as the source of truth. I’ve had to argue with it when it claims the comments state something and then I tell it that those are wrong or outdated or etc etc etc Deciding to go audit them myself, in just a few minutes of digging I found almost all of its comments are at MINIMUM wrong in a slightly nuanced way. I plan to scorched earth clear the codebase of all its comments, I expect a lot less frustration once I’ve done so. Just a bit of advice from a fellow dev to other devs. Would love y’all’s thoughts, curious if you notice the same things. TLDR: Claude comments the code and comments LIE then later it believes those comments. Delete its comments. If you really want comments ask it what the code does, then comment it yourself, it’ll help with understanding anyway. submitted by /u/thealliane96
Originally posted by u/thealliane96 on r/ClaudeCode
You must log in or # to comment.
