Choose Claude Code if you want higher coding scores in most independent tests and steer the agent as it works, from $20 a month with Claude Pro. Choose Codex if you want lower cost per task, fewer tokens used and an open-source CLI, from $20 a month with ChatGPT Plus.
Prices checked November 6, 2026, on Claude’s and OpenAI’s own pricing pages. Test results are dated where each source gives a date.
Codex vs Claude Code at a Glance
Is Codex better than Claude Code? Not across the board. Claude Code led 3 of the 4 benchmark results below, while Codex cost 38% less per task and used about 4.5 times fewer tokens.
| Feature | Claude Code | OpenAI Codex |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Cheapest plan with it | Claude Pro: $20 a month, or $17 billed yearly | ChatGPT Plus: $20 a month |
| In a free plan | ✗ | Limited, in ChatGPT Free and Go |
| Pay per token with an API key | ✓ Claude Console | ✓ OpenAI API |
| Default model | Claude Opus 5.5 | GPT-6.1 Sol |
| Open source | ✗ | ✓ CLI, Apache 2.0 |
| Where it runs | Terminal, VS Code, JetBrains, desktop app, web, mobile | Terminal, VS Code, JetBrains, desktop app, web, iOS |
| Coding agent index (top model) | 62 (Opus 5.5) | 55 (GPT-6 Astra) |
| Cost per test task (top model) | $11.42 | $7.04 |
The last two rows are from Artificial Analysis at maximum effort and API prices, checked November 6, 2026 (independent source).
What is Claude Code? Claude Code is Anthropic’s coding agent. It reads your codebase, edits files, runs commands and opens pull requests, in your terminal, editor, the Claude desktop app or the browser.
What is OpenAI Codex? Codex is OpenAI’s coding agent. It does the same jobs from an open-source command-line tool, editor extensions, the ChatGPT desktop app and the web, and can run tasks in the cloud while you work on something else. This is the agent OpenAI launched in 2025, not the 2021 Codex model behind the first version of GitHub Copilot.
Verdict: Claude Code wins on benchmark scores and on speed in hands-on use with mid-price models. Codex wins on cost per task, token use and openness, and topped the Terminal-Bench 2.1 leaderboard.
How we compared them: This is a research comparison, not our own hands-on test. On November 6, 2026, we checked Claude’s and OpenAI’s pricing pages, Anthropic’s Claude Code docs, OpenAI’s Codex pricing page and the Codex GitHub repository. For quality, speed and cost, we use three independent sources: Artificial Analysis’s coding agent index, the Terminal-Bench 2.1 leaderboard and a dated 48-run test on real tickets. Claude Code is made by Anthropic and Codex by OpenAI, and SmartWorkflowLab has no sponsorship or affiliate deal with either company.
5 Key Differences Between Codex and Claude Code
- Cost per task. Codex used less than a quarter of Claude Code’s tokens in Artificial Analysis’s runs, so each task cost less at API prices.
- Scores. Claude Code scored higher on Artificial Analysis’s index, while Codex CLI holds the top Terminal-Bench 2.1 score.
- Working style. Claude Code suits developers who steer the agent; Codex suits handing off a task and checking back, according to the October 2026 test cited below.
- Openness. The Codex CLI is open source; Claude Code is proprietary.
- Limits. Claude Code’s limits are shared with Claude chat, while OpenAI publishes estimated message ranges per model for Codex.
Pricing Compared
Both tools are included in their company’s chat subscriptions, and both can also be billed per token with an API key.
Claude Code plans
| Plan | Price | Usage | Claude Code |
|---|---|---|---|
| Free | $0 | Limited | ✗ |
| Pro | $20 a month, or $17 billed yearly | 1x | ✓ |
| Max | $100 a month | 5x Pro | ✓ |
| Ultra | $200 a month | 10x Pro each week, no five-hour limit for verified accounts | ✓ |
| Team, standard seat | $25 a month, or $20 billed yearly | More than Pro | ✓ |
| Team, premium seat | $125 a month, or $100 billed yearly | 5x a standard seat | ✓ |
Source: Claude’s pricing page, checked November 6, 2026. Max and Ultra are billed monthly only, and include $100 and $200 a month of API credits.
Codex plans
| Plan | Price | Codex use |
|---|---|---|
| Free | $0 | GPT-6 Luna in the desktop app, subject to rollout |
| Go | $8 a month | Same as Free |
| Plus | $20 a month | Web, CLI, editor and iOS; about 15 to 160 GPT-6.1 Sol messages every five hours |
| Pro | $100, $200 or $500 a month | No five-hour limit; Ultrafast mode on the $500 plan |
| Business | $25 a user a month, or $20 billed yearly | Larger cloud machines, SAML SSO, 2 users minimum |
| API key | Pay per token | CLI, SDK and editor, but no cloud features such as GitHub code review |
Source: OpenAI’s Codex pricing page, checked November 6, 2026. OpenAI calls its message ranges estimates and says weekly limits may also apply.
What a task really costs
| Test setup | Claude Code | Codex |
|---|---|---|
| Top models, maximum effort | $11.42 a task, 14.5M tokens | $7.04 a task, 3.23M tokens |
| Mid-price models, per solved ticket | $0.43 (Sonnet 5.5) | $0.44 (GPT-6.1 Sol) |
| Cheapest models, per solved ticket | $0.19 (Haiku 5.5) | $0.05 (GPT-6 Luna) |
Sources: Artificial Analysis, with Claude Opus 5.5 and GPT-6 Astra at API prices; Felipe Fontoura’s October 22, 2026 test for the other two rows (independent sources).
At maximum effort, Claude Code also took 146 turns per task, against 39 for Codex. With mid-price models the cost gap disappears; with the cheapest models, Codex is about four times cheaper per solved ticket.
Verdict: The subscriptions cost the same, so the real difference is how far each one goes. Codex does more work per token at top effort, which matters most if you pay per token or hit limits often.
Benchmarks and Independent Tests
| Test | Date | Claude Code | Codex | Higher score |
|---|---|---|---|---|
| Artificial Analysis coding agent index | Checked Nov 6, 2026 | 62 (Opus 5.5) | 55 (GPT-6 Astra) | Claude Code |
| Terminal-Bench 4.0, via Artificial Analysis | Checked Nov 6, 2026 | 63 (Opus 5.5) | 56 (GPT-6 Astra) | Claude Code |
| Terminal-Bench 2.1 leaderboard | Sep 3, 2026 (Codex); Jun 9, 2026 (Claude Code) | 83.8% (Fable 5) | 87.4% (GPT-6 Astra) | Codex |
| 48 runs on 8 real tickets | Oct 22, 2026 | 22 of 24 runs passed | 21 of 24 runs passed | Claude Code |
Sources: Artificial Analysis, Snorkel’s Terminal-Bench 2.1 leaderboard and Felipe Fontoura’s test (independent sources).
Four things to keep in mind:
- Two Terminal-Bench versions. Artificial Analysis reports its own runs as Terminal-Bench 4.0, while Snorkel’s public leaderboard uses version 2.1. They use different task sets, so their scores can’t be compared with each other, only within each test.
- The leaderboard is behind. Snorkel’s Terminal-Bench 2.1 list doesn’t yet include Claude Opus 5.5 or Fable 5.1, so Codex’s lead there compares against an older Claude model.
- How the ticket test ran. Each tool ran every ticket three times: twice on its mid-price model (Sonnet 5.5 or GPT-6.1 Sol) and once on its cheap model (Haiku 5.5 or GPT-6 Luna). All 42 runs on the seven clear tickets passed. The difference came from one large ticket, which Claude Code solved in one of its three runs and Codex in none. The author tested one repository in one language.
- The results move. In September 2026, Atomic Bot reported Artificial Analysis’s index at 62.2 for Claude Code and 61.6 for Codex, almost a tie.
What about SWE-bench? SWE-bench Verified and SWE-bench Pro scores are published for AI models rather than for Claude Code or Codex as tools, and each lab runs them with its own setup, so we left them out of this table.
Verdict: Claude Code has the edge on most scores today, but the margins are small and change with each model release.
Speed and Working Style
The tests disagree on speed because they measure different things:
- At maximum effort, Codex took 24.8 minutes per task against 1.0 hour for Claude Code in Artificial Analysis’s runs.
- With mid-price models on everyday tickets, Claude Code took a median 1.7 minutes per run against 3.7 for Codex, in Felipe Fontoura’s test.
- With the cheapest models, Haiku 5.5 took a median 2.3 minutes and GPT-6 Luna 7.6.
The same test found a difference in style. Codex wrote more tests, a median 98 test lines against 45, and ran more commands, 23 against 13. The author concluded that Claude Code suits developers who steer the agent and want fast answers, while Codex suits developers who hand off a ticket and check the result later. Neither tool changed unrelated code or reported “done” on failing checks.
Verdict: Claude Code feels faster when you work alongside it; Codex is built for handing work off.
Models and Effort Levels
Claude Code defaults to Claude Opus 5.5 at medium effort on Pro, Max, Team, Enterprise and the API, according to Anthropic’s model configuration docs:
- Switch to
sonnet(Sonnet 5.5) for daily coding,haiku(Haiku 5.5) for simple tasks, orfable(Fable 5.1) for the hardest, longest tasks. opusplanuses Opus while planning, then Sonnet to write the code.- Effort runs from
lowtomax, and Opus 5.5 and Sonnet 5.5 use a 1 million token context window by default. - Fable is included on Max and Ultra for up to half of your weekly limits, and on Pro through paid usage credits, according to Claude’s pricing page.
Codex defaults to GPT-6.1 Sol since Codex CLI v0.161.0 on October 6, 2026, according to the release notes mirrored on Releasebot:
- GPT-6.1 Terra and GPT-6 Luna use fewer credits and allow many more messages; GPT-6 Astra costs the most credits and allows the fewest messages, according to OpenAI’s Codex pricing page.
- Fast mode uses purchased credits at twice the standard rate, and Ultrafast, on the $500 Pro plan, at six times.
- Codex can also run through Amazon Bedrock and Google Cloud’s Vertex AI.
Claude Code can likewise run through Amazon Bedrock, Google Cloud’s Agent Platform and Microsoft Foundry, billed to your cloud account.
Verdict: Both let you trade cost for power by switching models. Codex shows clearer usage ranges for each model; Claude Code documents a 1 million token window for its default models.
Setup and Permissions
Installing Claude Code, according to Anthropic’s overview docs:
- macOS, Linux and WSL:
curl -fsSL https://claude.ai/install.sh | bash - Windows PowerShell:
irm https://claude.ai/install.ps1 | iex, with Git for Windows recommended - Or Homebrew (
brew install --cask claude-code) or WinGet - Sign in with a Claude subscription, or a Claude Console account for per-token billing.
Installing Codex, according to the Codex GitHub repository:
- Any system with Node.js:
npm install -g @openai/codex - Or Homebrew (
brew install --cask codex), or installer scripts for macOS, Linux and Windows PowerShell - Sign in with a ChatGPT plan, or with an OpenAI API key.
Both ask before they act by default, and both let you loosen that as you build trust:
| What you want | Claude Code mode | Codex setting |
|---|---|---|
| Ask before each new action | default (Manual) |
--ask-for-approval on-request |
| Accept edits in your project | acceptEdits |
--sandbox workspace-write |
| Explore and plan without editing | plan |
--sandbox read-only |
| Fewer prompts, with a safety check | auto (a classifier reviews each action) |
--approve-for-me (automatic approval review) |
| No checks, for containers only | bypassPermissions |
--yolo or --sandbox danger-full-access |
Sources: Claude Code permissions docs, checked November 6, 2026; Developers Digest’s Codex CLI flags reference, last verified October 17, 2026 (independent source).
For scripts and CI, both have a non-interactive mode: claude -p "your task" and codex exec. To build your own agents, Anthropic offers the Claude Agent SDK and OpenAI the Codex SDK.
Claude Code’s auto mode and Codex’s automatic approval review do a similar job, cutting prompts without turning safety off.
Features Compared
| Feature | Claude Code | OpenAI Codex |
|---|---|---|
| Instructions file | CLAUDE.md, and it can read AGENTS.md | AGENTS.md |
| MCP servers | ✓ | ✓ |
| Skills and plugins | ✓ | ✓ |
| Hooks | ✓ before and after actions | ✓ |
| Parallel agents | Subagents and background agents | Multi-agent and managed Git worktrees |
| Cloud tasks | Web and mobile sessions, plus scheduled tasks | Codex web, with GitHub issue and PR delegation |
| Code review and chat | GitHub code review, GitHub Actions, Slack | GitHub code review, Slack, Linear |
Sources: Claude Code overview, Codex on GitHub, OpenAI’s Codex pricing page and Blake Crosley’s Codex guide, updated November 2, 2026 (independent source).
Two differences stand out. Claude Code can run on a schedule in the cloud, for jobs like a morning pull request review, and you can move a session between your terminal, phone and desktop. Codex’s CLI is open source, with 128,000 GitHub stars, so you can read the code, file fixes or run it with other model providers.
Verdict: The feature lists are now close. Pick on models and price, not on features.
Usage Limits, Token Limits and Reliability
Claude Code
- Pro and Max have a five-hour limit and a weekly limit, and both are shared with Claude chat.
- On September 14, 2026, Anthropic raised standard weekly limits by 25% but ended a temporary 50% boost, a net 17% cut from what users had, as BleepingComputer reported.
- Anthropic says usage depends on conversation length, model, tools and effort, so there’s no fixed message count.
Codex
- OpenAI publishes estimated ranges for each model every five hours on Plus, from 5 to 45 messages on GPT-6 Astra to 350 to 3,000 on GPT-6 Luna.
- Cloud tasks may use more of your allowance than local ones.
- Pro has no five-hour limit.
Reliability, July to September 2026
| Measure | Claude Code | Codex |
|---|---|---|
| Reported uptime | About 99.4% | 100% |
| Incidents listed | 35 | 9 |
Source: Atomic Bot’s September 23, 2026 review of Anthropic’s and OpenAI’s status pages. Atomic Bot sells hosted AI agents, including Codex. OpenAI’s uptime figure doesn’t count incidents marked “degraded performance.”
Verdict: Codex gives clearer limits and had fewer incidents in that period. Claude Code’s shared limits are the most common complaint from heavy users.
Privacy and Security
- Claude Code: On Pro and Max, Anthropic trains on your sessions only if you turn that setting on. Team, Enterprise and API use isn’t used for training, according to Anthropic’s data usage docs.
- Codex: ChatGPT’s Data Controls let you turn off model training, according to OpenAI’s help center.
Before you send client code to any AI tool, read our guide on whether it’s safe to put client information into ChatGPT.
Downsides of Each
Claude Code downsides vs Codex
- Higher cost and many more tokens per task at maximum effort.
- Usage limits shared with Claude chat, with no published message count.
- Not open source, and not included in Claude’s Free plan.
Codex downsides vs Claude Code
- Lower scores on Artificial Analysis’s index and in the October ticket test.
- Slower with mid-price models in hands-on use.
- Using it with an API key drops cloud features such as GitHub code review.
Which Should You Choose?
- “I want the highest scores on hard tasks.” Claude Code.
- “I pay per token or keep hitting limits.” Codex.
- “I like to steer the agent as it works.” Claude Code.
- “I want to hand off tickets and review them later.” Codex.
- “I want open-source tooling I can inspect.” Codex.
- “I already pay for ChatGPT Plus or Claude Pro.” Start with the one you have, since each comes included.
- “I want both.” Keep one AGENTS.md file, plan and pair with Claude Code, and send well-defined tasks to Codex in the cloud.
Alternatives to Consider
- GitHub Copilot CLI, Cursor and Google’s Antigravity CLI, which replaced Gemini CLI for free users, are the other tools most developers weigh. Our Claude Code alternatives guide compares them with Codex, OpenCode and more.
- For an AI editor instead of a terminal agent, see our Cursor Pro vs ChatGPT Plus comparison.
Frequently Asked Questions
Is Codex better than Claude Code?
Neither wins every test. Claude Code led 3 of the 4 benchmark results we found, including Artificial Analysis’s coding agent index at 62 to 55. Codex topped the Terminal-Bench 2.1 leaderboard and cost 38% less per task at maximum effort. The fairest check is to run the same task in both on your own code.
Which is cheaper, Codex or Claude Code?
Both start at $20 a month, with ChatGPT Plus for Codex and Claude Pro for Claude Code, and Claude Pro drops to $17 a month billed yearly. The next step up is $100 for both. In Artificial Analysis’s tests at API prices, a Codex task cost $7.04 against $11.42 for Claude Code, because Codex used far fewer tokens.
Which has higher usage limits on the $20 plan?
It’s hard to say, because neither company publishes exact numbers. OpenAI estimates 15 to 160 GPT-6.1 Sol messages every five hours on Plus. Anthropic gives no message count for Pro, and its limits are shared between Claude chat and Claude Code. Both plans also have weekly limits, and both sell extra usage.
Is Codex free?
Only in a limited way. ChatGPT Free and Go include some Codex use with GPT-6 Luna in the desktop app, subject to rollout, while Claude’s Free plan doesn’t include Claude Code. Beyond that, neither is free. Both can run with an API key and per-token billing, and the Codex CLI itself is open source.
Is Claude Code open source?
No. Claude Code is proprietary software from Anthropic, while OpenAI’s Codex CLI is open source on GitHub under the Apache 2.0 license. Both can read an AGENTS.md instructions file, connect to MCP servers and be extended with skills and plugins.
Which is faster, Codex or Claude Code?
It depends on the test. In Artificial Analysis’s runs at maximum effort, Codex took 24.8 minutes per task against 1.0 hour for Claude Code. In an October 2026 test on eight real tickets with mid-price models, Claude Code took a median 1.7 minutes per run against 3.7 for Codex.
Can I use Codex and Claude Code together?
Yes, and many developers do. Both work in the terminal and in VS Code, and both read AGENTS.md, so one instructions file covers the two. A common split is Claude Code for planning and interactive work, and Codex for tasks you hand off to the cloud and review later.
Sources
- Anthropic: Claude pricing, Claude Code overview, model configuration, permissions and data usage docs, checked November 6, 2026
- OpenAI: Codex pricing, Codex on GitHub and data controls help article, checked November 6, 2026; Codex release notes mirrored on Releasebot, September 29 to October 29, 2026, because OpenAI’s own changelog page couldn’t be reached
- Tests and benchmarks: Artificial Analysis, Claude Code vs Codex, checked November 6, 2026; Snorkel’s Terminal-Bench 2.1 leaderboard, checked November 6, 2026; Felipe Fontoura, Codex vs Claude Code, October 22, 2026 (independent sources)
- Limits and reliability: BleepingComputer on Claude Code weekly limits (independent source); Atomic Bot, Codex vs Claude Code, September 23, 2026, from a company that sells hosted AI agents including Codex
- Setup and features: Developers Digest’s Codex CLI flags reference, last verified October 17, 2026, and Blake Crosley’s Codex guide, updated November 2, 2026 (independent sources)






