4 ms·
Claude is creating verbose comments with recent models and people are are tired of it
by rirze 1mo ago
Claude is creating verbose comments with recent models and people are are tired of it
- skeledrew 1mo agoThose verbose comments provide context for why something is there way it is, so it can take those decisions in account when making changes in the future.
- rplnt 1mo ago> why something is there way it is 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.
- zormino 1mo ago"don't write a goddamn novel" <- I've said this to claude way too many times, nothing you can do actually seems to make it significantly less verbose
- deleted 1mo ago[deleted]
- orwin 1mo agoAnd the way they are written is rather unhelpful: '//this not cosmetic: this css helps the user understand where he should click'. The 'this is not' pattern is useless at best.
- skeledrew 1mo agoIt's likely not helpful to you, but it is to Claude. Basically a memory entry at the exact point of relevance, with the same caveats. One advantage though is it survives cloning, so another using the project benefits.
- rplnt 1mo agoIt's only helpful to Claude in that it wastes more tokens and costs more.
- skeledrew 1mo agoIt does visibly use a few more tokens in the short term. But it hurts Claude's ability in the long term if removed because it has to either think more every time it encounters that section in the code (more invisible thinking tokens used), or there's an increased risk of making a maladaptive change without context. Heck I've been bitten enough times already by it, though more recently it's cross project concern where Claude rediscovers some root cause that was already found and documented (I have it save a centrally-located writeup for things that took serious work to learn, when I remember, but I still need to make that knowledge pool known to other agents/sessions without having to manually prompt each time) elsewhere. 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.
- fooster 1mo agoNo it doesn’t. The comments are hugely verbose trash that immediately becomes outdated and brittle and confusing for humans and Claude alike.
- skeledrew 1mo agoIf that were the case, the habit would have been trained out of it by the LLM researchers at Anthropic, etc. As for humans... well Idk about you but I'm not reading every line of generated code. I read the live transcript, and only dive in if something is off that the agent isn't resolving.
- amdsn 1mo agoIf they have in mind what I think of when I think of claude comments then frequently they are only relevant to the back and forth that produced the code and are exaggerated to the point of being misleading. A very common example is to land on something that isn't quite right or doesn't quite work, prompt an adjustment, and then the adjustment will have some grandiose prose about "preventing the critical bug that shipped once." People just need to clean up such litter manually but it would be nice if the models generated less of it.
- bryanlarsen 1mo agoThose massive comments generally refer to intermediate states that never shipped, making them utterly useless, noisy and confusing as a permanent artifact. They're sometimes useful to reviewers, so a commit message or pull request comment is much more appropriate.
- eloisant 1mo agoYes I hate when Claude explain in comments how it is now compared to how it was before, or how it could be if a different decision had been taken. Dude, just talk about the current state of the code!
- skeledrew 1mo ago> useless, noisy and confusing 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.
- bryanlarsen 1mo agoNo, it's the other way around. If you put a comment "don't do foo" in your code, you're biasing future readers, human or artificial, to think about foo when you explicitly want them not to.
- skeledrew 1mo agoIt isn't about making readers not think about foo. It's about biasing thought about foo in a particular direction. And I've seen it work multiple times: agent mentions it encountered X comments in the code and revised its action as a result (yes, I read live agent transcripts).
- fpoling 1mo agoIf one needs to dig history, then git log -p and similar are way more useful and reflect the real history rather than LLM inference about it. Comments reflecting the goal are more useful as neither history nor code itself covers it.
- skeledrew 1mo agoLooking into git history is an active decision that's usually only done after something undesirable happens, and now there's the need to try and find why. Better to have the context passively loaded as part of working with the relevant section of the code, and likely prevent that something from even happening in the first place. Think Chesterton Fence.
- hamandcheese 1mo agoThe story of how the code got to a certain state belongs primarily in git commit messages, not in comments. Comments should serve to aid in understanding of the code, highlight footguns or hidden dependencies, etc. Claude very often litters code with comments about decisions that were made within a single session/pull request, its just noise.
- cageface 1mo agoThe new concise output style they just released definitely helps with Opus 5 in general.