Codex vs Claude Code

Both now sell $20, $100 and $200 plans, and their top models list at the same $8/$40 API price. Plans, limits, models and features as of 21 Nov 2026.

Cover for Codex vs Claude Code: a scoreboard of rows, Codex on the left and Claude Code on the right, as of 21 Nov 2026. Plans: $20 / $100 / $200 / $500 vs $20 / $100 / $200. Top model API price per million tokens: $8 / $40 (GPT-6.2 Astra) vs $8 / $40 (Fable 5.2). Everyday model: $2 / $10 (GPT-6.2 Sol) vs $2 / $10 (Sonnet 5.5). npm downloads, 14–20 Nov: 27.6M vs 22.1M. GitHub stars: 136K vs 157K. Stable releases in Oct 2026: 9 vs 27. Licence: Apache-2.0 vs all rights reserved.
On this page

Codex or Claude Code? Most of the pages that answer this were written between June and September and still compare GPT-5 with Claude Opus 4. Both sides have moved since. OpenAI launched GPT-6.2 Astra and GPT-6.2 Sol on 17 November, Claude Code now defaults to Opus 5.5, Anthropic released Fable 5.2 on 9 November, and both companies have changed their plans. So we read every plan, price, model and feature page again on 21 November 2026, pulled npm, GitHub and Hacker News data, and put the facts side by side with dates on them.

The short answer: on price they're now level, and the choice comes down to where you already pay and how you work. Both sell $20, $100 and $200 a month plans, and their API prices match tier for tier. Pick Codex if you want an open-source CLI, a $100 plan with no five-hour limit, or the widest set of editors. Pick Claude Code if you already pay for Claude, want Anthropic's models (Fable 5.2 is included on Max and Ultra), or use GitLab. If your team uses both, one AGENTS.md file now works in each. The rest of this post is the evidence, and a section that spells out the choice.

Key findings

  1. 1
    Same price ladder. ChatGPT sells Codex at $20 (Plus) and $100, $200 or $500 (Pro). Claude sells Claude Code at $20 (Pro), $100 (Max) and $200 (Ultra), per OpenAI's Codex pricing and Claude's pricing page.
  2. 2
    The five-hour limit goes at different prices. OpenAI says Pro plans "currently have no five-hour limit", from $100. On Claude, Max at $100 keeps a limit every five hours and every week; Ultra at $200 drops the five-hour one for verified accounts.
  3. 3
    Same API prices, tier for tier. GPT-6.2 Astra and Claude Fable 5.2 both list at $8 per million input tokens and $40 per million output. GPT-6.2 Sol and Sonnet 5.5 both list at $2 and $10. Opus 5.5, Claude Code's default, sits between them at $4 and $20.
  4. 4
    Codex now leads on npm. In the seven days to 20 November, @openai/codex had 27.6M npm downloads and @anthropic-ai/claude-code 22.1M. Claude Code had 138.8 times Codex's downloads in July 2025, 0.51 times in October 2026. npm undercounts Claude Code, whose docs recommend a native installer, so this is a trend, not market share.
  5. 5
    Claude Code has more GitHub stars, Codex is open source. 156,506 stars against 136,019 on 21 November. Codex is Rust under Apache-2.0; Claude Code's licence reads "All rights reserved".
  6. 6
    Claude Code ships about three times as many stable versions. 27 stable npm releases in October 2026 against Codex's 9, though Codex also published 532 alpha builds that month.
  7. 7
    No benchmark compares the current versions. The public leaderboard that lists both harnesses, Terminal-Bench 2.0, has no row for GPT-6.x in Codex or Claude 5.x in Claude Code. Its rows for the two harnesses come from different model generations.
  8. 8
    In our own small runs, both passed everything. On five small tasks, two runs each, Claude Code 2.1.323 (Opus 5.5) and Codex 0.171.0 (GPT-6.2 Sol) passed all 10 of their hidden checks. Codex finished in 553 s against 636 s and wrote about a quarter of the output tokens. With 20 runs of easy tasks, that's a demonstration, not a ranking.
  9. 9
    The instruction files meet in the middle. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and since v2.1.277 reads AGENTS.md when there's no CLAUDE.md.

$20 · $100 · $200

Plan prices on both sides; ChatGPT adds Pro at $500

Source: OpenAI, Anthropic pricing pages

$8 / $40

Per million input / output tokens for both top models, GPT-6.2 Astra and Fable 5.2

Source: OpenAI, Anthropic, 21 Nov 2026

27.6M vs 22.1M

npm downloads 14–20 Nov, Codex vs Claude Code. npm undercounts Claude Code

Source: npm downloads API

Apache-2.0

Codex's licence; Claude Code's says all rights reserved

Source: GitHub

Which one to pick#

Neither tool wins everything, and on price they're level. These are the differences that the vendors' own pages state, as of 21 November 2026.

Pick Codex if:

  • You want no five-hour limit for $100. OpenAI says all three Pro plans, from $100, "currently have no five-hour limit". Claude's $100 Max still has one; you need Ultra at $200 to drop it.
  • You want to read or fork the agent. The Codex CLI is open source under Apache-2.0. Claude Code's repository is public, but its licence says use is subject to Anthropic's commercial terms.
  • You already pay for ChatGPT. Plus at $20 includes Codex in the CLI, the IDE, the web and iOS, and the plan also covers ChatGPT. Free and Go ($8) get GPT-6 Luna in the desktop app, which OpenAI says is "subject to rollout".
  • You work in Xcode or Windsurf. OpenAI lists the Codex extension for VS Code, Cursor, Windsurf, Xcode and JetBrains. Claude Code's docs list VS Code (with Cursor) and JetBrains.
  • You want limits you can estimate. OpenAI publishes a five-hour message range per model for Plus, for example 17 to 180 local messages with GPT-6.2 Sol. Anthropic publishes only multiples of Pro.

Pick Claude Code if:

  • You already pay for Claude. Pro, Max and Ultra all include Claude Code, and it draws on the same usage pool as Claude on the web, desktop and mobile.
  • You want Anthropic's models. Opus 5.5 is the default on every plan. Fable 5.2 is opt-in, included on Max and Ultra "up to half your weekly limit", and paid with usage credits on Pro.
  • Your code lives on GitLab. Claude Code documents GitLab CI/CD alongside GitHub Actions. Codex's docs cover GitHub (code review and a GitHub Action).
  • You want the most frequent updates. Claude Code shipped 20 to 30 stable versions a month in 2026, Codex 7 to 19.

Use both if your team is split. AGENTS.md works as the project's instructions in both, and there's an API-key route for each when one person only needs it occasionally. For the cost side of that choice, see our earlier subscription vs API comparison, which priced the October plans.

Plans and limits#

The two ladders now line up almost rung for rung. Claude dropped the old "Max 20x" tier: Max is now $100 for 5x Pro, and Ultra is $200 for 10x Pro a week with no five-hour limit. ChatGPT Pro comes in $100, $200 and $500 versions.

What each monthly price buys

Individual plans that include Codex or Claude Code, US prices, read 21 Nov 2026

PriceChatGPT (Codex)Claude (Claude Code)
$0Free: GPT-6 Luna in the desktop app, rolling outFree: no Claude Code
$8Go: same as Freenone
$20PlusPro
$100Pro: no five-hour limitMax: 5x Pro, every 5 hours and every week
$200Pro: no five-hour limitUltra: 10x Pro a week, no 5-hour limit
$500Pro: no five-hour limit, Ultrafast modenone
Claude Pro is $17 a month if paid annually ($200 up front). Usage on both sides depends on the model, the context and the task; neither vendor publishes a weekly token or message count.

Sources: OpenAI Codex pricing; Claude pricing

How the limits are stated differs more than the prices. OpenAI's pricing page gives Plus and Standard Business a range of local messages per five hours for each model: 6 to 50 with GPT-6.2 Astra, 17 to 180 with GPT-6.2 Sol and 350 to 3,000 with GPT-6 Luna, adding that these "are not fixed message limits". Claude's pricing page states each plan as a multiple of Pro and says there's "no fixed message count". Claude Ultra's lack of a five-hour limit applies to verified accounts, and its weekly limit stays. Our plan limits post tracks how both vendors moved from counts to multiples.

Two quirks are worth knowing. OpenAI's Plus card still lists GPT-6.1 Sol and GPT-6 Luna, while the Codex models page lists GPT-6.2 Astra and Sol as available on Plus. And on Claude, one pool covers everything: the pricing page says activity "across Claude on web, desktop, mobile, and Claude Code all draws from the same pool".

For teams, ChatGPT Business is $20 per user a month billed annually ($25 monthly) with Codex included. Claude Team is $20 for a Standard seat and $100 for a Premium seat (annual; $25 and $125 monthly). Claude's plan card lists Claude Code under the Premium seat, while its FAQ says Claude Code is "included in all paid plans", so check with Anthropic before you buy Standard seats for it.

Models and API prices#

Claude Code's model choice is simple. On Pro, Max, Ultra, Team, Enterprise and the API it defaults to Opus 5.5 at medium effort. The sonnet and haiku aliases give Sonnet 5.5 and Haiku 5.5. Fable 5.2, Anthropic's top model, is never the default: you pick it with /model fable. In Codex, OpenAI recommends GPT-6.2 Astra for the hardest work and GPT-6.2 Sol for everyday coding, chosen with codex -m or /model. In Codex the default context window is 272,000 tokens for Astra and 500,000 for Sol.

Priced by the token, the two lineups match at two tiers.

API list prices of the models behind each agent

US dollars per million output tokens; input price in the label, read 21 Nov 2026

API list prices of the models behind each agent
LabelValue
GPT-6.2 Astra (OpenAI)$8 / $40
Fable 5.2 (Anthropic)$8 / $40
Opus 5.5 (Anthropic)$4 / $20 (Claude Code default)
GPT-6.2 Sol (OpenAI)$2 / $10
Sonnet 5.5 (Anthropic)$2 / $10
Highlighted: the two top models, at identical list prices. Cached input costs $0.40 per million on GPT-6.2 Astra and $0.20 on Fable 5.2 and Opus 5.5; GPT-6.2 Sol and Sonnet 5.5 both charge $0.10.

Sources: OpenAI Codex pricing; Claude pricing

OpenAI's GPT-6.2 announcement says Astra's input and output prices are 20% lower than GPT-6 Astra's and that Sol keeps GPT-6.1 Sol's prices. Anthropic sells a fast mode for Opus 5.5 and Fable 5.2 at twice the standard price. Using the API key route changes what you get: OpenAI says a Codex API key works in the CLI, SDK and IDE but has "no cloud-based features" such as GitHub code review or Slack.

Features side by side#

On features the two have mostly converged. Both have a CLI, editor extensions, a desktop app, cloud tasks, MCP, skills, plugins, hooks, subagents and a headless mode for CI. The differences are in the details.

Where each agent runs and what it reads

From each vendor's documentation, read 21 Nov 2026

CodexClaude Code
EditorsVS Code, Cursor, Windsurf, Xcode, JetBrainsVS Code, Cursor, JetBrains
DesktopChatGPT desktop appClaude desktop app, Code tab
CloudCodex CloudClaude Code on the web
PhoneiOS, for cloud tasksClaude mobile app, Remote Control
Code review@Codex on GitHub PRs, GitHub ActionGitHub Actions, GitHub Code Review, GitLab CI/CD
Chat appsSlack, TeamsSlack
InstructionsAGENTS.mdCLAUDE.md, or AGENTS.md without one
SandboxOS-enforced, no network by defaultSandboxing, permission modes, auto mode
Headlesscodex exec, Codex SDKclaude -p, Agent SDK
LicenceApache-2.0All rights reserved
Both support MCP servers, skills, plugins and hooks in their local clients. Codex can also read CLAUDE.md if you add it to project_doc_fallback_filenames.

Sources: OpenAI Codex docs; Claude Code docs

Instruction files. Codex reads AGENTS.md from your Codex home and from each directory between the project root and where you work, with AGENTS.override.md for temporary overrides and a 32 KiB cap on the combined size by default. Claude Code reads CLAUDE.md, and since v2.1.277 reads AGENTS.md instead when the repository has no CLAUDE.md. If both exist it reads only CLAUDE.md, unless you change a setting or import one from the other. Our count of AGENTS.md files looks at how repositories use them.

Sandbox and approvals. OpenAI says Codex runs locally in an OS-enforced sandbox, usually limited to the current workspace, with network access off by default. Its modes are read-only, workspace-write and danger-full-access, combined with an approval policy. Claude Code has sandboxing and permission modes, including acceptEdits and an auto mode in which a classifier decides what needs approval.

Headless and CI. Codex runs non-interactively with codex exec and the Codex SDK. Claude Code runs with claude -p and --output-format json, and has the Agent SDK and a GitHub Action.

Adoption: npm, stars and Hacker News#

None of these count users. They're the public traces each tool leaves, and they point the same way: Codex grew from almost nothing in 2025 to roughly Claude Code's size.

npm is the clearest series, with a big caveat. Claude Code's docs recommend a native installer that updates itself, and Codex's docs now lead with a standalone installer too, so npm misses many installs on both sides, and more of Claude Code's. Read the ratio as a trend.

Claude Code's npm downloads as a multiple of Codex's

Monthly downloads of @anthropic-ai/claude-code ÷ @openai/codex, Apr 2025 to Nov 2026 (log scale)

Claude Code's npm downloads as a multiple of Codex's
xy
Apr 202510.5
May 202511.3
Jun 202541.47
Jul 2025138.81 (138.8×)
Aug 202554.92
Sep 202526.1
Oct 202521.41
Nov 202514.84
Dec 202510.88
Jan 202611.85
Feb 20265.26
Mar 20263.06
Apr 20261.57
Jun 20260.94 (0.94×)
Jul 20260.78
Aug 20261.11
Sep 20260.63
Oct 20260.51 (0.51×)
Nov 20260.68 (0.68×)
Below 1, Codex had more downloads. The ratio first fell below 1 in June 2026, and August is the only month since in which Claude Code led. May 2026 is left out: 208M of Codex's 239M downloads that month fell on 1–6 and 11 May, at 20–46M a day against about 1M normally. November runs to the 20th.

Source: host0 analysis of the npm downloads API

In absolute numbers, both packages are in the tens of millions a month. Claude Code peaked at 85.6M in August 2026; Codex had 97.6M in October.

Monthly npm downloads in 2026

@openai/codex and @anthropic-ai/claude-code, Jan to Oct 2026

Monthly npm downloads in 2026
Seriesxy
CodexJan 20262.3M
CodexFeb 20265.8M
CodexMar 202614.5M
CodexApr 202631.4M
CodexJun 202648.1M
CodexJul 202663.5M
CodexAug 202676.9M
CodexSep 2026100.5M
CodexOct 202697.6M
Claude CodeJan 202627.6M
Claude CodeFeb 202630.5M
Claude CodeMar 202644.4M
Claude CodeApr 202649.4M
Claude CodeMay 202634.6M
Claude CodeJun 202645.4M
Claude CodeJul 202649.7M
Claude CodeAug 202685.6M
Claude CodeSep 202663M
Claude CodeOct 202649.6M
Codex's May is left out (a one-off spike of 20–46M a day on six days). npm counts every install, including CI runs, mirrors and updates, so these aren't users. November to the 20th: Codex 77.2M, Claude Code 52.4M.

Source: host0 analysis of the npm downloads API

On GitHub the order is the other way round. anthropics/claude-code had 156,506 stars on 21 November and openai/codex 136,019. Between the archived snapshots we could find, Claude Code's stars grew 6.4 times (July 2025 to early November 2026) and Codex's 3.1 times (September 2025 to early November 2026), though the start dates differ. Codex has more open issues: 28,124 against 15,972.

GitHub stars

openai/codex and anthropics/claude-code, archived snapshots Jul 2025 to Nov 2026

GitHub stars
Seriesxy
Claude Code18 Jul 202524.2K
Claude Code21 Aug 202530.8K
Claude Code21 Feb 202668.1K
Claude Code24 Aug 2026142.9K
Claude Code21 Sep 2026147.4K
Claude Code21 Oct 2026152.7K
Claude Code7 Nov 2026154.8K
Claude Code21 Nov 2026156.5K
Codex18 Sep 202542.5K
Codex3 Mar 202662.8K
Codex9 Apr 202674.1K
Codex9 Jul 202696.4K
Codex5 Nov 2026133.3K
Codex21 Nov 2026136K
Points are Wayback Machine copies of GitHub's API for each repository, plus a live read on 21 Nov 2026. GitHub's stargazer list wasn't available for these repositories, so there's no finer series.

Sources: Wayback Machine; GitHub API

Hacker News shows when people talked about each. Stories with "Claude Code" in the title rose from 17 in February 2025 to 602 in March 2026, then fell to 275 in October. The "Codex" count is higher throughout, but it's an upper bound: "Codex" is an ordinary word, and posts naming both tools count on both lines.

Hacker News stories naming each tool

Stories with the name in the title, per month, Feb 2025 to Oct 2026

Hacker News stories naming each tool
Seriesxy
"Codex"Feb 2025469
"Codex"Mar 2025556
"Codex"Apr 2025516
"Codex"May 2025617
"Codex"Jun 2025579
"Codex"Jul 2025676
"Codex"Aug 2025708
"Codex"Sep 2025597
"Codex"Oct 2025618
"Codex"Nov 2025632
"Codex"Dec 2025886
"Codex"Jan 20261,241
"Codex"Feb 20261,486
"Codex"Mar 20261,518
"Codex"Apr 20261,271
"Codex"May 20261,053
"Codex"Jun 2026996
"Codex"Jul 20261,133
"Codex"Aug 2026951
"Codex"Sep 2026882
"Codex"Oct 2026995
"Claude Code"Feb 202517
"Claude Code"Mar 202541
"Claude Code"Apr 202522
"Claude Code"May 202539
"Claude Code"Jun 2025109
"Claude Code"Jul 2025172
"Claude Code"Aug 2025216
"Claude Code"Sep 2025122
"Claude Code"Oct 2025112
"Claude Code"Nov 202588
"Claude Code"Dec 2025186
"Claude Code"Jan 2026465
"Claude Code"Feb 2026535
"Claude Code"Mar 2026602
"Claude Code"Apr 2026508
"Claude Code"May 2026309
"Claude Code"Jun 2026282
"Claude Code"Jul 2026298
"Claude Code"Aug 2026240
"Claude Code"Sep 2026193
"Claude Code"Oct 2026275
Both peaked in March 2026 (1,518 and 602). The Codex line includes any other use of the word and every post naming both tools. Stories with 50 or more points: 7–35 a month for Claude Code, 31–79 for Codex.

Source: host0 analysis of HN Algolia

Release cadence#

Claude Code ships close to daily. In 2026 it published 20 to 30 stable versions on npm every month, and it publishes no alpha builds there. Codex publishes about two stable versions a week, plus a stream of alpha builds: between 307 and 938 npm versions a month since February. On 20 November both shipped a release, Codex 0.171.0 and Claude Code 2.1.330.

Stable versions published to npm per month

@openai/codex (alpha builds excluded) and @anthropic-ai/claude-code, Jan to Oct 2026

Stable versions published to npm per month
Seriesxy
Claude CodeJan 202629
Claude CodeFeb 202629
Claude CodeMar 202624
Claude CodeApr 202629
Claude CodeMay 202627
Claude CodeJun 202630
Claude CodeJul 202623
Claude CodeAug 202629
Claude CodeSep 202627
Claude CodeOct 202627
CodexJan 202614
CodexFeb 202613
CodexMar 202610
CodexApr 20268
CodexMay 20267
CodexJun 202611
CodexJul 202611
CodexAug 20268
CodexSep 202619
CodexOct 20269
Counting every Codex version, alphas included, gives 307 to 938 a month from February to October 2026 (532 in October). Claude Code publishes no alphas on npm.

Source: host0 analysis of npm registry metadata

The pace has a practical side. An install that isn't updated falls behind fast. The Codex CLI we first had installed, 0.145.0, was 26 releases behind, defaulted to GPT-5.6 Sol and refused GPT-6.1 Sol with a ChatGPT account; after updating to 0.171.0 it picked GPT-6.2 Sol by itself, as our runs below show.

Benchmarks: none compare today's versions#

The public leaderboard that lists both harnesses is Terminal-Bench 2.0, which ranks an agent harness paired with a model on terminal tasks. Its rows for these two harnesses can't settle the question. The best Codex CLI row runs GPT-5.5, released in April 2026. The best Claude Code row runs Claude Opus 4.6, from February. On 21 November there was no row for GPT-6.x in Codex or for any Claude 5.x model in Claude Code.

Terminal-Bench 2.0 rows for the two harnesses

Share of tasks resolved, each row with the model it ran; read 21 Nov 2026

Terminal-Bench 2.0 rows for the two harnesses
LabelValue
Codex CLI · GPT-5.582.2% (Apr 2026)
Codex CLI · GPT-5.262.9% (Dec 2025)
Codex CLI · GPT-5.1-Codex-Max60.4% (Nov 2025)
Claude Code · Opus 4.658.0% (Feb 2026)
Claude Code · Opus 4.552.1% (Nov 2025)
Codex CLI · GPT-549.6% (Aug 2025)
Codex CLI · GPT-5-Codex44.3% (Sep 2025)
Claude Code · Sonnet 4.540.1% (Sep 2025)
Claude Code · Opus 4.134.8% (Aug 2025)
Not a head-to-head: each row pairs a harness with a different model generation, and none uses the models these agents run today. Confidence intervals are about ±2 to ±3 points. The leaderboard's top row (84.7%) is a third-party harness.

Source: Terminal-Bench 2.0 leaderboard

What the chart does show is that each harness got much better as its models did: Claude Code from 34.8% with Opus 4.1 to 58.0% with Opus 4.6, Codex CLI from 49.6% with GPT-5 to 82.2% with GPT-5.5. Until someone submits current-model rows, any page that crowns a winner from this leaderboard is comparing different years.

What a side-by-side run looks like#

We built a small harness to run both agents on the same tasks, and we're publishing it with the transcripts. Both sides ran current versions with their own defaults: Claude Code 2.1.323 with Opus 5.5 at its default medium effort, and Codex CLI 0.171.0 with GPT-6.2 Sol, the model the CLI picks by itself, at its default low reasoning effort. Read this section as a demonstration of the method, not as a ranking.

The setup: five tasks, each a fresh folder with identical starter files, the same prompt to both agents, and a hidden check the agent never saw. Each agent ran each task twice, 20 runs in all, one at a time. Claude Code ran on 21 November 2026 and Codex on 22 November, so API speed and load may have differed. Codex ran with codex exec in its workspace-write sandbox; Claude Code ran with claude -p in acceptEdits mode with a short list of allowed commands. Neither had network access or a browser.

20 runs, 5 tasks: what passed the hidden checks

Two runs per agent per task, result and wall time per run; Claude Code 21 Nov, Codex 22 Nov 2026

TaskClaude Code 2.1.323, Opus 5.5Codex CLI 0.171.0, GPT-6.2 Sol
1. Fix 5 bugs in a JS modulepass ×2 · 18.4 s, 15.9 spass ×2 · 18.9 s, 19.1 s
2. Add two functions to a Python ledgerpass ×2 · 45.1 s, 39.1 spass ×2 · 32.6 s, 37.4 s
3. Build a one-file HTML app from a spec45/45 ×2 · 30.8 s, 33.0 s45/45 ×2 · 95.4 s, 103.0 s
4. Refactor a 92-line functionpass ×2 · 64.0 s, 66.4 spass ×2 · 41.6 s, 46.9 s
5. Implement semver satisfies()705/705 ×2 · 151.3 s, 172.0 s705/705 ×2 · 63.8 s, 94.6 s
Total10/10 · 636 s10/10 · 553 s
All 20 runs passed. Codex finished the 10 runs in 553 s, Claude Code in 636 s. Two runs per cell is far too few to rank anything, and the run-to-run spread is as large as some gaps (Codex on task 5: 63.8 s and 94.6 s).

Source: host0 runs; transcripts in the data folder

The checks were objective. Task 1 ran the project's 10 tests and confirmed they weren't edited. Task 2 ran hidden acceptance tests plus the agent's own. Task 3 loaded the page in headless Chrome and ran 45 assertions. Task 4 compared the refactored function's output with the original on 300 random inputs and required every function to be 25 lines or shorter. Task 5 checked 705 cases generated with the real npm semver package.

Neither agent missed a hidden case. Speed split by task: Codex was faster on tasks 2, 4 and 5, and Claude Code on tasks 1 and 3, about three times faster on the HTML app. Wall time includes whatever each model chose to do: in one task 3 run, Codex wrote the page and then tested its script in Node against a fake DOM.

Codex was also the more economical writer. It produced 21.0K output tokens over its 10 runs; Claude Code produced about 76.5K, roughly 3.6 times as many. Claude Code reported $3.15 for its runs at API list prices; on a subscription that's usage, not a charge. Codex reports tokens only: 1.38M input, 1.21M of them cached. The two count input differently, so the input totals don't compare directly.

What the runs don't show:

  • A winner. n = 20, two runs per cell, one prompt per task. Tasks 1 to 4 are easy and didn't separate the agents in either pass.
  • Equal settings. Each agent ran its own default effort: low for Codex, medium for Claude Code. Neither ran its top model (GPT-6.2 Astra, Fable 5.2).
  • Why the old semver misses went away. The 0.145.0 runs tripped on two npm quirks: an invalid set inside || makes the whole range invalid, and a hyphen range can follow another comparator. Whether GPT-6.2 Sol read those from the README or already knew semver, we didn't establish.

The tasks, hidden checks, diffs and trimmed transcripts are in our repository at docs/research/2026-11-21-codex-vs-claude-code-data/ (runs under runs/, the harness under tasks/, the CLI version of every run in run_results.csv).

What this means if you're choosing#

  1. Decide on the plan you already have. At $20, $100 and $200 the ladders match, and both companies' plans also cover their chat apps. If you pay for ChatGPT or Claude already, start with the agent that comes with it.
  2. Check where the five-hour limit ends. On ChatGPT it ends at the $100 Pro plan; on Claude at the $200 Ultra plan, for verified accounts. Both keep weekly limits.
  3. Compare models by tier, not brand. GPT-6.2 Astra and Fable 5.2 list at the same price, as do GPT-6.2 Sol and Sonnet 5.5. Claude Code's default, Opus 5.5, is a middle tier with no OpenAI equivalent at its price.
  4. Keep your agent updated. Both ship weekly or faster, and an old install can miss the current models entirely.
  5. Write one AGENTS.md. Both agents read it now, so a team can switch or mix tools without maintaining two instruction files.
  6. Distrust any verdict built on an old leaderboard. No public benchmark compares GPT-6.2 in Codex with Opus 5.5 or Fable 5.2 in Claude Code yet.

Whichever you choose, both can publish what they build to a shareable link with the host0 skill. We build host0, hosting for whatever your agent creates, so it matters to us that both work.

FAQ#

Is Codex or Claude Code better?#

Neither is better at everything, and no public benchmark compares their current versions. In our own 20 runs of five small tasks, both passed every hidden check, which is too few to rank them. Terminal-Bench 2.0 has rows for both harnesses, but from different model generations (GPT-5.5 in Codex, Opus 4.6 in Claude Code) and none with today's models. Choose on plans, models and features: Codex offers an open-source CLI and a $100 plan with no five-hour limit, while Claude Code comes with every paid Claude plan, defaults to Opus 5.5 and includes Fable 5.2 on Max and Ultra.

How much do Codex and Claude Code cost?#

Codex comes with ChatGPT Plus at $20 a month and Pro at $100, $200 or $500, and in a limited form with Free and Go ($8). Claude Code comes with Claude Pro at $20 ($17 a month billed annually), Max at $100 and Ultra at $200. Both can also run on pay-per-token API keys. Prices as of 21 November 2026.

Which models do Codex and Claude Code use?#

Claude Code defaults to Opus 5.5 on every plan and on the API, and Fable 5.2 is opt-in with /model fable. In Codex, OpenAI recommends GPT-6.2 Astra for the hardest work and GPT-6.2 Sol for everyday coding, selected with codex -m or /model. Both GPT-6.2 models launched on 17 November 2026.

Do Codex and Claude Code have usage limits?#

Yes, both. ChatGPT Plus has a five-hour window with published message ranges per model, and weekly limits may also apply; OpenAI says Pro plans currently have no five-hour limit. Claude Pro and Max have limits every five hours and every week, and Ultra has no five-hour limit for verified accounts but keeps a weekly one.

Can I use the same instructions file for both?#

Yes. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and since version 2.1.277 reads AGENTS.md when the repository has no CLAUDE.md. If you keep both files, Claude Code reads only CLAUDE.md unless you import AGENTS.md from it or change the setting.

Is Codex open source? Is Claude Code?#

The Codex CLI is open source: it's written in Rust and licensed under Apache-2.0. Claude Code's repository is public on GitHub, but its licence says "All rights reserved" and that use is subject to Anthropic's commercial terms.

Can I use Codex or Claude Code without a subscription?#

Yes. Both run on an API key billed per token. With a Codex API key you get the CLI, SDK and IDE extension but no cloud features such as GitHub code review or Slack. Claude Code on the Anthropic API defaults to Opus 5.5. Our subscription vs API post works through when each is cheaper.

Methodology#

  • Plans, prices and features come from each vendor's own pages, read on 21 November 2026: OpenAI's Codex pricing and models pages, the GPT-6.2 announcement, the Codex docs at learn.chatgpt.com, Claude's pricing page, the Max plan help article and the Claude Code docs at code.claude.com. Vendor statements are the vendors' claims. Copies of the pages are in the data folder.
  • npm downloads are daily counts from the npm downloads API for @openai/codex and @anthropic-ai/claude-code, from January 2025 to 20 November 2026, summed by month. Codex's May 2026 spike (six days at 20–46M) is excluded from the charts. npm counts installs, including CI, mirrors and updates, and misses native installs, so it shows a trend, not users or market share.
  • Release counts come from each package's npm time metadata. Codex's stable count excludes versions with an alpha tag. We couldn't count Codex's GitHub releases (the API timed out).
  • GitHub stars today are from the GitHub API; the history is Wayback Machine copies of the same API endpoint, because the stargazer list wasn't available.
  • Hacker News counts are stories with the name in the title, by month, from the HN Algolia API. "Codex" also matches other uses of the word and posts naming both tools.
  • Terminal-Bench rows were read from the 2.0 leaderboard on 21 November 2026.
  • Our runs used five tasks with hidden checks, two runs per agent per task, one at a time on one Mac. Claude Code ran on 21 November 2026: claude -p --permission-mode acceptEdits with a short command allowlist, version 2.1.323, Opus 5.5 at the default medium effort. Codex ran on 22 November: codex exec --sandbox workspace-write --ephemeral --ignore-user-config, CLI 0.171.0, its default model GPT-6.2 Sol at the default low reasoning effort. An earlier Codex pass on CLI 0.145.0 with GPT-5.6 Sol (8 of 10 passed) is kept in Appendix A of the data pack. Limits: 20 runs, one prompt per task, different default effort settings, the two sides a day apart, and easy tasks for 1 to 4.

The data pack, with every number, its source and tier, and a do-not-cite list, is in our repository at docs/research/2026-11-21-codex-vs-claude-code.md, with raw data, scripts, tasks and transcripts in docs/research/2026-11-21-codex-vs-claude-code-data/.

Open questions#

  • How do the top models and harder tasks compare? Our runs paired the defaults, GPT-6.2 Sol and Opus 5.5, on easy tasks, and both passed everything. Runs with GPT-6.2 Astra and Fable 5.2, on harder tasks and on the same day, would separate them better. The harness is ready.
  • How big are the weekly limits? Neither vendor publishes a weekly token or message count, and Anthropic gives only multiples of Pro.
  • Does ChatGPT Plus include GPT-6.2 in the Codex CLI? The models page says yes; the Plus plan card still lists GPT-6.1 Sol.
  • How many people use each? npm misses native installs, and neither company publishes active users for its agent alone.
  • Where do they stand on SWE-bench Verified? We found no current row for either harness.
ResearchCoding agentsPricing