Pick Claude Code if most of your work is reasoning across an existing codebase — refactors that touch thirty files, debugging something with no obvious cause, or any project with conventions you need followed rather than guessed at.
Pick Codex if most of your work is well-specified tasks you would rather delegate than watch — hand it to a cloud sandbox, go do something else, review the pull request when it lands. It is also the obvious choice if your team already runs on ChatGPT.
Most people who use both seriously end up keeping both, because they fail in different places. That is inconvenient rather than indecisive, and it is the honest conclusion.
At a glance
Both tools read your codebase, edit files across it, run commands, and open pull requests. The table is where they diverge.
| Claude Code | Codex | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Models | The Claude family — Opus, Sonnet, Haiku and Fable | The GPT-5.6 family, including the Terra and Luna variants |
| Where it runs | Terminal, VS Code, JetBrains, a desktop app, the web and mobile | CLI, IDE extension, the ChatGPT desktop app, the web and a cloud sandbox |
| Access | A Claude subscription, or an Anthropic API key | A ChatGPT subscription, or an OpenAI API key |
| Project instructions | CLAUDE.md, plus memory it writes itself as it learns your project |
AGENTS.md, an open convention other tools also read |
| Extending it | Skills, hooks, MCP servers, subagents and an Agent SDK | MCP servers, IDE and browser integration |
| Unattended work | Routines on Anthropic's infrastructure, background agents, GitHub and GitLab CI | Cloud tasks in an isolated sandbox, returned as a branch or PR |
| Temperament | Deliberate. Plans first, explains itself, asks before large changes | Fast. Gets to a result quickly and expects review at the end |
Where the work happens
This is the real split, and almost everything else follows from it.
Claude Code assumes you are there. It began as a terminal tool and still behaves like one: it plans before it acts, narrates what it is doing, and stops to ask when a change is bigger than the instruction implied. That is friction if you wanted the job done while you were at lunch, and it is exactly what you want when the job is "figure out why this only breaks in production" — because being able to interrupt a wrong assumption at step two is worth more than a fast answer at step ten.
Codex assumes you have better things to do. Its centre of gravity is delegation: describe the task, hand it to an isolated cloud environment, and review a finished branch later. For well-specified work — migrate this API, add tests to this module, apply this change across twelve services — that is a genuinely better shape than watching an agent think.
Both have since grown into each other's territory. Claude Code added web sessions and scheduled Routines that run without your machine on; Codex runs locally through its CLI and IDE extension. But the defaults still show, and the defaults are what you live with.
How you tell each one your rules
Every serious agentic tool needs somewhere to keep the things you would otherwise repeat in every prompt: the test command, the paths not to touch, the commit message style, the fact that this project uses tabs.
Claude Code reads CLAUDE.md from your project root at the start of every session, and also builds its own memory as it works — noting build commands and debugging findings without you writing them down. Codex reads AGENTS.md, walking from the repository root down to your working directory and layering each file it finds, with a size cap on the combined result.
The mechanics are close enough that the choice between them is not really a factor. The one practical consequence: if you run both agents on one repository, you maintain both files. Most people keep the substance in one and have the other defer to it, which works and is slightly annoying forever.
Surfaces and handoff
Claude Code is the more spread out of the two. The same engine runs in the terminal, VS Code, JetBrains IDEs, a standalone desktop app, the browser and a phone — and crucially, a session can move between them, so a task started on a laptop can be picked up from a browser later. Your CLAUDE.md, settings and MCP servers follow you across all of them.
Codex covers the surfaces most people use — CLI, IDE extension, the ChatGPT app, the web — with the cloud environment as its distinctive one. If your team already lives in ChatGPT, Codex arriving in a tool they have open anyway is a real advantage, and one worth more than a feature-count comparison suggests.
What you actually pay for
Neither tool has a free tier that survives contact with real work, and both offer the same two routes: a flat-rate consumer subscription, or an API key billed per token.
The rule of thumb is unglamorous. Steady daily use is usually cheaper on a subscription, because you stop thinking about tokens and that is worth something on its own. Bursty or automated use is usually cheaper on an API key, because you pay for what you run and nothing when idle. Teams running agents in CI generally end up on API keys regardless of what individuals use.
We have deliberately not printed prices or rate limits here. Both change often enough that a number on this page would be wrong before it was useful — Anthropic and OpenAI publish current figures.
Which one should you use
- the change spans a lot of files and the risk is a wrong assumption, not slow typing
- you are debugging something whose cause is not obvious yet
- the codebase has conventions that matter and you want them followed
- you want to watch the plan before the edits land
- you are wiring agents into your own tooling with hooks, skills or the SDK
- the task is well specified and you would rather not supervise it
- you want a finished branch to review, not a conversation
- the same mechanical change has to land across many services
- your team already works inside ChatGPT every day
- speed matters more than a narrated plan
The case for running both
The pattern among people who use these tools heavily is not that they picked a side. It is that they use one to think and the other to execute — and the cost of that is entirely logistical: two terminals, two instruction files, two mental models, and no shared view of what either one changed.
That logistics problem is what Clodex was built for. It runs both agents in one desktop workspace, on a live preview of the project they are editing, so you can hand a refactor to one and a migration to the other without alt-tabbing between windows — and edit the rendered result directly, with your changes written back into the same source they are working on. It runs on the subscriptions you already have; there is no token markup on top.
That is the pitch, and you should weigh it knowing it is one. The part that is true regardless of what you use to run them: these two tools are not substitutes, and treating the choice as permanent is the actual mistake.
Common questions
Can you use Claude Code and Codex at the same time?
Yes. They are separate programs that edit the same files on disk, so nothing stops you running both against one repository — and each reads its own instructions file, CLAUDE.md for Claude Code and AGENTS.md for Codex. What they do not do on their own is share a screen, so in practice most people alt-tab between two terminals. That is the specific problem Clodex exists to solve.
Is Claude Code better than Codex?
Neither is better outright, and anyone claiming a clean winner is selling something. Claude Code tends to be the stronger choice for repository-wide reasoning, careful refactors and work where following your project's conventions matters. Codex tends to be the stronger choice for speed, for delegating a well-specified task to a cloud sandbox and collecting the pull request later, and for anyone already living inside ChatGPT.
The honest answer is that they fail in different places, which is the best argument for keeping both.
Do you need a paid plan for Claude Code or Codex?
Both require payment, and neither has a meaningful free tier for real work. Claude Code runs on a Claude subscription or an Anthropic API key; Codex runs on a ChatGPT subscription or an OpenAI API key. Subscriptions are usually the cheaper route for steady daily use because they are flat-rate, while API keys bill per token and suit bursty or automated workloads.
What is the difference between CLAUDE.md and AGENTS.md?
They solve the same problem — standing instructions an agent reads before it touches your code — for different tools. CLAUDE.md is Claude Code's; AGENTS.md is Codex's, and it is an open convention several other tools have adopted. Both support layering, so a file at the repository root can be narrowed by another in a subdirectory.
If you run both agents, you maintain both files, and the usual approach is to keep the shared rules in one and have the other point at it.
Does Claude Code or Codex run in the cloud?
Both offer it now, though they arrived from opposite directions. Codex was built around cloud delegation early: hand a task to an isolated sandbox and come back to a finished branch. Claude Code started local-first in the terminal and has since added web sessions, scheduled Routines that run on Anthropic's infrastructure, and the ability to move a session between surfaces.
The practical difference is less about capability than habit — Codex users reach for the cloud by default, Claude Code users reach for the terminal.
- Claude Code documentation — Anthropic's own overview of surfaces, memory, skills, hooks and subagents.
- AGENTS.md guide — OpenAI's specification for Codex project instructions and how they layer.
- Clodex — the desktop workspace that runs both agents on a live preview of your project.
- Clodex FAQ — pricing, what is metered, and what you need before it works.