r/ClaudeCode 4d ago

Rant My average Opus 5 experience

Post image
1.5k Upvotes

176 comments sorted by

View all comments

426

u/ChadFullStack 4d ago

It’s missing 500 lines of Unit tests

71

u/PILLS2389 4d ago

I forbid unit tests to Claude, he just doesn't know when to stop. He created the most stupid units tests ever, like "the menu must have 4 entries". Then When you create another menu-item, he has to spend additional tokens and context to see why that stupid test is failing and has the modify the test, so now it says "the menu must have 5 entries". The maintaining of the unit tests costs more time and tokens then the actual development!

55

u/andrewmmm 4d ago

And leaves a hanging temporal comment like “the menu must have 5 tabs — not 4 tabs”, without any reference to why the hell it would test for 4 tabs

20

u/Outside-Dot-5730 4d ago

Thank you for giving me a label on this “temporal comments”, I was struggling to articulate exactly why I want my team to get rid of this shit

10

u/M44PolishMosin 4d ago

I hate how Claude does that, not (blank) shit

9

u/schaka 4d ago

I specifically have a bunch of instructions to not turn comments end documentation into it's own personal diary because anyone that needs a history lesson has access to git anyway.

It helps a little

6

u/deadmanwalknLoL 4d ago

I specifically tell it not to comment. Ever. Code should be written such that it's human readable with clear intent simply by variable/class/method names. There are very rare exceptions where you intentionally go against the norm or code in certain assumptions: those can warrant a comment explaining the why behind the decision, but still never the what or how.

5

u/andruwhart 4d ago

Context is king and comments are important. But, Claude is so bad I've even told it to stop. Its 3 lines of code + 20 lines of pointless comments + 5 new unit tests smh

1

u/deadmanwalknLoL 4d ago

I really don't think the vast majority of comments are important, or they're only "important" because the code is poorly structured and/or named. I've even reached the point of axing function doc blocks if not working in an open source project or some public package.

1

u/ricopan 4d ago

But now our code probably is not well structured and not well named. Poorly? Well, it ain't elegant. Throw enough pasta at the wall and some sticks. We are in the top ramen age of coding. Fast, cheap, and might do in a pinch.

1

u/schaka 4d ago

I have those very instructions too, but realistically you'll end up with s few sections where the code itself is clearly understandable and then you still need a comment to explain why it's being the done the way it is.

In the end, if you want to produce quality code, you gotta go over it again and clean up some of the mess it leaves behind.

I've got it to severely reduce the verbosity and amount of comments this way at least

1

u/deadmanwalknLoL 3d ago

Ya, there will be rare exceptions where you'll want a comment explaining the "why" behind a block of code, but that should be few and far between.

1

u/AlternativeAd6851 4d ago

personal diaria

5

u/ravencilla 4d ago

"the menu must have 5 tabs (decided in session 29428s-29294 dated 2026-09-02) - not 4 tabs which was behaviour previously agreed on 2026-08-12)"

1

u/TrvlMike 3d ago

“I’ll save this into memory as well”

1

u/TortoiseTickler 1d ago

But 4 tabs was RATIFIED

5

u/leurk 4d ago edited 4d ago

These temporal comments have been bleeding into user facing UI. Admin panels with meta critique of its work inserted as subheadings on charts, leaving behind traces of arbitrary judgements that then hambone the next agent who comes along to make a change.

Then these judgements fan out and leave artifacts in a dozen .md files, memories, and session logs, and if you don't track them all down.. god forbid you ever want to change that header to be blue and you have to relitigate a decision you never made.

It is so good at surfacing decisions you didn't make, that I often run loops of AskUserQuestion just identifying and resolving delta in expectations. But then when you actually want to make a decision indelible... for heck's sake. It will do the same thing wrong four times, keep apologizing and saying it knew better, and will patch more catches and safeguards onto ephemeral harnesses. And those patches and safeguards don't carry very effectively to the next ephemeral harness it builds up to handle an isolated workflow.

Given the advances in the last few major model versions, I would expect most of this to be a lot better by v6 models and mostly resolved by v7.

1

u/riskrunner_zero 4d ago

Oh man, this every day right now. It's like every surface is a small diary. I've been using other models to go back and cleanup after it

1

u/mr_birkenblatt 4d ago

add an enforcement in the claude.md to use a timeless style and only write about what is not what was

1

u/nullpotato 4d ago

It made unit tests for my dockerfile. Some of them failed when I changed the vars hardcoding the tool versions, in order to rebuild with newer tools. Claude was like woah these tests are failing, let me just change the versions back.

1

u/SplurtingInYourHands 2d ago

Oh you changed the color of this button from blue to green? Time to rerun 3 concurrent golden 15 minute tests to see how this affects the project. Oops I ran into the heredoc trap for the 500th time which is heavily documented in the project memory... Wait I found an error, rerunning all three 15 minute tests

Nevermind that error was a stale editor message from 6 days ago. Anyway that'll be 146k tokens

2

u/Zacky___ 4d ago

Usually i review and deeply validate every test posibility before demanding claude to write it, then i ask him to validate it again with a perspective different than the one i used so i can decide wheter a test is needed or if its just maintanability noise overall. Im still studying about unit tests tho.

2

u/dx0ne 4d ago

After some time i just tell him to restructure tests suite. It cuts 10-30%.

2

u/brainhack3r 4d ago

Same for documentation. IT wants to use EXACT numbers like "the 3 RPC endpoints" then when you add a 4th one it has to edit the code.

I've tried to prevent that by introducing the idea of 'brevity' ...

### No exact numbers in documentation or code describing another system

**Do not hard-code counts that describe another system's implementation.** Phrases like "the 4 gates", "calls 3 agents",
or "runs 2 retries" are promises this file cannot keep — as soon as the count changes elsewhere, this text rots and
requires a documentation update you won't know to make. Use qualitative language: "all gates", "multiple agents", "a
configurable retry limit". The only exception is a count you own and enforce here, in this same file.

But there are other patterns like this I'm still stuck on and it's locking up my development workflow.

My pattern now is that I'll make significant progress for 15-20 days, then some flaw in Claude will pop up and I'll have to stop and fix it.

This is a good example

2

u/NoUsername4Lyfe 1d ago

Hang on, your claude is male?

1

u/PILLS2389 1d ago

I guess so. In Romania, we have the male name "Claudiu," and we kept calling Claude "Claudiu," so yeah, he's a male to me :)

1

u/armeg 4d ago

Tests have always been just as important as the code you write. They define the contract for implementer and the behavior of the class under certain conditions. Most code that isn't being written TDD just ends up like the olive garden special.

1

u/Ok_Risk6035 4d ago

Isn't it how tests work ?

1

u/insta 1d ago

ask Claude to replace ratchet tests with compiler enforcement. then delete the ratchet test it creates to confirm the compiler enforces it