Claude Code vs Codex
Claude Code and OpenAI's Codex are both coding agents for the terminal, the IDE and the cloud at the same $20 entry price; Claude Code led the public Terminal-Bench 4.0 board on Nov 6, 2026, while Codex is open source, cheaper per result and included in ChatGPT's Free and Go plans.
Claude Code and Codex cost the same to start, $20 a month for Claude Pro and $20 a month for ChatGPT Plus, and do the same job: an agent that reads a repository, edits files, runs commands and opens pull requests from a terminal, an IDE, a desktop app or the cloud. On the public Terminal-Bench 4.0 board on Nov 6, 2026, Claude Code with Claude Opus 5.5 held first place at 64.85% against Codex's best at 58.18%. Codex wins on other counts that matter to many developers: its CLI is open source under Apache 2.0, it comes with ChatGPT's free and $8 plans, and its best Terminal-Bench run cost about a seventh as much.
Learn more: Codex on ai.vi.ki, Codex on chatgpt.vi.ki and Codex vs Claude Code on chatgpt.vi.ki.
Quick facts
| Claude Code | Codex | |
|---|---|---|
| Maker | Anthropic | OpenAI |
| Cheapest plan that includes it | Claude Pro, $20 a month ($17 billed annually) | ChatGPT Free, $0 (Go $8, Plus $20) |
| Top consumer plans | Max $100, Ultra $200 | Pro $100, $200 or $500 |
| Default model | Claude Opus 5.5 | GPT-6.1 Sol on Plus (GPT-6 Luna on Free and Go) |
| Surfaces | CLI, VS Code and JetBrains, desktop app, web and mobile | CLI, IDE extension, desktop app, Codex Web |
| Source code | CLI source not published | Apache 2.0 on GitHub |
| Terminal-Bench 4.0 best | 64.85% (Opus 5.5, max) | 58.18% (GPT-6.1 Sol and GPT-6 Astra, max) |
| Pay by the token instead | Anthropic Console account | OpenAI API key (no cloud features) |
Sources: Claude plans and pricing, Model configuration, Codex pricing, openai/codex, anthropics/claude-code and Terminal-Bench 4.0, all read Nov 6, 2026.
Verdict by task
| Task | Pick | Why |
|---|---|---|
| Hard terminal tasks | Claude Code | First and second on Terminal-Bench 4.0 |
| Web front ends | Claude Code, narrowly | Opus 5.5 first on Arena WebDev |
| Cost per result | Codex | Its GPT-6.1 Sol run cost $634 against $4,719 |
| Trying it free | Codex | Included in ChatGPT Free; Claude Free has no Claude Code |
| Open source and forking | Codex | Apache 2.0 CLI |
| Highest consumer tier | Codex | Pro at $500 with Ultrafast mode |
| Images and voice in the agent | Codex | Built-in image generation and voice |
| Data used for training by default | Tie, check the setting | Both consumer services offer a choice or opt-out |
The rows are explained, with their sources, in the sections below.
Benchmarks
Terminal-Bench 4.0 is the most current independent measure of the two products, because it scores an agent harness and a model together: "Claude Code + Opus 5.5" is the thing a subscriber actually runs. On the leaderboard read on Nov 6, 2026, Claude Code with Opus 5.5 at max effort scored 64.85% (plus or minus 3.11) and Claude Code with Claude Sonnet 5.5 scored 61.82% (plus or minus 2.94). Codex with GPT-6.1 Sol and Codex with GPT-6 Astra both scored 58.18% at max effort. The 95% confidence intervals of Claude Code with Opus 5.5 and of Codex's best runs do not overlap; Sonnet 5.5's overlaps both.
Cost cuts the other way. The same board lists the total cost of each run: $4,718.65 for Claude Code with Opus 5.5 and $634.24 for Codex with GPT-6.1 Sol, about 7.4 times less for 6.7 fewer points. For a team paying by the token, Codex with GPT-6.1 Sol is the most cost-efficient strong entry on the board.
Anthropic's own figures are higher than the public board's. Anthropic reports 66.4% for Opus 5.5 at xhigh effort and 70.6% for Sonnet 5.5 on Terminal-Bench 4.0, and quotes GPT-6 Astra at 57.9% "as reported by OpenAI". Different effort settings and runs explain part of the gap; for a comparison, the public board is the one to cite. On Anthropic's own table, GPT-6 Astra beats Opus 5.5 on AutomationBench (41.4% to 40.0%) and Terminal-Bench-Science (64.6% to 58.7%).
On Arena's WebDev board, where people vote on web apps the models build, Claude Opus 5.5 (Max) ranked first at 1810, GPT-6 Astra (Max) second at 1773 and GPT-6.1 Sol (Max) fifth at 1751 (read Nov 6, 2026). These are model scores, not Claude Code or Codex scores.
SWE-bench is no help here: the newest SWE-bench Verified entry on swebench.com was dated Feb 26, 2026 and no Claude 5 or GPT-6 model appeared on any of its boards on Nov 6, 2026. More results are on Claude Benchmarks.
Price and limits
Claude Code comes with every paid Claude plan: Pro at $20 a month or $17 billed annually, Max at $100 (five times Pro's usage), Ultra at $200 (no five-hour limit for verified accounts and ten times Pro's weekly usage), and Team and Enterprise seats. The Free plan does not include it. Claude Code shares one pool with chat, so coding and conversation draw on the same five-hour and weekly limits, and Anthropic prints no message counts (Claude Usage Limits).
Codex comes with every ChatGPT plan, including Free at $0 and Go at $8, then Plus at $20, Pro at $100, $200 or $500, and Business at $20 a seat billed annually. OpenAI does print estimates: on Plus, 15 to 160 local messages every five hours with GPT-6.1 Sol and 350 to 3,000 with GPT-6 Luna, with weekly limits that "may also apply". Its page says Pro plans currently have no five-hour limit. The $500 Pro adds Ultrafast mode, which uses the allowance eight times as fast.
Both can bill by the token instead. A Claude Console account runs Claude Code at standard API prices (Opus 5.5 at $4 per million input tokens and $20 per million output); an OpenAI API key runs the Codex CLI, SDK or IDE extension at API rates, but OpenAI says that path has no cloud features such as GitHub review or Slack. Anthropic says enterprise use of Claude Code averages about $13 per developer per active day.
Where each one runs
Claude Code runs in the terminal, in VS Code and JetBrains IDEs (the VS Code extension also installs in Cursor), as the Code tab of the desktop app, and as cloud sessions at claude.ai/code that the mobile app can start and follow (Claude Code on the Web); all of them share one engine, so CLAUDE.md files, settings and MCP servers carry across (Overview). It also works through Amazon Bedrock, Google Cloud and Microsoft Foundry.
Codex has the same set of places: the codex CLI, an IDE extension for VS Code, Cursor and Windsurf, a desktop app and Codex Web, OpenAI's cloud agent at chatgpt.com/codex (openai/codex). Its desktop app adds voice, at $0.05 a minute from the Codex budget, and image generation, which Claude Code does not have.
Open source
The Codex CLI is open source: the openai/codex repository is "licensed under the Apache-2.0 License" and had 133.4k stars on Nov 6, 2026. Anyone can read, fork or audit the agent. The public anthropics/claude-code repository, with 154.7k stars the same day, holds plugins, examples, scripts and the changelog rather than the CLI's source. A team that must inspect or modify the agent it runs has a clear answer here: Codex.
Models
Claude Code runs Anthropic's models only. Its default is Claude Opus 5.5 at medium effort on every paid plan, with Sonnet 5.5, Haiku 5.5 and Fable 5.1 a /model away; all current models have a 1M-token context window. Codex runs OpenAI's: GPT-6.1 Sol and GPT-6 Luna on Plus, with GPT-6.1 Terra and GPT-6 Sol on Pro, Business and Enterprise, each with a 1.05M-token window (Models). OpenAI's pricing page contradicts itself on Plus: its five-hour table lists GPT-6 Astra and GPT-6.1 Terra for Plus while its model list for Plus names only GPT-6.1 Sol and GPT-6 Luna.
Popularity
In the 2026 Stack Overflow Developer Survey (12,255 answers to the question, fielded Jun 23 to Aug 5, 2026), 65.5% had used Claude Code in the past year and 29.5% OpenAI Codex. The question measures reach over a year, and people could pick several tools, so it is not a measure of which one they prefer.
Privacy
On consumer plans, Claude asks each person whether their chats and coding sessions may train future models, "including when you use Claude Code" (Data usage); under commercial terms Anthropic does not train on Claude Code prompts or code. OpenAI says content on Free, Go, Plus and Pro "is used to train our models" with an opt-out, and does not train on Business workspaces (ChatGPT pricing). Check the setting on either before pointing it at private code. More on Claude Privacy and Data Use.
When to choose Codex
- You want to try a coding agent without paying: Codex is in ChatGPT Free and the $8 Go plan; Claude Code starts at $20.
- You need to read, audit or fork the agent: the Codex CLI is Apache 2.0.
- You pay by the token and want the most results per dollar: Codex with GPT-6.1 Sol scored 58.18% on Terminal-Bench 4.0 for about a seventh of Claude Code with Opus 5.5's cost.
- You already pay for ChatGPT Plus or Pro and live in its desktop app, with voice and image generation beside the code.
- You want the very top tier: ChatGPT Pro at $500 with Ultrafast mode has no Claude equivalent.
When to choose Claude Code
- You want the highest measured success on hard terminal tasks: Claude Code held the top two places on Terminal-Bench 4.0 on Nov 6, 2026.
- You build web front ends: Opus 5.5 led Arena's WebDev board.
- You want one subscription for chat and coding with Anthropic's tooling around it: hooks, subagents, plugins, MCP servers and GitHub Actions.
- Your company runs on AWS, Google Cloud or Azure: Claude Code works through Bedrock, Google Cloud and Foundry with the same CLI.
Switching is cheap in both directions. Claude Code reads an existing AGENTS.md in place of a CLAUDE.md, and its /import codex command brings over Codex's instruction files, MCP servers, commands and skills (Commands).
What reviewers found
In an Aug 27, 2026 video, Tim Ruscica of Tech With Tim gave the Codex CLI and the Claude Code CLI the same five tasks, flagship against flagship: GPT-5.6 Sol against Claude Opus 5, both since replaced. The flagships all got the tasks right; Codex was much faster, sometimes several times over, and he found its limits more generous, while Opus "went further on every single demo": a 635-line code analysis, more than three times the tests, and a checking tool it built for itself during a refactor that took 36 minutes, almost five times Sol's time. He recommended Codex for speed and value, Claude Code for depth, and both if you can afford $40 a month. He also said that Claude Pro then defaulted to Sonnet 5; Claude Code's default on every paid plan is now Opus 5.5.
In a May 26, 2026 test in each tool's desktop app, Nate Herk of Nate Herk | AI Automation ran Claude Code on Opus 4.7 and Codex on GPT-5.5 and called the result "not a clean sweep". Claude Code built his dashboard in under 2 minutes against almost 8, with about 283,000 tokens against 1.64 million, and he preferred its dashboard and landing page designs; Codex was faster on the research report and the landing page, wrote 2 to 5 times fewer output tokens on every build, and its PDF report was the one he would send a client. He found Claude Code better for brainstorming and pushing back, and Codex better at following instructions and reviewing code.
Theo Browne of Theo - t3․gg, who said he had moved from Claude Code to Codex, compared the two by philosophy in a May 26, 2026 video, in the Opus 4.7 and GPT-5.5 era. In his view Anthropic's tool spends more tokens and is built to feel productive, which he said first got him hooked on agentic coding, while Codex aims at token efficiency and checks its own work with computer use. His advice: Claude Code if you want coding to feel fun and motivating, Codex if you are an experienced engineer who wants a tool that "mostly stays out of your way".
Frequently asked questions
Is Claude Code better than Codex? On the public Terminal-Bench 4.0 board on Nov 6, 2026, Claude Code with Claude Opus 5.5 scored 64.85% against Codex's best 58.18%, but Codex's run cost about a seventh as much, and Codex is open source and free to try. Which is better depends on whether success rate or cost matters more.
Is Codex free while Claude Code is not? Yes. Codex is included in ChatGPT's Free plan, while Claude Code needs a paid Claude plan (Pro at $20 a month or more) or an Anthropic Console account billed by the token.
Is Claude Code open source like Codex? No. The Codex CLI is published under Apache 2.0, while Claude Code's public GitHub repository holds plugins, examples and the changelog, not the CLI's source.
Can I use my ChatGPT subscription in Claude Code, or my Claude subscription in Codex? No. Claude Code signs in with a Claude plan or an Anthropic account and runs Claude models; Codex signs in with ChatGPT or an OpenAI API key and runs OpenAI models.
Can I move my Codex setup to Claude Code? Yes. Claude Code reads AGENTS.md files and its /import codex command copies Codex's instructions, MCP servers, commands and skills into Claude Code.
Which costs less for heavy use, Claude Max or ChatGPT Pro? Both start at $100 a month. Claude Max gives five times Pro's usage with five-hour and weekly limits; OpenAI says ChatGPT Pro currently has no five-hour limit but does not print its weekly allowance, so neither can be compared in numbers.
Sources
- Codex vs Claude - an Honest Comparison, Tech With Tim, Aug 27, 2026 (video)
- 100 Hours Testing Claude Code vs ChatGPT Codex (honest results), Nate Herk | AI Automation, May 26, 2026 (video)
- Claude Code vs Codex vs Cursor (an honest comparison), Theo - t3․gg, May 26, 2026 (video)
- Terminal-Bench 4.0 leaderboard, tbench.ai, read Nov 6, 2026
- Plans and pricing, Anthropic, read Nov 6, 2026
- Claude Code product page, Anthropic, read Nov 6, 2026
- Claude Code overview, Claude Code Docs, read Nov 6, 2026
- Model configuration, Claude Code Docs, read Nov 6, 2026
- Manage costs effectively, Claude Code Docs, read Nov 6, 2026
- Commands, Claude Code Docs, read Nov 6, 2026
- Data usage, Claude Code Docs, read Nov 6, 2026
- anthropics/claude-code, GitHub, read Nov 6, 2026
- Introducing Claude Opus 5.5, Anthropic, Sep 22, 2026
- Introducing Claude Sonnet 5.5, Anthropic, Sep 28, 2026
- Codex pricing, OpenAI, read Nov 6, 2026
- openai/codex, GitHub, read Nov 6, 2026
- Models, OpenAI, read Nov 6, 2026
- Plans and Pricing - ChatGPT, OpenAI, read Nov 6, 2026
- WebDev leaderboard, Arena, read Nov 6, 2026
- SWE-bench leaderboards, SWE-bench, read Nov 6, 2026
- Stack Overflow Developer Survey 2026: AI data, Stack Overflow, read Nov 6, 2026
Moments
100 Hours Testing Claude Code vs ChatGPT Codex (honest results)
Nate Herk | AI Automation
Codex vs Claude - an Honest Comparison
Tech With Tim
Claude Code vs Codex vs Cursor (an honest comparison)
Theo - t3․gg
See also
-
Claude CodeClaude Code is Anthropic's agentic coding tool. It reads a codebase, edits files, runs commands and opens pull requests from the terminal, VS Code, JetBrains IDEs, the Claude desktop app, the browser and Slack, and it comes with every paid Claude plan or a pay-as-you-go Console account. -
Claude Opus 5.5Claude Opus 5.5 is Anthropic's recommended starting model, released on Sep 22, 2026 at $4 input and $20 output per million tokens on the Claude API, with a 1M-token context window. It is on every paid Claude plan and is the default model in Claude Code. -
Claude Sonnet 5.5Claude Sonnet 5.5 is Anthropic's mid-priced model, released on Sep 28, 2026 at $2 input and $10 output per million tokens with a 1M-token context window. It is on every Claude plan including Free, and costs half as much as Claude Opus 5.5. -
Claude BenchmarksAs of Nov 6, 2026, Claude Opus 5.5 leads Terminal-Bench 4.0 and WebDev Arena, ranks third on Arena's text board behind two Gemini 4 models, second on the Artificial Analysis index, and third on ARC-AGI-2 behind two OpenAI models. Anthropic's own launch tables run a few points higher than the public boards. -
Claude Code PricingClaude Code is included in every paid Claude plan, from Pro at $20 a month (or $17 billed annually) to Max at $100 and Ultra at $200, and shares their usage limits; it is not in the free plan. With a Console account it is billed per token at API rates instead, which Anthropic says averages about $13 per developer per active day.
-
Claude MaxClaude Max is Anthropic's $100-a-month plan with five times Claude Pro's usage every five hours and every week, Fable included up to half the weekly limit, $100 a month in API credits and priority access.