For months I had the same complaint: Claude Code builds the wrong thing, fast. Codex, on the same Mac and with the same person giving instructions, mostly did what I meant. I assumed one model was simply better. When I finally compared the two setups side by side, the gap was in files I had written myself.
The symptom
The pattern was consistent. I would describe a task to Claude Code and it would start editing files right away. The result was often reasonable code that solved a slightly different problem from the one I had in mind. Codex, given similar requests, tended to ask questions first, propose options and only start once we had agreed on something.
It is easy to turn that into a verdict about the models. Before doing that, I compared what each agent was actually told at the start of every session.
What I compared
Both agents read a personal instruction file on startup: AGENTS.md for Codex and CLAUDE.md for Claude Code. I had written both over time, and I assumed they said roughly the same thing. They did not.
- Codex had a hard gate. Its file contained a section saying: if no specific skill fits the task, do not implement. Run a discussion loop first, and only change anything once there is a clear decision, a spec, a ticket breakdown or an explicit go-ahead.
- Claude Code had only style rules. Its file covered tone (explain simply, offer five options when I need to decide) and "test before claiming something works". Nothing said to stop and discuss before acting. So, reasonably, it acted.
The comparison turned up more gaps:
- Codex had a rule to search code structurally with a code-graph tool before guessing; Claude Code had no such rule, so it fell back to keyword searches.
- Codex was told not to ask me whether things should be renamed; Claude Code kept asking.
- Codex had 71 skills installed, Claude Code 21. The missing ones were exactly the phase-gate skills: clarify into a spec, split a spec into tickets, implement one ticket.
In other words, I had given one agent a process and the other a personality. The one with the process looked smarter.
Fix 1: add the missing gate
Of the options I considered, I chose the smallest: add only the gate, not a full copy of the other setup. Two new sections went into CLAUDE.md:
- Discuss before implementing. Code changes, architecture decisions, refactors, config changes, moving or deleting files and publishing all need a clear decision first.
- Three exceptions, so the gate does not become friction: read-only checks, a task where I have already named the exact action and target in this message, and the necessary next steps of work I have already approved. Approval covers that piece of work only; it does not stretch to the next one.
- Don't proactively ask about renaming.
One detail worth knowing: the instruction file is loaded when a session starts. Editing it mid-session changes nothing until the next session.
Fix 2: instructions are not enforcement
The second problem was subtler. My CLAUDE.md already said "route every non-trivial request through the skill router first". In practice Claude Code often went through a whole session without loading a single skill. Twice in one day I asked it to "give me options" and it never entered the discussion skill built for exactly that.
When I looked, the router had no teeth. There were no hooks configured at all, so routing depended entirely on the model remembering a paragraph in a long file. Worse, routing was never measured on the Claude side: every logged routing event came from Codex, so the gap was invisible in my reports. Codex was not perfect either — its own measured hit rate for the discussion skill was only 2 out of 6 in the same period.
The fix was a UserPromptSubmit hook: a small script that runs on every message before the model sees it.
- It checks the message for trigger phrases such as "give me options", "compare", "help me decide" or "clarify first". On a match it injects the full text of the discussion skill into the context.
- Phrases like "last time", "did we decide" or "is there a record" inject a reminder to search my knowledge base first, and to say plainly when nothing is found.
- The trigger list is deliberately broad. A false trigger costs a few hundred tokens; a missed one costs a wrong implementation.
- It only reads the message to match keywords, then discards it. It writes nothing to disk and makes no network calls.
I tested it against a nine-case matrix — each trigger alone, both together, and three ordinary edit requests that must stay silent — and all nine passed.
One trap while testing: piping JSON into the hook with echo in zsh failed with a parse error, because zsh's built-in echo expands \n into real newlines. That looked exactly like a bug in the hook. Using printf, or passing input from a script, fixed it. The tool was wrong, not the code.
What changed afterwards
Since the gate went in, Claude Code opens most tasks by saying which workflow it chose and whether it can start yet, and it asks before building. I have not run a formal before-and-after benchmark, so I will not claim a number. The visible change is in the order of work: a decision comes first, then the edit.
Check your own setup
-
Diff your instruction files. Put your
CLAUDE.mdandAGENTS.mdside by side. Look for rules one agent has and the other doesn't — especially rules about when not to act. - Separate style from process. Tone rules make answers nicer. Gate rules change what the agent does. If one file only has style, expect that agent to act first and ask later.
- Write exceptions into the gate. Read-only work and explicitly specified edits should not need a discussion, or you will start ignoring the gate yourself.
- Enforce what matters with hooks. A rule the model must remember is a suggestion. A hook that runs on every message is a mechanism.
- Measure both sides. If only one agent's behaviour is logged, the other one's failures are invisible.
- Start a new session after editing instructions.
Before you conclude that one coding agent is dumber than another, check what each one is told. Mine were not running the same race.
Originally published on my site: https://mm7382.github.io/pec-ai-agent-training/journal-why-claude-code-felt-dumber.html. Related: Claude Code writes, Codex reviews.
Top comments (0)