Claude Code vs Codex: Claude Code scores 62 on Artificial Analysis, and Codex gets within 8 points for 87% less per task

In brief

Claude Code is the stronger coding agent and Codex is the cheaper one, as of November 2026. On Artificial Analysis's Coding Agent Index, Claude Code with Opus 5.5 scores 62 against 55 for Codex with GPT-6 Astra. Codex with GPT-6.1 Sol scores 54 at $1.50 a task, 87% less than Claude Code's $11.42.

A terracotta Claude starburst on a tall black plinth and a silver OpenAI knot on a lower one, side by side in a charcoal studio, with a thin line of white light running along the floor between them.

Is Codex better than Claude Code?

No. Claude Code beats Codex by 7 points on every coding agent test Artificial Analysis runs, and Codex wins on cost and speed. Artificial Analysis runs both agents on the same tasks, with Anthropic's and OpenAI's top models at maximum effort. We read its Claude Code vs Codex page on 1 November 2026:

Claude Code leads Codex by 7 points on every Artificial Analysis test
Codex, GPT-6 AstraClaude Code, Opus 5.50102030405060score out of 100, read 1 Nov 2026Coding Agent Index5562+7 pointsFrontierCode v1.14956+7 pointsTerminal-Bench 4.05663+7 pointsSWE-Atlas QnA5966+7 points

The index is the average of the three tests below it, each rounded to a whole number on that page. FrontierCode asks if a maintainer would merge the agent's change to a real repo. Terminal-Bench gives it jobs to do in a shell, and SWE-Atlas asks questions about how a codebase works. Claude Code wins all three. It also costs more. Here's every model Artificial Analysis lists for each agent from Anthropic and OpenAI:

Agent and model, Artificial Analysis, read 1 November 2026Coding Agent IndexAPI cost per taskTime per taskTokens per taskTurns per task
Claude Code, Claude Opus 5.5 (max)62$11.421.0 hours14.5M146.4
Claude Code, Claude Sonnet 5.5 (max)59$13.301.3 hours24.1MNot listed
Claude Code, Claude Fable 5.1 (max)58$11.5335.3 minutes6MNot listed
Claude Code, Claude Haiku 5.5 (max)37$2.671.2 hours16.1MNot listed
Codex, GPT-6 Astra (max)55$7.0424.8 minutes3.2M39.4
Codex, GPT-6.1 Sol (max)54$1.5023.7 minutes3.9MNot listed
Codex, GPT-6.1 Terra (xhigh)48$0.6916.4 minutes6.9MNot listed
Codex, GPT-6 Luna (max)31$0.1621.3 minutes8.9MNot listed

GPT-6.1 Sol is the row to look at. It scores one point under Astra for about a fifth of Astra's cost, and every Claude Code run that beats it costs at least $11.42. So Claude Code's 8 extra points cost 7.6 times as much per task, which makes Codex 87% cheaper. Claude Code also works longer. Its Opus 5.5 run took an hour and 146 turns per task, against 25 minutes and 39 turns for Codex on Astra, and it used 4.5 times the tokens.

Sonnet 5.5 is the trap. Anthropic charges half as much per token for Sonnet as for Opus, yet in Claude Code it cost more per task, $13.30 against $11.42, because it burned 24.1 million tokens to finish. Artificial Analysis prices every task at pay-per-token API rates. So the cost column is what an API key pays, not what a plan costs. If you're on a subscription, tokens per task tells you more about how fast you'll reach your limit.

How much do Claude Code and Codex cost each month?

Both start at $20 a month: Claude Code on Claude Pro and Codex on ChatGPT Plus. Only Codex has a free tier, and it's a small one. We read every row below from Anthropic's pricing page and OpenAI's Codex pricing page on 1 November 2026. US list prices, before tax:

Monthly price, US, read 1 November 2026Anthropic plan with Claude CodeOpenAI plan with Codex
$0Claude Free: no Claude CodeChatGPT Free: GPT-6 Luna in the desktop app, "subject to rollout"
$8No planChatGPT Go: same Codex access as Free
$20Claude Pro ($17 a month billed yearly): a 5-hour session limit and a weekly limitChatGPT Plus: web, CLI, IDE extension, iOS, code review and Slack; 15 to 160 GPT-6.1 Sol messages per 5 hours
$100Claude Max: 5x Pro every five hours and every weekChatGPT Pro $100: no 5-hour limit, weekly limits may apply
$200Claude Ultra, formerly Max 20x: 10x Pro's weekly usage, no 5-hour limit once verifiedChatGPT Pro $200: no 5-hour limit, weekly limits may apply
$500No planChatGPT Pro $500: adds Ultrafast mode
Per seat for a teamTeam Standard $25, or $20 billed yearly; Premium $125, or $100Business $25, or $20 billed yearly for 2 or more users
Pay as you goConsole API key: $4 in and $20 out per million tokens on Opus 5.5API key at standard API rates, in the CLI, SDK and IDE extension

At $100, only OpenAI drops the 5-hour window. At $200, both do. Anthropic renamed Max 20x to Ultra on 30 October 2026, and its Ultra help article says: "The Max 20x plan is now called the Ultra plan." The same article adds, "Verified Ultra accounts don't have a five-hour limit." OpenAI's page says the same of every Pro tier: "Pro plans currently have no five-hour limit." Max, at $100, keeps its window.

The old name said 20x. Anthropic now sizes Ultra at 10 times Pro's weekly usage, at the same $200. OpenAI doesn't print a multiple for any Pro tier on its Codex page. Neither vendor publishes a weekly cap in messages. The full plan math for each side is in Claude Code pricing and ChatGPT Plus vs Pro, and the two $100 to $200 tiers meet head to head in Claude Max vs ChatGPT Pro.

Which has better usage limits, Claude Code or Codex?

Codex has the limits you can plan around, because OpenAI prints a range per model and Anthropic prints none. For Plus and Standard Business, OpenAI estimates 15 to 160 local GPT-6.1 Sol messages per 5 hours, 5 to 45 on GPT-6 Astra and 350 to 3,000 on GPT-6 Luna. It also warns, "These estimates are not fixed message limits." Anthropic sizes each Claude plan as a multiple of Pro and never says what Pro holds.

OpenAI meters Codex in credits per million tokens. GPT-6 Astra costs 250 credits per million input tokens and GPT-6.1 Sol costs 50, so Astra drains a plan five times faster per token. Cloud tasks use more of the allowance than local ones, per the same page. Codex shares its pool with ChatGPT Work. OpenAI doesn't list ordinary ChatGPT chat as part of it.

Claude Code shares its pool with Claude chat. Anthropic's Pro and Max help page says the limits "are shared across Claude and Claude Code, meaning all activity in both tools counts against the same limits." A long chat in the morning leaves less for the terminal. That same page says the monthly API credits on Ultra "can't be used in Claude Code." How each window resets, and what each wall message means, is in Codex usage limit and Claude Code usage limit.

How do Claude Code and Codex work differently?

Claude Code and Codex run in the same places: a terminal, an IDE, a desktop app and the web. They differ in defaults. We compiled this from Anthropic's Claude Code docs, OpenAI's Codex docs and the openai/codex repository, read on 2 November 2026:

As of November 2026Claude CodeCodex
InstallNative installer, Homebrew, WinGet or aptInstall script, npm install -g @openai/codex, or Homebrew
Where it runsTerminal, VS Code, JetBrains, desktop app, claude.ai/code, iOS and Android apps, Slack, GitHub ActionsTerminal, VS Code, Cursor and Windsurf extension, desktop app, chatgpt.com/codex, iOS, Slack, code review
Default modelOpus 5.5 on Pro, Max, Ultra, Team, Enterprise and the APIA "recommended model" OpenAI picks
SandboxOff by default; turn it on with /sandbox; macOS, Linux and WSL2 onlyOn by default; Seatbelt on macOS, bubblewrap on Linux, a Windows sandbox in PowerShell
Instruction fileCLAUDE.md, or an existing AGENTS.mdAGENTS.md
Other modelsThird-party providers in the terminal, VS Code and JetBrains; Artificial Analysis tested it with Qwen3.8 MaxAny compatible Responses API endpoint; Artificial Analysis tested it with DeepSeek V4.1 Flash

The sandbox row matters most if you let an agent run unattended. Anthropic's sandboxing page says "The sandbox is off by default," so Claude Code relies on its permission prompts until you run /sandbox. On native Windows it can't sandbox at all: it "runs commands unsandboxed." OpenAI's sandboxing page says "The default permissions mode applies sandboxing automatically." On macOS that needs no setup, Linux needs bubblewrap installed first, and Windows gets its own sandbox in PowerShell.

The instruction row makes switching cheap. Claude Code's docs say it can read an AGENTS.md "in place of a CLAUDE.md," so one file in your repo briefs both agents. Codex is also the one you can read. Its CLI is open source under Apache-2.0, with 132.8k stars on GitHub. Claude Code's strength is the session itself. It plans, edits across files and checks its work over many more turns, which is where the 146 against 39 above comes from.

Both also take work you hand off and check later. Claude Code on the web lets you "kick off long-running tasks and check back when they're done" at claude.ai/code. Codex Web at chatgpt.com/codex is OpenAI's cloud agent, and OpenAI's pricing page warns that its cloud tasks "may use more of your allowance than local messages."

Should you pick Claude Code or Codex?

Pick Claude Code if you want the highest score and you're paying a flat plan. Pick Codex if you pay per token or want the sandbox on from the start. Here's how that plays out by budget.

  1. $0. Codex. ChatGPT Free gets GPT-6 Luna in the desktop app where it has rolled out, and Claude Free has no Claude Code.
  2. $20. Either. Claude Pro gives you Opus 5.5, the top scorer, with a 5-hour wall shared with chat. ChatGPT Plus gives you GPT-6.1 Sol, 8 points lower, with a published range per window.
  3. $100. Codex, if the 5-hour wall is what stops you. ChatGPT Pro $100 has none, and Claude Max still does.
  4. $200. Either. Both drop the 5-hour window now (Ultra once Anthropic verifies your account), so pick on the agent you prefer.
  5. An API key. Codex on GPT-6.1 Sol, at $1.50 a task against $11.42 for Claude Code on Opus 5.5.

Claude Code loses on cost per task. Codex loses on quality: its best score, 55, sits 7 points under Claude Code's 62. You can run both, since one AGENTS.md serves the pair, and a $20 plan of each costs $40.

Whizi, which publishes this page, includes neither Claude Code nor Codex. It's a chat app, so it won't run in your terminal or edit your repo. What Whizi Pro does give you is Claude Opus 5.5, Claude Sonnet 5.5 and GPT-6.1 Sol in one chat for $29.99 a month, from 2,500 credits. That's more than Claude Pro or ChatGPT Plus alone, so if you want an agent, buy one of those instead.

Workflow checklist
  • Try Codex free first: ChatGPT Free gets GPT-6 Luna in the desktop app where OpenAI has rolled it out
  • On a $20 plan, pick Claude Pro for Opus 5.5's top score or ChatGPT Plus for published per-window ranges
  • If the 5-hour wall stops you, price ChatGPT Pro $100 or Claude Ultra at $200, the plans without one
  • On an API key, start Codex on GPT-6.1 Sol, which Artificial Analysis prices at $1.50 a task
  • Keep one AGENTS.md in the repo so Claude Code and Codex both read the same instructions
  • Turn on /sandbox in Claude Code before you leave it running unattended
Common questions

Frequently asked questions

Is Codex free?

Partly. OpenAI's Codex pricing page lists GPT-6 Luna in the ChatGPT desktop app on the Free and $8 Go plans, "subject to rollout," as of November 2026. The CLI, IDE extension and cloud tasks start on Plus at $20. Claude Code has no free tier at all.

Does Codex use fewer tokens than Claude Code?

Yes. Artificial Analysis measured Codex on GPT-6 Astra at 3.2 million tokens per task, against 14.5 million for Claude Code on Opus 5.5, read 1 November 2026. Claude Code took 146 turns per task to Codex's 39. On an API key, that gap is most of the price difference.

Can Claude Code and Codex share the same instructions?

Yes. Codex reads AGENTS.md, and Anthropic's Claude Code docs say Claude Code can read an existing AGENTS.md in place of a CLAUDE.md. One file in the repo root briefs both agents, which makes it cheap to try each on the same task.

Does Whizi include Claude Code or Codex?

No. Whizi is a chat app with Claude and GPT models, not a coding agent, and it can't edit your repo or run commands. For an agent, you need a Claude plan from $20 for Claude Code, or a ChatGPT plan for Codex.