Codex vs Claude Code
OpenAI Codex and Anthropic's Claude Code are both coding agents that read a repository, run commands and make changes; Claude Code leads the independent coding leaderboards as of Nov 6, 2026, while Codex is cheaper to start (it is on ChatGPT Free and Go) and runs cloud tasks and GitHub reviews from the same ChatGPT plan.
Codex and Claude Code cost the same at the usual entry point, $20 a month for ChatGPT Plus and $20 a month for Claude Pro, and the two do the same job: an agent that reads a codebase, edits files, runs commands and tests, and opens pull requests. As of Nov 6, 2026 the independent leaderboards put Anthropic's Claude Opus 5.5 ahead of OpenAI's GPT-6 Astra on web development and agent tasks, while Codex wins on the cheapest way in (it is included with ChatGPT Free and Go, where Claude Code needs a paid plan), on its cloud tasks and GitHub reviews bundled with ChatGPT, and on GPT-6 Luna's large message allowance. Neither is a clear winner on every task, and the verdicts below say which source settles each one. Learn more: https://ai.vi.ki/claude-code and https://claude.vi.ki/claude-code-vs-codex.
Quick facts
| Cheapest plan with the agent | Codex: ChatGPT Free, $0 (GPT-6 Luna in the desktop app); Claude Code: Claude Pro, $20 a month ($17 billed annually), as of Nov 6, 2026 |
| Top personal plans | Codex: ChatGPT Pro at $100, $200 or $500 a month; Claude Code: Max $100, Ultra $200 |
| Default model | Codex: GPT-6.1 Sol; Claude Code: Opus 5.5 is Anthropic's suggested default |
| Top model's API price | GPT-6 Astra $10 / $50 and Claude Opus 5.5 $4 / $20 per million input / output tokens |
| Arena WebDev (Oct 27, 2026) | Claude Opus 5.5 1810, GPT-6 Astra 1773 |
| Instructions file | Codex reads AGENTS.md |
Verdict by task
| Task | Codex | Claude Code | Verdict |
|---|---|---|---|
| Agentic coding benchmarks | GPT-6 Astra 57.9% on Terminal-Bench 4.0 | Opus 5.5 66.4% | Claude Code, on the makers' own tables |
| Web app building (votes) | GPT-6 Astra 1773 | Opus 5.5 1810 | Claude Code |
| Price to start | $0 (Free), $8 (Go) | $20 (Pro) | Codex |
| Heavy daily use | Pro has no five-hour limit | Ultra has no five-hour limit | Tie on paper; no shared unit to compare |
| Cloud tasks and GitHub review | Codex Cloud and @codex review on Plus and up | GitHub Actions, Code Review, web | No reliable comparison yet |
| Surfaces | App, CLI, IDE, cloud, mobile, Slack | Terminal, IDE, desktop, web, mobile, Slack, Chrome | Close; both cover every place most people work |
| Privacy on personal plans | Training on by default, can be turned off | Used when you allow it | Claude Code, on the wording of each maker's page |
Sources for the table are linked in each section below.
Which is better at coding?
Claude Code, on the measured numbers available on Nov 6, 2026, by a modest margin. In Anthropic's Sep 22, 2026 table for Claude Opus 5.5, Opus 5.5 scored 66.4% on Terminal-Bench 4.0 against GPT-6 Astra's 57.9%, and 54.4% to 53.3% on FrontierCode v1.1. OpenAI's own Sep 3, 2026 GPT-6 Astra table gives Astra the same 57.9% on Terminal-Bench 4.0, ahead of the older Claude Opus 5 (52.6%) and Claude Fable 5.1 (55.8%), and 74.1% on DeepSWE v1.1 against Opus 5's 73.7%; it was published before Opus 5.5 existed. Both tables are the makers' own runs, so they are a starting point, not a final word (OpenAI Benchmarks).
The vote-based leaderboards agree with Anthropic's ordering. On Arena WebDev, updated Oct 27, 2026, Claude Opus 5.5 is first at 1810, GPT-6 Astra second at 1773, Claude Sonnet 5.5 third at 1770 and GPT-6.1 Sol, Codex's default, fifth at 1751. Arena's agent ranking read Nov 6, 2026 puts Claude Opus 5.5 first (20.14%) and GPT-6 Astra fourth (14.70%). The Artificial Analysis Intelligence Index has Opus 5.5 at 59 and Astra at 57, a near tie.
SWE-bench, once the standard test, has no current entry: its public data file stops on Feb 26, 2026, and OpenAI publishes no SWE-bench score for Astra. Treat any 2026 SWE-bench comparison of these two as unverified.
Price
Codex comes with every ChatGPT plan. As of Nov 6, 2026, OpenAI's Codex pricing page lists Free at $0 and Go at $8 a month, both with GPT-6 Luna in the desktop app "subject to rollout"; Plus at $20 with the CLI, IDE extension, web, iOS, code review and Slack; Pro at $100, $200 or $500 a month; and Business at $20 per user a month billed annually ($25 monthly). Codex Cloud is not on Free or Go.
Claude Code is on Claude Pro, Max, Ultra, Team and Enterprise, not Free. Pro costs $20 a month or $17 a month billed annually, Max $100, Ultra $200; a Team standard seat is $20 a month billed annually ($25 monthly) and a premium seat $100 ($125 monthly); Enterprise is $20 a seat plus usage at API rates. Max and Ultra also include $100 and $200 a month in API credits.
Verdict: Codex for trying an agent for free or for $8; at $20 the two are level. Full plan details are on Codex Pricing and Limits.
Usage limits
Codex publishes ranges. On Plus and standard Business seats, OpenAI estimates 5 to 45 local messages every five hours with GPT-6 Astra, 15 to 160 with GPT-6.1 Sol and 350 to 3,000 with GPT-6 Luna, with weekly limits that "may also apply"; Pro plans currently have no five-hour limit. Paid plans can buy credits when the allowance runs out (ChatGPT Credits).
Anthropic gives multiples instead of numbers: Max is "5x Pro usage" and Ultra has "No 5-hour limit" for verified accounts and 10x Pro's weekly usage, with no message counts for Pro itself. Since the two makers measure in different units, no fair head-to-head of limits exists; Codex is the easier one to plan around because it states ranges.
Models
Codex runs OpenAI's GPT-6 family: GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna, with GPT-6.1 Sol the default and a 500,000-token context window in Codex. Signed in with an API key, Codex can use any model the key allows (Codex Models).
Claude Code runs Anthropic's models: Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5, each with a one-million-token context window. Its terminal, VS Code and JetBrains versions also accept third-party providers. On API prices Claude Opus 5.5 ($4 / $20 per million tokens) costs well under GPT-6 Astra ($10 / $50), while GPT-6.1 Sol ($2 / $10) matches Claude Sonnet 5.5 (OpenAI API Pricing).
Where each one runs
Codex is part of the ChatGPT Desktop App on macOS, Windows and Linux, and also runs as the Codex CLI, the Codex IDE Extension for VS Code, Cursor and Windsurf (with Xcode and JetBrains integrations), Codex Cloud, the web and the ChatGPT mobile app (OpenAI Codex docs). It connects to GitHub, GitLab, Slack, Linear and a GitHub Action, and the Codex SDK embeds it in other tools. The Codex CLI has been open source since Apr 16, 2025.
Claude Code runs in the terminal, in VS Code and Cursor, in JetBrains IDEs, in a desktop app, on the web at claude.ai/code and in Claude's iOS and Android apps, in Slack, GitHub Actions and GitLab CI/CD, in Chrome and through an Agent SDK (Claude Code overview). Verdict: close; Codex's link to the ChatGPT app suits people already in ChatGPT, Claude Code's chat and channel integrations suit teams in Slack.
Cloud tasks and code review
Codex Cloud gives each task its own workspace that keeps working while the computer sleeps and ends in a commit or pull request. On GitHub, a comment of @codex review gets a review that flags only P0 and P1 issues, and review rules go in AGENTS.md (Codex Code Review). Claude Code offers GitHub Actions and a GitHub Code Review surface (Claude Code overview). No published test compares the quality of the two reviewers: no reliable comparison yet, beyond one team's 2025 impression under What testers found.
Safety and privacy
Codex runs commands in a sandbox: Seatbelt on macOS, bubblewrap on Linux and WSL2, and the Windows sandbox on Windows, with network access off by default in the standard mode. No source read for this page describes Claude Code's sandbox in the same detail, so the two are not compared here.
On personal ChatGPT plans, data sharing is on by default and "Improve the model for everyone" turns it off; Codex Business data is not used for training by default. Anthropic's page, dated Mar 16, 2026, says consumer chats and coding sessions are used to improve Claude when you choose to allow it or when a conversation is flagged for safety review. More on Privacy and Data Controls.
Which should you choose?
Choose Codex to start free, to stay inside ChatGPT, to hand off tasks to the cloud from a phone, or for the large GPT-6 Luna allowance on routine changes. Choose Claude Code for the strongest measured coding model today, for its lower top-model API price, or if your team already pays for Claude. Many developers can try both for a month at $20 each. The wider chat comparison is ChatGPT vs Claude, and the API side is OpenAI API vs Claude API. Learn more: https://ai.vi.ki/claude-code and https://claude.vi.ki/claude-code-vs-codex.
What testers found
In an Aug 27, 2026 video, Tim Ruscica of Tech With Tim gave the Codex CLI and Claude Code the same five tasks and timed them, flagship against flagship: GPT-5.6 Sol against Claude Opus 5, the models of the time. Splitting a 5,000-line Python file, six of his seven models succeeded; Opus 5 took 36 minutes, almost five times as long as Sol, the fastest, because it also wrote its own tool to check that nothing broke.
His conclusion: choose Codex for speed and efficiency, since it reached the same correctness on his tasks, sometimes several times faster, and offers its flagship model on the $20 plan; choose Claude Code for depth, since Opus went further on every task, writing more than three times as many tests for the app it built.
On usage, he cited community trackers' estimates of 10 to 100 Sol messages per five hours on Plus against about 45 prompts on Claude Pro, said both are estimates, and in his own use found the same tasks used up three to four times less of Codex's allowance.
In an earlier, 2025 video, Builder.io's Steve Sewell said his team found Claude Code's GitHub app gave "verbose and pointless" reviews, while Codex's automatic reviews found "legitimate and hard to spot bugs" that it could then fix. Both products have changed since.
Frequently asked questions
Is Codex better than Claude Code? Not on the coding leaderboards as of Nov 6, 2026: Claude Opus 5.5 leads GPT-6 Astra on Arena WebDev (1810 to 1773) and on Anthropic's Terminal-Bench 4.0 table. Codex is cheaper to start, since it is included with ChatGPT Free and Go.
Is Claude Code free? No. Claude Code needs Claude Pro ($20 a month) or a higher plan, or an Anthropic Console account; Claude Free does not include it. Codex is included with ChatGPT Free with GPT-6 Luna in the desktop app.
Can I use Claude models in Codex? Codex supports custom providers only through a Responses API endpoint, and OpenAI documents no Claude option. Claude Code's terminal and IDE versions do accept third-party providers.
Which has higher limits for $20? Neither maker publishes numbers that can be compared. OpenAI estimates 15 to 160 GPT-6.1 Sol messages every five hours on ChatGPT Plus; Anthropic gives no message count for Claude Pro.
Do Codex and Claude Code both read AGENTS.md? Codex reads AGENTS.md files before any work, from the global file down to the working folder. No source read for this page states whether Claude Code reads AGENTS.md.
Sources
- Pricing, Models, Codex docs, Cloud, Sandboxing, GitHub and AGENTS.md, OpenAI Codex docs, read Nov 6, 2026
- Using Codex with your ChatGPT plan, Using credits for flexible usage and Data controls, OpenAI Help Center, read Nov 6, 2026
- GPT-6 Astra, OpenAI, Sep 3, 2026
- OpenAI Codex, OpenAI, Aug 10, 2021 (updated Apr 16, 2025)
- API pricing, OpenAI, read Nov 6, 2026
- Plans and pricing, Anthropic, read Nov 6, 2026
- Models overview, Anthropic, read Nov 6, 2026
- Claude Opus 5.5, Anthropic, Sep 22, 2026
- Claude Code overview, Anthropic, read Nov 6, 2026
- Is my data used for model training?, Anthropic Privacy Center, Mar 16, 2026
- WebDev leaderboard and Leaderboard overview, Arena, Oct 27, 2026, read Nov 6, 2026
- Models leaderboard, Artificial Analysis, read Nov 6, 2026
- SWE-bench leaderboard data, SWE-bench, read Nov 6, 2026
- Meet the all new Codex Cloud, OpenAI, Sep 29, 2026 (video)
- Codex vs Claude - an Honest Comparison, Tech With Tim, Aug 27, 2026 (video)
- Codex vs Claude Code: which AI coding agent is better?, Steve (Builder.io), Sep 28, 2025 (video)
Moments
Meet the all new Codex Cloud
OpenAI
Codex vs Claude - an Honest Comparison
Tech With Tim
- In an Aug 27, 2026 video, Tim Ruscica of Tech With Tim gave the Codex CLI and Claude Code the same five tasks and…
- His conclusion: choose Codex for speed and efficiency, since it reached the same correctness on his tasks, sometimes…
- On usage, he cited community trackers' estimates of 10 to 100 Sol messages per five hours on Plus against about 45…
Codex vs Claude Code: which AI coding agent is better?
Steve (Builder.io)
See also
-
CodexCodex is OpenAI's coding agent: it reads a codebase, edits files, runs commands and tests, reviews pull requests and works in the cloud. As of Nov 6, 2026 it lives inside the ChatGPT desktop app, in the Codex CLI, in IDE extensions, in Codex Cloud and on mobile, and every ChatGPT plan includes some of it, Free and Go too.
-
GPT-6 AstraGPT-6 Astra is OpenAI's most capable model, released Sep 3, 2026, priced at $10 per million input tokens and $50 per million output tokens in the API, with a 1.05 million token context. In ChatGPT it powers GPT-6 Pro and is in ChatGPT Work and Codex. - GPT-6 LunaGPT-6 Luna is OpenAI's cheapest and fastest GPT-6 model, released Sep 22, 2026 at $0.10 per million input tokens and $0.50 output. OpenAI's pricing page and Oct 7 release note name it as ChatGPT's model for Free and Go, though its help articles say GPT-5.6 Luna.
-
OpenAI BenchmarksAs of Nov 6, 2026, no OpenAI model leads the main independent leaderboards: GPT-6 Astra scores 57 on Artificial Analysis's index behind Gemini 4 Carbon (60) and Claude Opus 5.5 (59), ranks 2nd on LMArena WebDev and 37th on LMArena Text, while OpenAI's own tables show it ahead on many agent, math and cyber tests.
-
GPT-6.1 SolGPT-6.1 Sol is OpenAI's mid-priced GPT-6 model, released Sep 29, 2026 at $2 per million input tokens and $10 output, which OpenAI says nearly matches GPT-6 Astra on agentic work. In ChatGPT it is only in Work and Codex; the Chat tab uses the earlier GPT-6 Sol. -
Codex Pricing and LimitsCodex comes with every ChatGPT plan as of Nov 6, 2026: Free ($0) and Go ($8) get GPT-6 Luna in the desktop app, Plus ($20) gets about 15 to 160 GPT-6.1 Sol messages per five hours plus Codex Cloud, and Pro ($100, $200 or $500) has no five-hour limit. Credits extend any plan, and an API key bills by the token instead.