Codex vs Claude Code: Which Fits How You Work?
Last updated: September 2026
Codex vs Claude Code comes down to two questions almost nobody asks first: which operating system are you on, and does your team already use other AI tools. If you are on Windows and will not install WSL, Codex wins outright, because its sandbox runs natively there and Claude Code's does not. If your team runs a mix of Cursor, Copilot and Gemini CLI, Codex wins again, because it reads the same AGENTS.md file all of them read. For most individual developers and for every beginner I teach, I would still pick Claude Code. Here is how to tell which one you are, and exactly where my bias sits.
How I tested this, and what I did not test
I use Claude Code every working day. My curriculum teaches it, I pay for it myself, and most of what I know about it comes from watching students hit walls with it rather than from reading announcements. That is a real bias and you should weigh it against everything below.
Here is what I have not done. I have not put one identical specification through both tools and compared the builds that came out. I have a 597 line spec sitting ready for exactly that test, the same one I used for an earlier model comparison, and until I run it I am not going to tell you which tool writes better code. Anyone who tells you that after a weekend of use is guessing, and the internet is full of people doing precisely that.
So this is not a quality comparison. It is a capability comparison, and it is the more useful one anyway, because capability differences are checkable and quality claims usually are not. Every fact below was verified against the vendors' own documentation in September 2026, not recalled from memory. Where the docs contradict each other or go quiet, I say so rather than filling the gap. The Claude Code sandbox platform support, for instance, comes straight from Anthropic's sandboxing documentation.
If you want the quality angle, the closest thing I have is a three way model comparison built from one identical spec, which is the method this comparison is still missing.
If you are on Windows and will not use WSL
This is the cleanest difference between the two tools and the one that decides the most arguments.
Claude Code installs and runs natively on Windows. That part is fine. What does not run natively is its sandbox, the feature that lets it execute shell commands without stopping to ask permission for each one. Anthropic's documentation is unambiguous: the sandbox "runs on macOS, Linux, and WSL2. Native Windows is not supported. On Windows, run Claude Code inside a WSL2 distribution."
Codex CLI ships a native Windows operating system level sandbox. No WSL2 layer, no second filesystem, no explaining to a Windows user why their project lives in two places at once.
I want to be honest about how much this matters, because it is easy to overstate. If you are happy to install WSL2, this difference evaporates and you should ignore it. Plenty of my students run Claude Code inside WSL2 without ever thinking about it again after the first hour. But "install a Linux subsystem first" is a genuine barrier for a working professional who just wants to automate a reporting task, and I have watched it end more than one person's first session. If that is you, Codex removes a step that Claude Code cannot.
Verdict: Codex, because its sandbox runs natively on Windows and Claude Code's requires WSL2.
If your team runs mixed AI tools
Both tools read a project instructions file, a plain markdown document that tells the agent how your codebase works. The difference is who else can read it.
Codex reads AGENTS.md. So do Cursor, Copilot and Gemini CLI. It is an open convention rather than one vendor's format, and Codex layers it sensibly: a global file at ~/.codex/AGENTS.md, then every level from your Git root down to your working directory, capped at 32 KiB by project_doc_max_bytes. The precedence rule is worth memorising because people assume the opposite. Per OpenAI's documentation, "files closer to your current directory override earlier guidance because they appear later in the combined prompt."
Claude Code reads CLAUDE.md and does not read AGENTS.md natively. The documented workarounds are importing it with @AGENTS.md from inside your CLAUDE.md, or symlinking the two files. Both work. Neither is something a new team member discovers on their own.
There is an asymmetry here worth naming. Claude Code ships a claude import codex command to bring a Codex project's configuration across. I could not find a reciprocal Codex command going the other way. Read that how you like, but the practical consequence is that migrating toward Claude Code is a supported path and migrating away is a manual one.
If everyone on your team uses the same tool, this section does not apply to you and CLAUDE.md is perfectly good. If four people use four different agents, one file that all four read is worth more than any feature either tool has.
It is worth being concrete about what goes in that file, because the usual failure is not choosing the wrong format, it is writing the wrong content. The file that earns its keep records the things an agent cannot infer by reading the code: which commands actually build and test the project, which conventions differ from the language defaults, and which parts of the codebase will bite you. The file that gets ignored is the one restating what any competent reader could work out in five minutes. Both tools degrade the same way when the file gets long, and both reward brevity for the same reason, so the format argument matters far less than whether anyone maintains the contents.
Verdict: Codex, because AGENTS.md travels between tools and CLAUDE.md does not.
If you are still learning and will make mistakes
This is where I stop being even handed, and I think the evidence supports it.
Claude Code has two features aimed squarely at people who are going to get things wrong. The first is Plan Mode, a permission mode in which, per Anthropic's permissions documentation, "Claude reads files and runs read-only shell commands to explore but doesn't edit your source files." You can send an agent to investigate a codebase with a hard guarantee it will not touch anything. For a nervous beginner that guarantee is worth more than any amount of raw capability.
The second is /rewind, which restores the conversation and the code to an earlier checkpoint. Not just the chat history, the files too. When a student takes a wrong turn twenty minutes into a session, that is the difference between a lesson and a lost evening.
I looked for documented Codex equivalents to both and did not find them. Codex has session resume, which brings a conversation back, and its read-only sandbox mode with an untrusted approval policy gets you something functionally close to Plan Mode if you configure it yourself. What I could not find was a documented feature that rolls file state back to a checkpoint. If it exists and I missed it, that changes this section, and I would rather be corrected than pretend otherwise.
There is a third thing that matters more than either and gets almost no attention: what the tool knows before it starts. Both tools support skills, markdown files that load on demand. In Claude Code only skill names and descriptions load at startup, into a budget of about one percent of the context window, with bodies loading when invoked. I have watched a student build for five sessions with none of it loaded, which is a failure that produces no error at all, and I wrote up how to load and verify skills before you build anything because of it.
Verdict: Claude Code, because it can undo the code as well as the conversation, and a learner needs that more than anyone.
If you want the cheapest capable option in a terminal
Codex has the cheaper floor, and it is not close.
As of September 2026, Codex sits on ChatGPT plans: a free tier with limited access, a Go tier at $8 a month, Plus at $20, Pro at $100 for five times the limits or $200 for twenty times, and Business at $20 per user billed annually. The sign in documentation and the pricing page do not describe the cheapest tiers identically, so check the current pricing page rather than trusting any article, this one included, on exactly where the floor sits.
Claude Code has no free tier at all. It starts at Pro, $17 a month billed annually or $20 monthly, then Max at $100 or $200, then Team at $20 per seat.
Codex also publishes something Anthropic does not: actual message limits. On Plus you get roughly 10 to 100 messages on the flagship gpt-5.6-sol per rolling five hour window, 20 to 170 on gpt-5.6-terra, and 215 to 1,720 on gpt-5.6-luna. Anthropic publishes no equivalent number, deliberately, using relative figures like five times and twenty times Pro instead. Both approaches have a logic to them, but only one lets you plan.
Two more things belong here. Codex has an --oss flag for pointing it at local open source model providers, which I found no Claude Code equivalent for, and which matters if you have hardware or a policy reason to keep inference in house. And if you pinned gpt-5.4 or gpt-5.4-mini in a config file or a CI job, those retired from Codex on 31 August 2026 and you were meant to move to terra and luna respectively. Worth checking before you wonder why something stopped.
On Claude Code's side, usage is shared across Claude Code, the Claude apps and Cowork from one pool, which surprises people who assume the terminal has its own allowance. I went through the rest of that in five things Claude Code pricing does not tell you.
Verdict: Codex, because it has a genuine free and $8 tier and Claude Code starts at $17.
If you have never used either one
Neither, yet.
I mean that literally, and it is the recommendation I give most often. An agentic coding tool writes code faster than you can read it. If you cannot yet look at a diff and say why it is wrong, the tool is not helping you build, it is helping you accumulate things you do not understand at a rate you cannot audit. Both tools are extremely good at producing output that looks finished.
The prerequisite is not a computer science degree. It is being able to read what comes back and form an opinion about it. That is a few weeks of work, not a few years, and it makes everything after it faster.
Once you are past that, I would start on Claude Code, for the undo and the plan mode above rather than for anything about code quality. And if you are not sure which tool you are even running right now, which is far more common than people admit, start with knowing where you are before you pick anything.
Verdict: Neither until you can read a diff, then Claude Code, because its safety rails are built for people who are still learning.
The numbers side by side
All figures verified September 2026. These change often, so check before you buy on the strength of a table in a blog post.
| Codex CLI | Claude Code | |
|---|---|---|
| Cheapest paid tier | $8 a month, Go | $17 a month, Pro billed annually |
| Free tier | Yes, limited access | No, not included on Free |
| Windows sandbox | Native | WSL2 only |
| Project instructions | AGENTS.md, shared with other tools | CLAUDE.md, Claude Code only |
| Undo a bad run | Session resume | /rewind restores conversation and code |
| Published usage limits | Yes, messages per 5 hour window | No, relative figures only |
A few things are close enough that I would not let them decide anything. Both support Amazon Bedrock. Both ship first party GitHub Actions and automated pull request review. Both have skills built on a SKILL.md progressive disclosure design. Both have subagents. Anyone selling you one of those as a differentiator has not checked the other tool recently.
What I tell my students
People type this both ways, Codex vs Claude Code and Claude Code vs Codex, and both phrasings land them in the same pile of comparison posts scored on benchmarks they will never reproduce. Almost nobody who asks me actually has a tool problem. They have an orientation problem, and swapping tools does not fix it. The question underneath is usually "am I doing this right", and the honest answer is that both tools are better than the workflow most people wrap around them.
So the pattern I use is this. If someone is productive with one of them, I do not move them. The switching cost is a week of small frustrations and the gain is usually nothing. If someone is stuck, I look at what the tool knows before it starts, what it is allowed to do, and whether they can undo it, in that order, because those three account for most of what goes wrong. Tool choice comes fourth and it comes a long way behind.
There is one exception where I do push someone to switch, and it is the Windows case above. Watching a professional spend their first session installing a Linux subsystem to use a tool that was sold to them as simple is a bad first hour, and first hours matter more than they should. If that is the wall someone hits, moving them to Codex is a five minute fix rather than a philosophical position.
The other thing I keep having to say out loud: pick one and stay there for a month. The people getting the least out of these tools are usually the ones with three installed, rotating between them every time one produces a bad answer, never accumulating the project context in any of them that would make the next answer better. Both of these tools get substantially more useful once they know your codebase, and neither can do that if you keep starting over somewhere else.
The case where I do recommend against both: if you are trying to learn a language, turn the agent off. Use it after you can write the thing badly by yourself. I have watched capable adults spend a month producing working projects they could not explain, and unwinding that takes longer than learning it properly would have. That is not a criticism of either tool. It is a criticism of using a power tool to skip the part where you learn what the tool is doing.
Frequently Asked Questions
Is Codex better than Claude Code?
Not in general, and anyone answering that question without naming your situation is guessing. Codex is better if you are on Windows without WSL, if your team uses mixed AI tools, or if you need the cheapest entry point. Claude Code is better if you are still learning, because of Plan Mode and /rewind. On raw output quality I have not run the controlled test that would let me answer, so I will not.
Can I use both Codex and Claude Code?
Yes, and plenty of people do. They are separate installs with separate configuration and separate billing, and nothing stops you running one in one project and the other elsewhere. The friction is the instructions file: keep the real content in AGENTS.md and either import it from CLAUDE.md with @AGENTS.md or symlink the two, so you are not maintaining the same guidance twice.
Which one is cheaper?
Codex, at the entry level. It has a free tier and an $8 a month Go tier, where Claude Code starts at $17 a month on Pro billed annually and is not available on the free plan at all. At the top end they converge, both offering $100 and $200 tiers. Per token API pricing is a separate question and depends entirely on which model you run.
Does Codex CLI work on Windows without WSL?
Yes. Codex ships a native Windows operating system level sandbox. Claude Code installs natively on Windows too, but its sandbox specifically requires WSL2, so if you want sandboxed execution on Windows without a Linux subsystem, Codex is the one that does it today.
Most of the people who ask me this question are three weeks from a decision that will not matter, and one conversation away from the thing that will. If you want to work out which of those you are looking at, book a free Discovery Call and bring the project you are actually stuck on.
Related articles
Keep reading on related topics.
Enjoyed this article?
You can master this and more with a dedicated 1-on-1 tutor.
Book a Free Discovery Call