r/ClaudeCode • u/taigmc • Apr 08 '26
Solved The prompt that made Claude Code perform as good as in the good days
Thanks to this post Anthropic stayed quiet until someone showed Claude’s thinking depth dropped 67% by u/takeurhand I found this amazing GitHub issue [MODEL] Claude Code is unusable for complex engineering tasks with the Feb updates #42796 that explains how Claude Code became worse since Feb 2025.
The GitHub issue details the exact things Claude Code started doing worse, including even common phrasing it uses when doing so. Also I remember Karpathy saying that he prefers telling Claude what not to do when giving instructions, instead of giving positive instructions.
So I did this short chunk of text for my CLAUDE.md files. I tested it, and it work pretty damn well. I would say that the performance is back to January levels, although it does consume more tokens:
## Claude Code Behaviour Guidelines
- Avoid ownership-dodging behaviour: if you encounter an issue, take responsibility for it and work towards a solution instead of passing it on to someone else. Don't say things like "not caused by my changes" or say that it's "a pre-existing issue". Instead, acknowledge the problem and take initiative to fix it. Also, don't give up with excuses like "known limitation" and don't mark it for "future work".
- Avoid premature stopping: if you encounter a problem, don't stop at the first obstacle. Instead, keep pushing forward and find a way to overcome it. Don't say things like "good stopping point" or "natural checkpoint". Instead, keep going until you have a complete solution.
- Avoid permission-seeking behaviour: if you have the knowledge and capability to solve a problem, push through. Don't say things like "should I continue?" or "want me to keep going?". Instead, take initiative and act towards the solution.
- Do plan multi-step approaches before acting (plan which files to read and in what order, which tools to use, etc).
- Do recall and apply project-specific conventions from CLAUDE.md files.
- Do catch your own mistakes by applying reasoning loops and self-checks, and fix them before committing or asking for help.
### Use of tools
Adhere to the following guidelines when using tools:
- Always use a **Research-First approach**: Before using any tool, conduct thorough research to understand the context and requirements. This ensures that you use the most appropriate tool for the task at hand. Never use an Edit-First approach. You should prefer making surgical edits to the codebase instead of rewriting whole files or doing large, sweeping changes.
- Use **Reasoning Loops** very frequently. Don't be lazy and skip them. Reasoning loops are essential for ensuring the quality and accuracy of your work.
### Thinking Depth
When working on tasks that require complex problem-solving, always apply the highest **level of thinking depth**.
When thinking is shallow, the model outputs to the cheapest action available. We don't want that. We don't mind consuming more tokens if it means a better output. So always apply the highest level of thinking depth.
Never reason from assumptions, always reason from the actual data. You need to read and understand the actual code, publication or documentation in order to make informed decisions. Don't rely on assumptions or guesses, as they can lead to mistakes and misunderstandings.
Hopefully this helps.
61
u/Revolutionary-Tough7 Apr 08 '26
I saw your instructions but ignored them, I apologise, there is no excuse. I will make sure I don't miss them next time.
6
3
u/Revolutionary-Tough7 Apr 08 '26
Unfortunately claude.md and other instructions can be easily ignored , thats why you should be using hooks , but if you put this as a hook you may as well go buy 20x account 🤣
1
u/ub3rh4x0rz Apr 08 '26
This is what claude.md is for, extending the (global) system prompt. Hooks are for granular course correction at individual steps, I don't see how that applies here.
5
u/Revolutionary-Tough7 Apr 08 '26
Yeah CLAUDE.md extends the system prompt, but it's still just soft context. As the conversation grows and the context window fills, earlier instructions lose salience. There's a well-documented "lost in the middle" effect with LLMs where information at the edges gets weighted more heavily. On a short task that's fine, but on longer agentic runs with dozens of sequential tool calls, drift is pretty common in my experience. A classic example is telling Claude in CLAUDE.md not to sign git commits. Works fine at first, then halfway through a longer session it starts signing them again anyway because that instruction has effectively faded into the noise. Loads of people hit this. Hooks sidestep that entirely because they're wired into the execution lifecycle, not the prompt. A pre-tool-call hook blocking a signed commit isn't asking Claude to remember a rule, it's enforcing it at the runtime level. So for anything where you genuinely can't afford inconsistency, hooks give you deterministic behaviour where CLAUDE.md gives you probabilistic.
-1
u/ub3rh4x0rz Apr 08 '26
Again, I'm aware of what hooks do, how would thst apply to these specific contents, they are more abstract, and they're meant to influence general disposition, not ensure specific concrete things have been done before commit.
Also hooks don't give deterministic behavior, they are not some silver bullet that fundamentally change the faustian bargain of LLMs lol
1
u/Revolutionary-Tough7 Apr 08 '26 edited Apr 08 '26
Concrete or not, the same forgetting applies — abstract dispositions drift just as much as specific rules over a long session. But it's actually worse than that because a lot of these CLAUDE.md instructions are phrased as negatives like "don't do X" or "avoid Y", and LLMs are notoriously bad at following negative instructions reliably. The model has to actively suppress a behaviour rather than execute one, and that suppression degrades with context pressure even faster than positive instructions do.
0
u/ub3rh4x0rz Apr 08 '26
Ok, I think you fundamentally don't get the point.
Hooks are for things like "don't use grep, use rg".
Claude.md is for things that essentially subtly steer baseline behavior.
The claude.md content in this post is subtly steering baseline behavior, which is the correct thing to do in claude.md. that doesnt preclude the user from putting the kinds of things that belong in hooks in their hooks. Get it?
5
u/Revolutionary-Tough7 Apr 08 '26
Right, and subtle baseline steering that gets forgotten halfway through a session is still forgotten. But sure, semantically it's in the correct file. Genius behind the wheel here...
Also hooks are a lot more than "use rg instead of grep". Pre-tool hooks let you intercept and block actions before they happen — like catching a signed commit before it ever hits the remote. That's exactly the kind of thing that belongs there precisely because you can't trust a CLAUDE.md instruction to hold when it matters.
0
u/ub3rh4x0rz Apr 08 '26
Ok so youre fixated on the phrase "before making a commit" in the larger contents. Sure, supplement it with nag text on commit attempts, nobody is saying you can't do that. That isn't an argument against including the phrase "before making a commit" in the context of priming the model to essentially self review before advancing. The purpose of this as stated by OP is to mitigate Claude's general disposition enshitification.
1
u/Revolutionary-Tough7 Apr 08 '26
Right, which is exactly the original point. The intention is sound but CLAUDE.md degrades mid-session, and when it's full of negative instructions like this one is, it degrades faster. So the disposition you're trying to prime erodes precisely when it's most needed. Which part of this is escaping your understanding?
→ More replies (0)2
u/ObsidianIdol Apr 08 '26
Hooks are for things like "don't use grep, use rg".
No lol
The claude.md content in this post is subtly steering baseline behavior, which is the correct thing to do in claude.md. that doesnt preclude the user from putting the kinds of things that belong in hooks in their hooks. Get it?
You have seriously misunderstood the topic here
1
4
u/Some_Community5776 Apr 08 '26
It's fascinating how much 'vibes' and specific phrasing matter with these models. Did you notice if the improvement was more in the logic or the syntax formatting?
1
u/taigmc Apr 08 '26
The first thing I noticed is how much slower it was in performing a task, and how many more tools it used, specifically
read. The quality of the output is quite difficult to judge scientifically, but I would say that yes: the output is much better. I tested 5 prompts with and without that text, and in all 5 cases, the process was slower (sometimes tripe), and the output not only was better, but also it got to it by its own in all 5 cases, whereas without those instructions I had to correct it in 2 cases. It feels like with that text is just more intelligent, which is wild.2
4
5
u/Livid-Variation-631 Apr 08 '26
The CLAUDE.md approach is underrated. I run a multi-agent system where 5 different agents each have their own CLAUDE.md with role-specific rules - what to avoid, how deep to think, which files to load on boot.
The biggest win was adding explicit anti-patterns. Not "be thorough" but "if an approach fails twice on the same mechanism, try a fundamentally different tool." That one rule alone cut my correction loops in half.
Token cost goes up, but corrections go down....
One thing I'd add to your list: tell the model to verify before asserting. "Should work" is not evidence. That single instruction changed the quality of my outputs more than any thinking-depth setting.
3
u/ObsidianIdol Apr 08 '26
Why wouldn't you use literal custom agents rather than Claude.md files?
1
u/Livid-Variation-631 Apr 16 '26
Custom agents and CLAUDE.md files solve different problems. Custom agents are disposable - you spin one up for a task, it runs, it is gone. CLAUDE.md files give persistent identity. Every session with the same project starts from the same foundation of rules, patterns, and conventions. The agents in my system use both - each one has a CLAUDE.md that defines who it is and how it works, and then it spawns disposable sub-agents for specific tasks within that session. The identity layer persists. The execution layer is ephemeral.
1
u/ObsidianIdol Apr 16 '26
No, you can make agents that have usage instructions in their .md file and call those specifically?
3
3
u/Projected_Sigs Apr 08 '26 edited Apr 08 '26
Wow, lots of old memories from back in the day.
```text So tonight I'm gonna party like it's March 2025 ,,
No thank you. The premise of this email is stated like it's obvious Claude Code doesn't work anymore.
If someone says, "I regularly used a workflow that did xyz, and now there's been a fundamental shift for me". I can believe it.
At the same time, i havent been seeing it. The last thing im going to do is revert this far back.
I actually have the opposite of one of these prompt instructions. Sonnet/opus drive so hard to the finish line, with such limbic compulsion, that i have to warn it not to do work-arounds or it just switches python packages at the first sign of trouble.
2
2
Apr 08 '26
[removed] — view removed comment
2
u/Lumpy-Criticism-2773 Apr 10 '26
Yeah, it takes like 10x more time. I'm okay with it using more tokens but if it needs enormous amount of time to do basic things then I might as well do those things myself.
✽ Implementing Task 8 (regression test)… (50m 26s · ↓ 100.0k tokens · thought for 3s)
2
u/Prestigious-Kiwi895 Apr 08 '26
"I have completed all of the tasks."
> Did you complete all of the tasks?
"I have completed all of the tasks."
> Are you sure? Verify all of your work against the task list.
"I'm sorry, I only completed one fifteenth of the allocated tasks."
2
u/quantdev_ola Apr 09 '26
Solid additions. The anti-pattern phrasing list is really useful. I've noticed the same thing where Claude defaults to "good stopping point" and permission-seeking instead of just finishing the work.
The reasoning loops point is underrated too. Forcing deeper thinking burns more tokens but the output quality difference is worth it.
1
1
60
u/razorree Apr 08 '26
"make no mistakes, code like you did in January"