Skip to content

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

OpenAI Codex pricing for the Codex vs Claude Code comparison: Free $0 and Go $8 with GPT-6 Luna in the desktop app, Plus $20 with Codex on the web, in the CLI, the IDE extension and iOS, and Pro from $100 a month
Free and Go only get GPT-6 Luna in the desktop app; the CLI, IDE extension and web start at Plus. OpenAI's Codex pricing page, captured October 2026; the four plans and prices matched on November 18, 2026.

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 CodeCodex
Where it runsTerminal, Claude desktop app, VS Code and JetBrains, web, mobile, SlackChatGPT desktop app, terminal (Codex CLI), IDE extension, web, iOS, Slack
Free accessNoLimited, in the ChatGPT desktop app, with GPT-6 Luna
Cheapest full accessClaude Pro, $20 a monthChatGPT Plus, $20 a month
ModelsOpus 5.5 by default; Fable 5.2 (new in November 2026) with /model fable; Sonnet 5.5 and Haiku 5.5 for lighter workGPT-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 instructionsCLAUDE.md, or AGENTS.md when there is no CLAUDE.mdAGENTS.md
Safety modelPermission modes, an optional Bash sandbox, a classifier in auto modeAn operating system sandbox plus an approval policy
UndoBuilt-in checkpoints with /rewindRevert in the app's review pane or with Git
Run from a scriptclaude -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:

Codex vs Claude Code cost per task, in USD at API rates
  • Codex, GPT-6.2 Sol xhigh (score 50)$0.90
  • Codex, GPT-6.1 Sol max (score 52)$1.51
  • Claude Code, Fable 5.2 medium (score 53)$2.89
  • Codex, GPT-6.2 Astra max (score 53)$5.12
  • Claude Code, Fable 5.2 high (score 58)$7.51
  • Claude Code, Opus 5.5 max (score 58)$12.61
  • Claude Code, Fable 5.2 xhigh (score 58)$15.47

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):

Terminal
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:

PlanPriceWhat you get for coding
ChatGPT Free or Go$0 or $8 a monthCodex in the desktop app with GPT-6 Luna, subject to rollout
ChatGPT Plus$20 a monthCodex on the web, CLI, IDE extension and iOS, with GPT-6.2 Sol and Astra limits listed
ChatGPT Pro$100, $200 or $500 a monthMore usage, no five-hour limit for now (Codex changelog, November 17, 2026)
Claude Pro$20 a month, or $200 a yearClaude 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:

Local Codex messages per five hours on ChatGPT Plus
17 to 180

with GPT-6.2 Sol

6 to 50

with GPT-6.2 Astra

15 to 160

with GPT-6.1 Sol

350 to 3,000

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 contentsAGENTS.md rules followed
AGENTS.md only3 of 3 runs
AGENTS.md plus a two-line CLAUDE.md0 of 3 (it wrote dates as 2026-11-20)
CLAUDE.md whose first line is @AGENTS.md3 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:

  1. Keep your shared rules in AGENTS.md. Codex reads it, and so does Claude Code while there is no CLAUDE.md.
  2. If you add a CLAUDE.md, make @AGENTS.md its first line. Without it, Claude Code silently drops the shared rules.
  3. Or set Project instructions to claude-md-and-agents-md in 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 situationBetter pickWhy
You already pay for ChatGPT PlusCodex firstIt costs nothing extra; try it on real work first
You have never coded and want a site or automationClaude CodeCheckpoints and plan mode make mistakes cheap to undo
You want to start for $0CodexChatGPT Free includes limited Codex in the desktop app
You pay per token with an API keyCodex$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 tasksClaude CodeA 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?

Your project has an AGENTS.md and you add a CLAUDE.md. What happens to the AGENTS.md rules in Claude Code?

Which ChatGPT plan is the cheapest way to use the Codex CLI with a subscription?

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.

No spam. One click to unsubscribe. We use your email to send you this bonus, new guides and news about our courses.

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