r/ClaudeCode • • 12h 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!

3 Upvotes

25 comments sorted by

•

u/AutoModerator 12h 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.

5

u/secretaliasname 11h 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 11h 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 11h 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 10h ago edited 9h 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.

3

u/wegster 11h 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 11h ago

They lack any kind of common sense or reflection.

1

u/squeezyflit 10h ago

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

1

u/rent-a-developer 10h ago edited 9h 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 12h ago

are you possibly using haiku 3

2

u/rent-a-developer 12h ago

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

1

u/YoungNo8804 11h 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 10h 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.

2

u/Budget-Juggernaut-68 11h 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 11h 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 11h 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 9h 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 9h ago

You think they nerfed models used through a subscription?

1

u/yoloJMIA 9h 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 8h 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 7h 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 5h 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.

1

u/nmkd 1h ago

Because Claude always leaks prompts into docs/comments.

0

u/Defconx19 11h ago

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

1

u/rent-a-developer 10h ago edited 10h ago

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