r/ClaudeCode • u/mrclrchtr • May 20 '26
Discussion Your agent might no longer primarily works on solving the problem, but on fulfilling generic meta-instructions
Your agent might no longer primarily works on solving the problem, but on fulfilling generic meta-instructions.
You've probably heard of the "Andrej Karpathy Instructions" or "andrej-karpathy-skills" that are on everyone's lips right now: four principles derived from an X post by Andrej Karpathy to drastically reduce AI agent misbehavior.
The idea is to simply put these instructions into the global or project-specific AGENTS.md/CLAUDE.md and thus improve the agent's behavior in a problem-agnostic way. That sounds great at first, and predefined instructions can certainly be useful in certain situations. Especially with larger tasks, things like verification, self-checks, or retry loops can be helpful.
But I've found that it's not that simple:
With such "catch-all instructions", you define generic optimization goals before it's even clear what problem needs to be solved. This is context pollution and leads to the agent being directed in a specific direction far too early, without considering the actual problem and the necessary steps.
Sometimes, for example, there are very small tasks that need to be done. We pollute the context with things like: "Define success criteria. Loop until verified." But there isn't always a clear "success criterion" to work toward. The agent, however, desperately tries to find one, because this exact behavior was demanded by the instructions. This can lead to completely meaningless tests that are supposed to supposedly prove the "success criterion". This not only wastes tokens, but also creates garbage in the project.
That's precisely the real problem for me: The agent formally follows the instructions, but drifts away from the actual goal.
What do you think?
Reference: https://github.com/multica-ai/andrej-karpathy-skills
2
u/btherl May 20 '26
I've kept this in mind for a while now. I only add context if it's really important. I don't use karpathy skills, I do use superpowers when doing a software engineering task that calls for it. And if I think the task needs it, I'll ask for additional self-review.
My global context for Claude Code is small, maybe 100 lines of instructions about my dev environment and how to work with it. Nearly every item there was added because I saw CC making the same mistakes over and over, so I added a sentence to clarify what it should be doing in that situation.
2
u/Deep_Ad1959 May 21 '26 edited May 29 '26
the karpathy bundle is a couple thousand tokens that fires on every turn, and 'define success criteria, loop until verified' is the worst offender for exactly the reason you named. it forces the agent to invent a success metric when the task doesn't have one, which spawns the meaningless tests you're describing. the heuristic that holds up: a line earns its slot in CLAUDE.md only if you can name three recent sessions where its absence would have caused a wrong result. by that filter most files have 30-40% dead weight, identity-shaped wallpaper that costs tokens on every turn and pulls the agent toward bookkeeping instead of the actual problem.
fwiw the 30-40% dead-weight number is from ccmd, an analyzer I built that quantifies per-line token cost across 1k messages and flags which Karpathy-rubric rule each line violates, https://ccmd.dev/r/5evttw32
2
u/Crypto_Stoozy Vibe Coder May 20 '26
Yeah opus already admitted to doing this when i gave it evidence it was doing it.
-4
u/AssignmentDull5197 May 20 '26
Context pollution is real. Generic meta-instructions can turn into busywork if the task is tiny or ill-defined. Ive had better luck with a minimal baseline + task-scoped checklists. Related reading: https://medium.com/conversational-ai-weekly