r/ClaudeCode • • 5d ago

Rant Claude is driving me nuts!

Claude writes a method that validates a record, but it returns an error message and only about the first found error.

///<summary>Checks the record against the rules of its format and returns a broken rule.</summary>
string? Validate()
{
  if (this.FirstName is null)
    return "Missing first name";

  if (this.LastName is null)
    return "Missing last name";

  ...
}

I tell Claude to return proper validation error objects and for all found errors, not only the first one.

Claude writes:

///<summary>
/// Checks the record against the rules of its format and returns every broken rule,
/// not only the first one.
</summary>
ValidationError[] Validate()
{
  ...
}

For heavens sake, why does it think "not only the first one" is relevant to put into the documentation? It's already very clear from the method signature.

Claude does this all the time. It takes information from an instruction in the conversation and mindlessly puts it in places where it doesn't belong.
This example is one of the lesser stupid ones, I have seen some much, much worse.

And they call that "intelligence" and even "reasoning".
If a junior dev would do something that stupid, I would chase them with a pitchfork!

1 Upvotes

29 comments sorted by

•

u/AutoModerator 5d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/secretaliasname 5d ago

Yea, sometimes I wonder if Claude isn’t subtly making messages to its future self. It won’t remember your prompt.m so it encodes it in the code a bit too literally. I fight this shit all the time

1

u/rent-a-developer 5d ago

I think this is because LLMs do not think and they do not reason, at least not in the sense (intelligent) humans do.
They completely lack any common sense.
And they do not reflect and ask "Is what I am doing here making any sense?".

They just predict next token (auto complete on steroids) and this is the result.

3

u/Defconx19 5d ago

The common sense you mention is context.

You are understanding what it is incorrectly.

You cant just say do things hurr.

It needs context.  If I blindfolded you and and told you how to change the oil could you?  When all i do is say change the oil and dont fuck it up?.

Sometimes claude needs more context.  Think of the childhood teaching exercise when the teacher asks the class to tell them how to make a peanut butter and jelly sandwich.  When you say take the bread and put it on the table.

The kids assume the knowledge of taking the bread out of the bag is already known.  Its called implied knowledge.

AI is way better than it used to be, but its not human, its never eaten a PB and J it doesnt even have eyes.  It has algorithms to translate images into code it can understand.

The fact that you think a lack of implied knowledge being given by the prompter invalidates everything else it can do is crazy.

1

u/rent-a-developer 5d ago edited 5d ago

No, it's not missing context.
Claude knows that a doc comment is intended for API consumers.
Claude knows which signature the method has, because it just wrote it.

Writing something taken from an instruction word by word into the comment does not make any sense in this case.
It just shows that Claude is bad at determining what from its context is relevant and what isn't.

1

u/macbig273 1d ago

of course it's bad at it... do you think llm are magic ?

4

u/wegster 5d ago

Not just claude, same thing with Codex. It takes things'literally' to the point of putting it in docs, specs, ...

1

u/rent-a-developer 5d ago

They lack any kind of common sense or reflection.

1

u/squeezyflit 5d ago

I find it fascinating that people think machines should exhibit common sense.

1

u/rent-a-developer 5d ago edited 5d ago

Well, the question is would you call someone (or something) "intelligent" that completely lacks common sense (in the sense of not doing something obviously stupid)?

1

u/YoungNo8804 5d ago

are you possibly using haiku 3

2

u/rent-a-developer 5d ago

Nope. It was Opus 5.5 on HIGH effort level. 😂

1

u/YoungNo8804 5d ago

Damn fair enough. LLMs remain LLMs... They look smart; they are not. Same for the recent math stuff actually. When you look into what it actually did, and what the mathematical community is saying... It is certainly much, much less impressive than it seems, and the "future of maths" is certainly not cooked. 

1

u/rent-a-developer 5d ago

Yeah, LLMs are not smart, they just "know" a lot and can work much harder and longer than any human could. A 250,000 pages Riemann hypothesis proof to me seems much closer to the infinite monkey theorem than actually something inherently intelligent.

1

u/Defconx19 5d ago

The fact that you think this is anything based on intelligence or reasoning shows how little you have lmao.

0

u/rent-a-developer 5d ago edited 5d ago

Bold of you to accuse me of lacking intelligence while offering absolutely no reasoning. Quite the demonstration.

2

u/Budget-Juggernaut-68 5d ago

I think partly it's because how difficult it is to specify what you want changed. For small projects most of the code can fit in context/easy for the model to search and match what you're referring to. When it is huge, the likelihood of it misunderstanding the specifications.

Of course the "if I have to spell out everything I might as well change it myself".

Yes maybe you should? If it is a small change.

1

u/MievilleMantra 5d ago

Think of this as a minor bug. It reiterates its corrections like this in other contexts too. It will probably stop doing that eventually.

1

u/FWitU 5d ago

A pirate walks into a bar with a steering wheel attached to his waste. That bartender says, “Sir, there is steering wheel attached to you”.

The pirate says, “arr it’s driving me nuts”

1

u/yoloJMIA 5d ago

What subscription are you on? Spend the same amount on AI credits and use the exact same prompts and see if it makes a difference.

1

u/dsggut 5d ago

You think they nerfed models used through a subscription?

1

u/yoloJMIA 5d ago

That's not what I think, it's the truth. When the amount of users on the system is high, they each get less performance. If you pay the full price via the API you always get consistent performance.

1

u/dsggut 5d ago

But how do you think this works technically? Do you think they set the effort level lower than what the user selected?

1

u/yoloJMIA 5d ago

Bro at this point Claude basically owns Anthropic. They have said that 90 something percent of the codebase was written by Claude Code. I have no idea what they can and can't do on the backend, they are the pinnacle of technology at the moment

0

u/dsggut 5d ago

Pretty scary when you think about it:
A psychopath (an AI) builds another psychopath (next-gen AI) and the whole IT industry uses that psychopath to build software the world uses.
That cannot end well.

0

u/Asalakabim 4d ago

people like you should be sued for libel - cut down half a dozen of you and the subs will become readable again

0

u/yoloJMIA 4d ago

Even if I got sued 8 could still post on this sub lol

1

u/nmkd 4d ago

Because Claude always leaks prompts into docs/comments.

1

u/Asalakabim 4d ago

I am outraged and borderline insulted by you having seen much worse than this one, thanks for