Neither one wins outright. On SWE-bench Pro, the benchmark built from bugs that sprawl across several files, Anthropic’s Opus 4.8 scores 69.2 and OpenAI’s GPT-5.5 scores 58.6. Flip to terminal work and OpenAI takes the board. My engineers and I run both every day, which is the honest answer to the question.
What Claude Code and Codex are
Both are coding agents you install on your computer. Talk to ChatGPT or Claude in a chat window and the interaction is words in, words out: the model can write code, but it cannot press go and it cannot see what broke. You become the courier: copy, paste, run it, watch it fail, paste the error back, go again. Claude Code and Codex get your files, your terminal and permission to run the code, so the agent reads its own error and keeps going until the thing works.
The model inside each one is the model you already talk to. Claude Code runs Anthropic’s Claude, Codex runs OpenAI’s GPT. Everything built around the model, the part that lets it take actions on your behalf, is the harness, and the harness is what you are choosing between.
Claude Code runs on your machine, Codex runs in OpenAI’s cloud
Claude Code is built around your machine. By default it runs in your terminal, on your real files, in your real setup. You watch every step and your code stays with you.
Codex is built around the cloud. Its signature move is to take the task to OpenAI’s servers: it spins up its own private computer, loads a copy of your project onto it, and works there by itself.
Both do a bit of both now. Claude Code has a cloud option and Codex has a local one. The default is the bit each team leads with, and the default is what you live with day to day.
Claude Code vs Codex: what the benchmarks show
SWE-bench hands the agent real bugs from real software projects and checks whether the agent fixes them alone. It ships in two versions of unequal difficulty, which is how both companies get to claim a win. Verified is the cleaner, single-file set, and there the two sit close enough that the lead changes hands with each release. Pro is the harder one, and it looks like production code.
Scores below were pulled in July 2026 and they move every few weeks, so check the date before you quote them. Fable 5, Anthropic’s stronger coding model, is not in the table: it was taken off the market three days after launch and has not come back. It scored 80.3 on SWE-bench Pro while it was up.
| Benchmark | Claude Code | Codex |
|---|---|---|
| SWE-bench Pro, bugs spread across multiple files | 69.2 (Opus 4.8) | 58.6 (GPT-5.5) |
| Terminal Bench, working the command line unaided until a job is done | 85 (Opus 4.8) | 1st place (GPT-5.6 Soul), half a point ahead of Kimi K3 and both of those above 85 |
Ten and a half points on Pro is the whole reason hard debugging goes to Claude Code. Terminal Bench is the command line side of the job: installing tools, running builds, standing up servers, shipping the thing. Codex was built to go off and run jobs on its own, so that work is what it was designed for.
Is Codex cheaper than Claude Code?
For us, yes, and the sticker price on a monthly plan is not where you see it. A $20 chat plan is subsidised by the company selling it. An agent working all day gets billed per token instead, and 100 tasks that fit inside a $20 plan cost $60 to $100 through the API, which is three to five times the plan price for the same output. That gap is the real cost of running either one, and it is covered in subscription vs usage.
Per million tokens, Opus 4.8 runs $5 in and $25 out. Fable 5, if it returns, runs $10 and $50, double that. OpenAI put its last two releases into making the model cheaper to run rather than smarter, and that is what shows up on the bill at the end of the month.
Which one to reach for
I am a product person, so Claude Code is my daily driver. My CTO is the opposite. He lives in the architecture and runs Codex. Three things decide it for us: speed, quality, cost. Everything else, both handle fine.
Codex is the better architect, so it gets the plan and not the build. Claude Code does the product planning and writes the spec. Then Codex reads that spec before a line of code exists and argues with it, and what it flags is what the spec left out rather than what the spec got wrong. Two dispatchers opening the same job at the same time. The data already sitting in the old system that nobody said how to move. Claude Code fills a hole like that with a reasonable guess and keeps moving. Codex stops and asks.
Claude Code wins on speed and on the quality of what it ships. For front-end work, the part of the software a person looks at and clicks, it is the one I trust.
One more reason I stay on Claude Code: Anthropic ships first. The terminal agent itself came from them. So did MCP, the standard that lets an agent plug into your other tools, and skills, the instructions an agent loads only when a job needs them. Anthropic ships it, and a few weeks later everybody copies it. The newest one is dynamic workflows, which lets the agent run toward a goal on its own for far longer, making its own decisions on the way. What that buys you day to day is in the Claude Code lesson.
What to ask your developer or agency
If a developer or an agency is building software for your business, a dispatch board for your HVAC crews or a portal your property managers log into, you are not the one picking the tool. Two questions are yours. Which one are they using, and did the other one review the spec before the build started. That review costs an hour of tokens. Skipping it is what produces the rewrite that lands two weeks in, when the data model turns out to be wrong. Neither answer should move your price, because the difference between two seats is smaller than a week of rework.
Questions people ask about Claude Code and Codex
Can you run Claude Code and Codex together?
On the same project, yes, and that is how we work: one writes the spec, the other tears it apart, then the faster one builds. Pointing both at the same files in the same minute is the thing to avoid, because two agents editing one file overwrite each other.
Which one is better for front-end work?
Claude, for anything a person looks at and clicks. Arena’s front-end leaderboard is scored by humans comparing two interfaces side by side, and on it Anthropic’s Fable 5 sits above OpenAI’s Soul. Neither holds the top spot: Kimi K3 does.
Do you need to write code to use either one?
No, and that is what catches people out. Both take a plain-English instruction and change your files. If you cannot read the change, you cannot check it, so the skill worth having as a non-developer is reading the plan the agent proposes before you approve it.