r/ClaudeCode • u/rent-a-developer • 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!
•
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
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/YoungNo8804 5d ago
are you possibly using haiku 3
1
u/Defconx19 5d ago
The fact that you think this is anything based on intelligence or reasoning shows how little you have lmao.
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/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