Codex vs Claude Code
Short answer: neither one is sold on its own, so for most people the subscription they already pay for decides it. Codex CLI comes with a ChatGPT plan. Claude Code comes with a Claude plan. If you're already paying $20 a month to one of these companies, the tool you get for free is almost certainly the right one, and the feature comparison below won't change that.
This page is for the cases where it does change it: you pay for both, you pay for neither, or you're choosing for a team. That's a narrower question than "which is better," and it has clearer answers.
On this page
What they have in common
More than the comparison posts suggest. Both are terminal-first agents that read and write files in your working directory, run commands, and iterate against test output. Both ship an IDE integration. Both speak MCP, so the same tool servers work in either. Both can spawn subagents and run work in parallel. Both are governed by a project-level markdown file you write by hand.
If you've used one, the other takes about an hour to feel normal. The switching cost people imagine is mostly not there — which is worth knowing, because it means this decision is reversible and doesn't deserve a week of research.
How each one is actually sold
This is the part that decides it for most people, and it's usually buried under a feature table.
| Codex CLI | Claude Code | |
|---|---|---|
| Vendor | OpenAI | Anthropic |
| Sold separately? | No — included with ChatGPT plans | No — included with Claude plans |
| Entry paid tier | Go $8 / Plus $20 | Pro ~$17–20 |
| Heavy tier | Pro $100–200 | Max $100 (5×) / $200 (20×) |
| Team seat | Business ~$25 | Team ~$20–25, premium seat ~$100–125 |
| Source available? | Yes — github.com/openai/codex | No |
Two consequences that matter more than any benchmark.
You are probably not choosing between two $20 purchases. You're choosing between a tool you already have and a second $20/month. For a solo developer that difference swamps everything else on this page.
Both bill usage on top, and the parallel features are where it bites. Running several agents at once multiplies token consumption faster than the headcount suggests, because each one resends its system prompt and tool schemas every turn. We measured the shape of this for Claude Code in our subagents guide; the mechanism is the same on either tool. If you turn on fan-out and don't watch the meter, the sticker price stops predicting the bill.
Where they genuinely differ
Codex CLI is open source; Claude Code is not
This is the cleanest factual difference. You can read Codex's source, fork it, and file a PR against the thing you actually run. If you need to audit what an agent does on your machine before letting it near a private repo — or if you work somewhere that requires that — this is not a preference, it's the whole decision.
Claude Code's extension surface is deeper
Skills, subagents, hooks and plugins have had longer to accumulate, and the hook system in particular is a real policy mechanism rather than a convenience: it runs deterministically, outside the model's judgement, and can block a tool call that every other layer would have allowed. If you intend to enforce rules on an agent rather than ask it nicely, that machinery is worth the look — with the caveat that it has a sharp edge that silently defeats most first attempts.
Codex inherits ChatGPT's surface
The flip side. Codex sits inside an account you may already use for non-coding work, with the app, the web UI and the mobile client attached. Claude Code's equivalent story exists too, but if your team already lives in ChatGPT, the account, the billing and the admin console are one thing instead of two.
Both are moving too fast for a feature table to stay true
Codex shipped goal-directed runs and subagents to general availability during July 2026. Claude Code changed its subagent nesting default three times in about a month. We are deliberately not printing a checkbox grid here, because the honest version of that grid is stale within weeks, and a stale grid is worse than none — it's the single biggest defect in the existing comparisons of these two tools.
The third option that bundles both
Rarely mentioned and genuinely relevant if you're buying for a team: GitHub Copilot's CLI is the one product that puts both Claude and OpenAI models under a single seat. One subscription, one admin console, one invoice, and developers pick per task.
The catch is the billing model. Copilot moved from Premium Request Units to token-based AI Credits on 2026-06-01, and agent-mode sessions consume far more than chat. Spending controls do exist — but which one protects you depends on who you are. User-level budgets went generally available the same day and hard-stop with no option to continue past the limit. Organisation and enterprise budgets cap metered charges only, and the setting that actually stops usage at the limit is off by default. If you're buying for a team, turn that on before anyone enables agent mode; we work through where each cap lives in the Cursor vs Copilot comparison.
What changed recently
Comparisons of these two are unusually prone to going stale, and the surrounding landscape shifted enough in 2026 that adjacent advice may be citing products that no longer exist under the names it uses:
- Gemini CLI was retired on 2026-06-18, replaced by Antigravity CLI for individual users. Comparisons that include "Gemini CLI" as a live third option are out of date.
- Windsurf no longer exists under that name — Cognition rebranded it to Devin Desktop on 2026-06-02, and retired the Cascade agent on 2026-07-01.
- AWS Q Developer is being sunset in favour of Kiro; new signups stopped on 2026-05-15.
- Copilot's billing model changed on 2026-06-01, as above.
None of that changes the Codex-versus-Claude-Code answer. It's here because if you're reading several comparison pages today, some of them are describing a market that ended in June.
How to decide
In the order that actually resolves it:
- Already paying for ChatGPT or Claude? Use the one you have. Revisit in three months if it annoys you — switching is cheap.
- Need to read the source of what runs on your machine? Codex. This is the only criterion here that isn't a matter of degree.
- Building enforced guardrails rather than conventions? Claude Code, for the hook system.
- Buying for a team already on GitHub? Look at Copilot's CLI before buying either separately — and set the spending cap immediately.
- Genuinely undecided? Run both for a week on the same real task. Both are free to try at the bottom tier, and one week of your own code tells you more than every benchmark published about them.
Where we fit, briefly
We build UFO, so weigh this accordingly — and this page has no recommendation to sell, because UFO is not an alternative to either of these. If you want a coding agent in your terminal, pick one of the two above and stop reading here.
UFO is a different layer: a team chat where AI agents are members of channels alongside people, each running on a machine you've paired. The reason it exists is the problem that starts after this page's question is settled — you end up with several agents on several models, other people need to see what they did, and work outlives the session it started in. Codex and Claude Code are both things you can run inside that, not things it replaces.
It's also why we can write pages like this one: comparing two agents on the same real task is what the product does, so we're reporting rather than speculating.
Sources
Pricing and capability claims are from vendor documentation read on 2026-07-31. Dated events link to the announcement that established them. Figures in this category change frequently — verify before committing budget.
- developers.openai.com/codex · github.com/openai/codex
- code.claude.com/docs/en/overview · anthropic.com/pricing
- docs.github.com — about Copilot CLI
- Google — transitioning Gemini CLI to Antigravity CLI
- Cognition — Windsurf
- AWS — Q Developer FAQs
Not affiliated with OpenAI, Anthropic or GitHub. If something here is wrong or has gone stale, tell us and we'll fix it.