Codex vs Claude Code (2026): Benchmarks, Pricing and Limits
Benchmark scores, time and API cost per task (Artificial Analysis index v2.1), both pricing tables and usage limits, rechecked November 22, 2026, plus two Claude Code tests we logged: what one small real task cost, and whether one AGENTS.md file can steer both agents.
By Yotam DahanUpdated 9 min readClaude Code
Codex vs Claude Code: Claude Code scored higher in Artificial Analysis's independent coding agent benchmark (58 to 53), while Codex was faster and cheaper: 25 minutes and $5.12 per task in API terms on GPT-6.2 Astra, against 53 minutes and $15.47 for Claude Code on Fable 5.2 (checked November 18, 2026). Pick Codex if you already pay for ChatGPT or want cheap, fast runs, and Claude Code for harder work you want to supervise step by step. Both start at $20 a month, and Codex also has a limited free tier.
What is the difference between Codex and Claude Code?
| Claude Code | Codex | |
|---|---|---|
| Where it runs | Terminal, Claude desktop app, VS Code and JetBrains, web, mobile, Slack | ChatGPT desktop app, terminal (Codex CLI), IDE extension, web, iOS, Slack |
| Free access | No | Limited, in the ChatGPT desktop app, with GPT-6 Luna |
| Cheapest full access | Claude Pro, $20 a month | ChatGPT Plus, $20 a month |
| Models | Opus 5.5 by default; Fable 5.2 (new in November 2026) with /model fable; Sonnet 5.5 and Haiku 5.5 for lighter work | GPT-6.2 Sol for everyday work and GPT-6.2 Astra for harder projects (both added November 17, 2026); GPT-6.1 Sol and GPT-6 Luna stay available |
| Project instructions | CLAUDE.md, or AGENTS.md when there is no CLAUDE.md | AGENTS.md |
| Safety model | Permission modes, an optional Bash sandbox, a classifier in auto mode | An operating system sandbox plus an approval policy |
| Undo | Built-in checkpoints with /rewind | Revert in the app's review pane or with Git |
| Run from a script | claude -p "..." | codex exec "..." |
For a beginner, undo is the difference that matters most: Claude Code's checkpoints roll back a bad turn without Git, while Codex leans on its review pane and Git. GPT-5.5 retired from Codex for ChatGPT sign-ins on October 14, 2026, so check old settings for gpt-5.5 (OpenAI's models page, checked November 22, 2026).
How to install Codex CLI (and Claude Code)
On Mac or Linux, run curl -fsSL https://chatgpt.com/codex/install.sh | sh; on Windows, irm https://chatgpt.com/codex/install.ps1 | iex in PowerShell, or use npm (npm install -g @openai/codex). Then run codex in your project folder and choose Sign in with ChatGPT. Claude Code installs the same way with curl -fsSL https://claude.ai/install.sh | bash. From there, Codex CLI vs Claude Code is mostly a matter of names: codex and claude start a session, and the table above maps the rest.
Is Codex faster than Claude Code?
Yes. For the Codex vs Claude Code benchmarks, Artificial Analysis runs both agents on the same tasks for its Coding Agent Index v2.1 (FrontierCode-AA 2.0, Terminal-Bench 4.1 and SWE-Atlas-QnA-AA). On the headline settings Codex with GPT-6.2 Astra took 25 minutes and 4.7 million tokens per task; Claude Code with Fable 5.2 on xhigh took 53 minutes and 9.8 million tokens, and scored higher (58 to 53, with a tie on Terminal-Bench at 64). (Version 2.0 scores, quoted here until November 18, 2026, aren't comparable.) Effort settings change cost far more than score:
From the model variants table on Artificial Analysis, Coding Agent Index v2.1, checked November 18, 2026. Time per task in the same order: 12.6, 21.9, 15.1, 25.1, 31.3, 65.3 and 53.3 minutes.
- Fable 5.2 on high effort kept the top score at half the cost of xhigh ($7.51 against $15.47), in 31 minutes instead of 53.
- Fable 5.2 on medium, its default, matched Codex's best score (53) for $2.89.
- Codex stays the budget pick: GPT-6.1 Sol Codex runs scored 52 for $1.51, about a tenth of Claude Code's top setting.
Neither agent solved every task, so review what it builds.
What does a small real task cost in Claude Code?
Most readers will ask for something smaller than a benchmark task, so we ran test prompt 3 from this guide's bonus kit ("Add a booking request form with name, phone, preferred date and a note...") on a one-page salon site, twice, in Claude Code 2.1.303 on Opus 5.5: 47 and 43 seconds, 8 turns each, about 42,000 mostly cached input tokens and under 3,000 output tokens, $0.12 per run at API list price. Run 1's own JSON output (abridged):
claude -p --model claude-opus-5-5 --permission-mode acceptEdits --output-format json "Add a booking request form with name, phone, preferred date and a note..."
"duration_ms": 47340, "num_turns": 8, "output_tokens": 2986, "total_cost_usd": 0.1212
Both runs added a labelled form with past dates blocked, kept the footer the rules file said not to touch, and warned that on a static page the requests go nowhere until you connect a form service. Run 1 also flagged that the date picker still accepts Sundays and Mondays, when the salon is closed.
Codex vs Claude Code pricing
OpenAI Codex pricing is tied to ChatGPT plans:
| Plan | Price | What you get for coding |
|---|---|---|
| ChatGPT Free or Go | $0 or $8 a month | Codex in the desktop app with GPT-6 Luna, subject to rollout |
| ChatGPT Plus | $20 a month | Codex on the web, CLI, IDE extension and iOS, with GPT-6.2 Sol and Astra limits listed |
| ChatGPT Pro | $100, $200 or $500 a month | More usage, no five-hour limit for now (Codex changelog, November 17, 2026) |
| Claude Pro | $20 a month, or $200 a year | Claude Code with Opus 5.5 by default |
| Claude Max | $100 a month (5x Pro) | More usage, Fable within weekly limits |
| Claude Ultra | $200 a month (10x Pro a week) | No five-hour limit on verified accounts |
Sources: OpenAI's Codex pricing and Claude's pricing page, checked November 22, 2026; our Claude Code pricing guide covers every Claude option.
Codex vs Claude Code usage limits
Both meter your plan in five-hour windows with weekly limits on top, but only OpenAI publishes Codex usage limits in advance:
with GPT-6.2 Sol
with GPT-6.2 Astra
with GPT-6.1 Sol
with GPT-6 Luna
OpenAI's own estimates from its Codex pricing page, checked November 22, 2026. They are ranges, not fixed limits.
Check where you stand with /usage in Claude Code, or /status in Codex. At the limit, Claude Code waits for the reset or continues on usage credits if you turned them on; Codex finishes the current turn, then you buy credits or wait. Our guide to Claude Code usage limits covers resets and the habits that make a plan last.
Can one AGENTS.md file steer both agents?
Codex reads AGENTS.md. Anthropic's memory docs say Claude Code reads it too, but only when the folder has no CLAUDE.md, so we tested it. Each AGENTS.md held a house rule (write dates as "6 November 2026") and a sign-off line; tools were off, so Claude Code could only follow what it loaded. Three runs per setup, Opus 5.5:
| Folder contents | AGENTS.md rules followed |
|---|---|
| AGENTS.md only | 3 of 3 runs |
| AGENTS.md plus a two-line CLAUDE.md | 0 of 3 (it wrote dates as 2026-11-20) |
CLAUDE.md whose first line is @AGENTS.md | 3 of 3 runs |
The same setups in Spanish, Portuguese and French, 36 runs in all, gave the same result: Claude Code never loaded AGENTS.md next to a CLAUDE.md. So:
- Keep your shared rules in AGENTS.md. Codex reads it, and so does Claude Code while there is no CLAUDE.md.
- If you add a CLAUDE.md, make
@AGENTS.mdits first line. Without it, Claude Code silently drops the shared rules. - Or set Project instructions to
claude-md-and-agents-mdin Claude Code's/config(memory docs above, checked November 8, 2026). We did not test this setting; our guide to the CLAUDE.md file explains it.
A rules file that silently stops loading is the kind of mistake that costs a beginner an afternoon, which is why writing and checking one is a core lesson in our Claude Code course. The test above is Claude Code only; we make no claim about how Codex handles the same files.
Codex vs Claude Code: which is better?
Is Codex better than Claude Code? Not on quality: Claude Code's best settings beat every Codex setting on the benchmark (58 to 53). Codex wins on speed and API cost, and on price if you already pay for ChatGPT:
| Your situation | Better pick | Why |
|---|---|---|
| You already pay for ChatGPT Plus | Codex first | It costs nothing extra; try it on real work first |
| You have never coded and want a site or automation | Claude Code | Checkpoints and plan mode make mistakes cheap to undo |
| You want to start for $0 | Codex | ChatGPT Free includes limited Codex in the desktop app |
| You pay per token with an API key | Codex | $1.51 per task on GPT-6.1 Sol (score 52), against $7.51 for Claude Code's cheapest 58 |
| You want the strongest results on hard tasks | Claude Code | A higher benchmark score than any Codex setting |
If an AI editor is on your list, see Claude Code vs Cursor; for the whole field, see AI coding agents compared.
Quick check0 of 3 correct
In Artificial Analysis's benchmark, which agent had the lower API cost per task?
Not quite.
Codex with GPT-6.1 Sol cost $1.51 per task and GPT-6.2 Astra $5.12. Claude Code's cheapest setting with its top score, Fable 5.2 on high effort, cost $7.51.
Your project has an AGENTS.md and you add a CLAUDE.md. What happens to the AGENTS.md rules in Claude Code?
Not quite.
In our 36 runs, a CLAUDE.md in the folder made Claude Code skip AGENTS.md every time, and an @AGENTS.md line at the top of CLAUDE.md brought the rules back every time.
Which ChatGPT plan is the cheapest way to use the Codex CLI with a subscription?
Not quite.
Free and Go include Codex only in the ChatGPT desktop app. The CLI, IDE extension and web version start at Plus, $20 a month.
What to do next
Run one real task in both agents this week, on separate Git branches, with the same brief and the same AGENTS.md. Count the corrections each one needed and note the usage it took, not just the speed; the free kit below has the branch routine, six test prompts and a scoring sheet.
If Claude Code is the one you keep, the Claude Code course builds on exactly this setup: rules files, plan mode and checkpoints, taught for people who don't code. If Codex wins, keep the AGENTS.md you wrote and carry on there.
Shared AGENTS.md starter and fair-test kit
One instructions file both agents can read, a Git routine for clean comparisons, and six test prompts with a scoring rubric.
Enter your email and the full section opens right here.
Frequently asked questions
Is Codex free?
Partly. ChatGPT Free and Go include Codex in the ChatGPT desktop app with GPT-6 Luna, subject to OpenAI's rollout. The Codex CLI, IDE extension and web version start with ChatGPT Plus at $20 a month, or you can pay per token with an API key.
Can I use Claude Code with a ChatGPT subscription?
No. Claude Code signs in with a Claude plan, an Anthropic Console account or a supported cloud provider, and Codex signs in with ChatGPT or an OpenAI API key. Each subscription only covers its own company's agent.
Can I use Codex with an API key instead of ChatGPT?
Yes, for local work. The Codex desktop app, CLI and IDE extension accept an OpenAI API key, billed at standard API rates through your OpenAI Platform account, which suits scripts and CI jobs. Codex cloud still needs a ChatGPT sign-in.
Can I move my Codex setup into Claude Code?
Yes. Run /import codex in Claude Code to bring over instruction files, MCP servers, commands, subagents and skills, and add --dry-run to preview first. Going the other way, Codex's /import brings in a Claude Code or Cursor setup and up to 50 chats from the last 30 days.
Is Codex open source?
The Codex CLI is: OpenAI publishes it under the Apache 2.0 license, so you can read, change and reuse the code. Claude Code is not; its public repository says all rights are reserved and use falls under Anthropic's Commercial Terms (both checked November 22, 2026).
How much does it cost to use Codex and Claude Code together?
At the entry plans, $40 a month before tax: ChatGPT Plus ($20) for Codex and Claude Pro ($20) for Claude Code, checked November 22, 2026. Each plan meters its own usage, so when one agent reaches its five-hour limit you can carry on in the other.
Keep reading
Claude Code Pricing 2026: Pro vs Max vs Ultra, Team & API
Claude Code pricing, checked November 2026: Pro $20 a month, Max $100, Ultra $200, Team seats from $20, API per token, plus Pro vs Max and which plan to pick.
Claude Code · 16 min readClaude vs ChatGPT for Business: Which to Pay For in 2026?
Claude vs ChatGPT for business: plans and App Store prices, context limits, agents, images and privacy compared, plus a bake-off to pick the one to pay for.
Claude Code · 16 min readClaude Code vs OpenCode (2026): Cost, Models and Privacy
Claude Code vs OpenCode in 2026: OpenCode is free and open source, but Claude Pro won't work in it. Compare benchmarks, real costs, local models and privacy.
Claude Code · 12 min read