Why is fewer comments a good thing?
Why is fewer comments a good thing?
You'll ask it to do something and it'll comment the code with an answer to what you asked it, rather than just explanatory comments to whoever comes after.
There's also a second issue that if the code is actually incorrect, the comment can nevertheless bolster the case for it.
Not to Claude – its own, old comments have helped me/it solve new issues on more than one occasion.
//add returns the sum of x and y
//per section 2.1 of addition-implementation-plan.md sum is designed as the seam for user addition interfaces.
//previously sum added numbers, now it adds numbers
def add(x, y):
return x + yIt's really time to move to OpenAI...
Digital ocean particularly looks promising as well.
It felt like it was commenting on the diff sometimes instead of what the code was doing.
It writes out stories describing what isn't there or what used to be there. It's usually not helpful, just noise. It also likes to write it in very verbose AI-styled prose.
Problem is today's LLMs don't have the long term memory that humans have, and so remembering the reason behind a given change/decision has to be preserved in some way if it's non-obvious. Hence why there is {AGENTS|CLAUDE}.md, the auto-memory system, and 1001 variants of memory implementations in the wild. All are trying to ensure that LLMs can have the context they need at the location and time they need it. And you want to block Claude from using a technique that it natively finds helpful.
Also many many people keep saying the same thing and you keep repeating adnausium the same tired comments. I get it, you think the comments are great and are valuable.
Read the entire thread https://news.ycombinator.com/item?id=49393378
The concensus in this thread is that for multiple reasons the excessive comments are in fact actively harmful. The listed reasons are:
1. Document the conversation, not the code — narrate the back-and-forth that produced the change rather than what the code does
2. Reference intermediate states that never shipped ("previously X, now Y")
3. Cite plan documents and session artifacts (`per section 2.1 of addition-implementation-plan.md`) meaningless to a future reader
4. Belong in commit messages or PR comments, not source files
5. Go stale immediately — describe a state the code is no longer in
6. Launder incorrect code as intentional, making bugs harder to spot
7. Build a false Chesterton's fence around mistakes
8. Use defensive prose ("this is not cosmetic", "prevents the critical bug that shipped once") that asserts importance instead of conveying information
9. Describe what the code doesn't do — relevant in the moment, not in the codebase
10. Confuse later agent sessions, sending them to read irrelevant files
11. Consume context tokens on every read
12. Force reviewers to manually delete the litter
13. Resist correction — telling Claude to be concise doesn't durably stick
Please consider that your opinion may need to adjusted.
Yes, I "push back" because an LLM using any means at it's disposal to improve itself is just a logical thing, and I have seen it help Claude. Because I read the live transcript (so I know what it's doing and can steer if I see it veering off), I've seen quite a few times the comments it made previously give it some extra context, which more times than not leads to it self-correcting. There are a few times where it becomes a bit confused because some comment block is stale, but it usually surfaces this confusion, which again I will usually catch and properly steer because I read that live transcript.
It's very similar to someone scribbling notes in the margins or between the lines in the pages of a printed work. Sure it looks messy to others (I personally would hate reading something with another's scribblings), but it's a sensible thinking aid for that person. And if another person reads some given note, they can always question the writer about it, if deemed appropriate.
No, I'm going to take a stance similar to Galileo and "stick to my guns" despite what others were/are saying, because it's not only empirical (I've seen it), but also logical (it makes sense). LLMs need extra context for non-obvious things, and without it, they can easily lose their way. There are many tools out there trying to solve the extra context problem with various degrees of success, but I say the most efficient method is having that extra context always available at the point where it's relevant, so there's no need for the agent to waste tokens making tool calls to get it, or even waste thinking tokens wondering if it should call a tool in the first place to see if there is extra context. Just like a human rereading a work will naturally encounter any previous notes they made between the lines or in the margins, and trigger related recollections. And yes, human-scribbled notes also become stale and irrelevant, but that won't stop the human finding at least some of it useful and timely. In either case, the quality of the notes taken could likely use improvement, but blocking the at-site note-taking itself leads to generally reduced effectiveness.
Yes that’s exactly what I think. I also don’t think the team was aware that opus 5 talks like an overcooked gibbon either. And what’s more I’m certain that it will do neither very soon.
[0] https://www.perplexity.ai/search/d6bd0bde-5329-4c0b-a22c-72b...
I only leave meta-comments in if its actually helpful (i.e. it goes in a wrong direction without it)
Except you have to expand to see writes, and if sub-agents are used, suddenly you need to monitor N transcripts. Workflows are even harder to see as they go, but workflows are what make it not have amnesia about rules you set for it. Workflows also can't be steered.
Claude Code is just about geared towards "prompt it and let it do its thing"
Claude very often litters code with comments about decisions that were made within a single session/pull request, its just noise.
Dude, just talk about the current state of the code!
That's your perspective. For Claude that's an extension of its thinking, which makes it work better. Just like the person who takes notes so they have references for later. Take it away and you're negatively impacting outcomes.
Useful for the LLM to know the "why", but not something a human would do, unless it's a very critical and confusing part of the code.
I can really recommend the book Clean Code, here is a summary: https://gist.github.com/wojteklu/73c6914cc446146b8b533c0988c...
Fewer AI-generated comments is generally a good thing.