Codex vs Claude Code: a fair side-by-side for 2026
What OpenAI Codex and Anthropic Claude Code each cost, where they run, what they can do, and which kind of developer should pick which.
Last updated
Codex and Claude Code are the same kind of tool: a coding agent that reads your repo, edits files, runs commands and hands you a diff. Both start at $20 a month, both run in the terminal, your editor, a desktop app and the cloud, and both support MCP, skills, plugins, subagents and hooks. The real differences are the models (OpenAI's GPT-6.x family against Anthropic's Claude), how each one keeps commands on a leash by default, which extras each plan includes, and a handful of platform details that may decide it for you.
Short version: pick Codex if you want a free way to try it, an open-source CLI, the OS sandbox on by default (including native Windows), GitLab in the cloud, or local open models. Pick Claude Code if you want Claude models, JetBrains as a first-class editor, the deepest customization (hooks, plugin marketplaces, agent teams), or a plan with no 5-hour window. If you already pay for ChatGPT Plus or Claude Pro, start with the one you have.
Every fact below was checked on OpenAI's and Anthropic's own pages on November 29, 2026. Both products ship changes weekly, so treat model names and prices as dated.
Codex vs Claude Code at a glance
This is the whole comparison in one table, as of November 29, 2026. Prices are USD per month.
| Codex (OpenAI) | Claude Code (Anthropic) | |
|---|---|---|
| What it is | OpenAI's coding agent, part of ChatGPT | Anthropic's coding agent, part of Claude |
| Free plan | Limited: GPT-6 Luna in the ChatGPT desktop app, "subject to rollout" | Not included on the free Claude plan |
| Cheapest plan with the CLI | ChatGPT Plus, $20 | Claude Pro, $20 ($17 billed annually) |
| Higher individual plans | Pro at $100, $200 or $500 | Max at $100 ("5x Pro usage"), Ultra at $200 ("10x Pro usage") |
| Team plans | Business, $20 per user billed annually ($25 monthly) | Team, $20 or $25 per standard seat, $100 or $125 per premium seat |
| 5-hour limit | Plus and Business Standard; none on Pro "currently" | Pro and Max; none on Ultra for verified accounts |
| Weekly limit | Yes, on top | Yes, on top |
| Pay per token instead | API key (CLI, SDK, IDE; no cloud features) | API key or Claude Console account |
| Models | GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna and others | Opus 5.5 (default), Sonnet 5.5, Haiku 5.5, Fable |
| Other model sources | --oss with LM Studio or Ollama; custom providers with a Responses API endpoint |
Claude through Amazon Bedrock, Google Cloud, Microsoft Foundry or an LLM gateway |
| Terminal CLI | macOS, Linux, Windows | macOS, Linux, WSL, Windows |
| Editors | VS Code, Cursor, Windsurf, VS Code Insiders; Xcode and JetBrains through their own integrations | VS Code and Cursor extension; JetBrains plugin |
| Desktop app | Inside the ChatGPT desktop app | Claude desktop app (macOS, Windows; Linux in beta) |
| Cloud tasks | Codex Cloud, GitHub or GitLab (GitLab integration marked beta) | Cloud sessions, cloning from GitHub |
| Instruction file | AGENTS.md |
CLAUDE.md, or reads AGENTS.md if there's no CLAUDE.md |
| MCP | Yes, stdio and streamable HTTP | Yes, stdio, SSE, HTTP and WebSocket |
| Skills | SKILL.md, Agent Skills standard, $ to invoke |
SKILL.md, Agent Skills standard, / to invoke |
| Plugins | One directory shared with ChatGPT | Marketplaces, including Anthropic's official one |
| Subagents | Yes, on by default; custom agents in TOML | Yes, built-in Explore and Plan; custom agents in Markdown |
| Default safety | OS sandbox on (workspace-write) |
Auto mode with a safety classifier; OS sandbox off until you turn it on |
| CLI source | Open source, Apache 2.0 | Not open source ("All rights reserved") |
The rest of the page explains the rows that matter most when you choose.
Price and included usage
On price alone they are close. Both start at $20 a month for the CLI, both have a $100 and a $200 tier, and both meter usage with a 5-hour window and a weekly limit rather than a fixed number of messages.
| Tier | Codex | Claude Code |
|---|---|---|
| $0 | Free: limited Codex in the desktop app | Free: no Claude Code |
| $8 | Go: GPT-6 Luna in the desktop app | No equivalent |
| $20 | Plus: web, CLI, IDE extension, iOS, cloud code review, Slack | Pro: Claude Code everywhere, "more usage than Free" |
| $100 | Pro 100: no 5-hour limit currently | Max: "5x Pro usage", Fable models up to half your weekly limit |
| $200 | Pro 200: more usage than Pro 100 | Ultra: "10x Pro usage" per week, no 5-hour limit once verified |
| $500 | Pro 500: the most usage, plus Ultrafast mode | No equivalent |
Three differences are worth knowing before you pay:
- Only Codex has a free entry point. It is small (one efficient model, in the desktop app, rolling out), but it lets you try the agent loop for nothing. Claude Code needs a paid plan or API credit; Anthropic's docs say "the free claude.ai plan does not include Claude Code access."
- They drop the 5-hour window at different prices. On Codex, the $100 Pro plan already has no 5-hour limit. On Claude, you need the $200 Ultra plan (Max at $100 keeps the window).
- Only OpenAI publishes numbers. OpenAI gives estimated ranges per 5 hours on Plus, for example 17-180 local messages with GPT-6.2 Sol and 350-3,000 with GPT-6 Luna. Anthropic publishes only multipliers relative to Pro. Neither company promises a fixed count, so neither number is a cap.
In both products the coding agent shares one pool with the rest of the subscription: Codex shares it with ChatGPT Work, and Claude Code shares it with your Claude chats. A long chat or Work task in the morning leaves less for coding.
The details, including what happens when you hit a limit and how to buy more, are on their own pages: Codex limits and Claude Code pricing. If you are weighing Claude's own tiers, see Claude Pro vs Max.
On the API
Both can skip the subscription and bill per token. Codex with an API key works in the CLI, SDK and IDE extension, but OpenAI's pricing page says "no cloud-based features (GitHub code review, Slack, etc.)". GPT-6.2 Sol costs $2 input and $10 output per million tokens there. Claude Code on an API key or Console account bills Opus 5.5 at $4 input and $20 output, or Sonnet 5.5 at $2 and $10. Anthropic says the enterprise average is "around $13 per developer per active day." Token prices alone don't tell you which is cheaper per task, because the two agents use different numbers of tokens for the same job.
Where each one runs
Both have spread to the same places. The differences are in the details.
Terminal. Both CLIs run on macOS, Linux and Windows. Codex installs with a shell script, npm or Homebrew; Claude Code with a native installer, Homebrew, WinGet or Linux package managers. Installation for each is on what is Codex and how to use Claude Code.
Editors. Codex's extension covers VS Code, Cursor, Windsurf and VS Code Insiders, and OpenAI lists Xcode and JetBrains IDEs as having "their own integrations". Claude Code has an extension for VS Code and Cursor and a dedicated plugin for IntelliJ IDEA, PyCharm, WebStorm and other JetBrains IDEs. If you live in Xcode, Codex is the one with a documented path; if you live in JetBrains, both work and Claude Code's plugin is its own product.
Desktop app. Codex no longer has a separate app: it lives in the ChatGPT desktop app, where you choose ChatGPT or Codex. Claude Code is the Code tab of the Claude desktop app, on macOS and Windows with Linux in beta on Ubuntu and Debian. Both let you run sessions side by side and schedule recurring tasks.
Cloud. Both can run a task on the vendor's machines while your laptop is closed, then give you a branch or pull request. Codex Cloud works with "your connected GitHub or GitLab account" (OpenAI's docs label its GitLab integration beta). Claude Code's cloud sessions clone from GitHub; for GitLab or Bitbucket you can upload a local bundle, but the session "can't push results back to that remote". From the terminal, codex cloud lists and applies cloud tasks (it is marked experimental), and claude --cloud "task" starts a cloud session that claude --teleport can later pull back into your terminal.
Phone and chat. Codex runs in the ChatGPT mobile app; Plus lists Codex "on iOS". Claude Code runs in the Claude app for iOS and Android, and Remote Control lets you steer a session that is running on your own computer. For team chat, Codex has a Slack integration from Plus upward; Anthropic's Slack routing (Claude Tag) is for Team and Enterprise plans.
Features compared
Here's where people expect big gaps and mostly don't find them. Both agents now share the same building blocks, often in the same file format.
Instruction files
Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and Anthropic's docs say that if your repository "already has an AGENTS.md for other coding agents, Claude Code can read that in place of a CLAUDE.md." So one file can serve both agents. Claude Code also has a claude import command that pulls config from Codex, Gemini or Cursor, which helps if you switch.
MCP
Both are MCP clients: you connect databases, issue trackers, docs and browsers the same way. Codex adds a server with codex mcp add and stores it in ~/.codex/config.toml (or .codex/config.toml for a trusted project). Claude Code uses claude mcp add and can share project servers through a committed .mcp.json. Every server adds context to each message on both. New to the protocol? Start with what is MCP.
Skills and plugins
Both use SKILL.md folders and both say they follow the open Agent Skills standard, so a well-written skill can move between them. Codex looks in .agents/skills in the repo and $HOME/.agents/skills, and you call one with $. Claude Code looks in .claude/skills and ~/.claude/skills, and you call one with /skill-name. Both can also pick a skill on their own when your request matches its description. More on writing them in Claude Code skills.
Plugins bundle skills, MCP servers and hooks. Codex says "ChatGPT and Codex share one universal plugin directory," managed with codex plugin. Claude Code installs plugins from marketplaces, catalogs anyone can host, and adds Anthropic's official marketplace on first run. Claude Code plugins can also carry subagent definitions and a hooks module.
Subagents
Both can split a task across parallel agents with their own context. Codex says "current Codex releases enable subagent workflows by default"; you usually ask for them, and custom agents are TOML files in .codex/agents/. Claude Code ships built-in subagents (Explore, Plan, general-purpose) that it uses on its own, and custom ones are Markdown files in .claude/agents/. Claude Code also has experimental agent teams, a coordinated group of sessions it spawns and supervises.
Hooks, scripting and CI
Both have hooks (run your own command at points in the agent's lifecycle), a non-interactive mode for scripts (codex exec, claude -p), a code review command (codex review, and Claude Code's /code-review or the cloud claude ultrareview), a GitHub Action, and an SDK for building your own agents. Claude Code also documents GitLab CI/CD.
Permissions and sandboxing
This is the clearest real difference in defaults.
Codex runs commands inside an operating-system sandbox by default. The default mode, workspace-write, lets it edit files and run routine commands inside your project, using Seatbelt on macOS, bubblewrap on Linux and WSL2, and a native Windows sandbox in PowerShell. You loosen it with --sandbox danger-full-access, or skip everything with --dangerously-bypass-approvals-and-sandbox, which the CLI itself calls "EXTREMELY DANGEROUS".
Claude Code leans on permission modes. Since version 2.1.283, interactive sessions start in auto mode, where a classifier checks each action in the background; you can switch to Manual, acceptEdits, plan or others with Shift+Tab. It also has an OS-level sandbox for shell commands (Seatbelt on macOS, bubblewrap on Linux and WSL2) that blocks network access except to domains you allow, but "the sandbox is off by default." You turn it on with /sandbox. On native Windows, Claude Code "runs commands unsandboxed"; you need WSL2 for the sandbox.
If you want strong isolation without configuring anything, Codex's default is stricter. If you want fewer prompts and finer rules per tool, Claude Code's modes and allow lists give you more knobs. Either way, the "skip everything" flags belong in a throwaway container.
Open source
The Codex CLI is open source on GitHub (openai/codex) under the Apache 2.0 license; you can read it, fork it and build it. Claude Code is not: the public anthropics/claude-code repository holds docs, plugins and the changelog, and its license file says "All rights reserved" under Anthropic's commercial terms. In both cases the models, apps and cloud are closed services.
Models
This is the part that actually changes your diffs, and it is the part nobody can settle with a table.
Codex runs OpenAI's GPT models. OpenAI's models page recommends GPT-6.2 Astra "for demanding projects", GPT-6.2 Sol "for everyday tasks", GPT-6.1 Terra as fast and efficient, and GPT-6 Luna as "our most efficient model for focused, high-volume tasks". If you don't choose, Codex uses "a recommended model". The CLI can also run open models locally with --oss, through LM Studio or Ollama.
Claude Code runs Anthropic's Claude models. The default is Opus 5.5 on every paid plan and the API; sonnet is "for daily coding tasks", haiku for simple ones, and fable for "your hardest and longest-running tasks". Fable is included on Max and Ultra up to half your weekly limit, and on Pro only through paid usage credits. Claude Code can reach Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry, which matters if your company buys AI through a cloud provider, but it is built for Claude models only.
Benchmarks between the two age in weeks, and the comparison pages ranking for this search still quote models two generations old. The fair test is yours: give both agents the same real task in the same repo, with the same instruction file, and compare the diffs and how much of your allowance each used. Agents also do noticeably better in a codebase with clear conventions, real tests and an AGENTS.md, whichever one you pick; that is what RailsFast ships for Rails apps.
Which should you pick?
There is no overall winner. Here is who each one fits, based on what the vendors document today.
| If you... | Pick | Why |
|---|---|---|
| Want to try a coding agent for $0 | Codex | The ChatGPT Free plan includes limited Codex; Claude's free plan has no Claude Code |
| Already pay for ChatGPT Plus or Claude Pro | The one you have | Both $20 plans include the full CLI, editor extension and cloud |
| Want no 5-hour window for $100 | Codex | Pro 100 has no 5-hour limit currently; Claude Max keeps it |
| Want the most usage at $200 | Either; compare | Claude Ultra is "10x Pro usage" with no 5-hour limit; Codex Pro 200 publishes no number |
| Need more than $200 a month of usage | Codex | Pro 500 has no Claude equivalent (or use either on the API) |
| Want sandboxing on by default, or work on native Windows | Codex | Its OS sandbox is on by default, including a native Windows sandbox |
| Prefer Claude models, or your company buys through Bedrock, Google Cloud or Foundry | Claude Code | It runs Claude only, through Anthropic or those clouds |
| Work in JetBrains | Claude Code | It has its own JetBrains plugin; OpenAI says JetBrains IDEs "provide their own integrations" for Codex |
| Work in Xcode | Codex | OpenAI documents an Xcode integration |
| Host code on GitLab and want cloud tasks | Codex | Codex Cloud works with a connected GitLab account (the GitLab integration is marked beta); Claude's cloud needs GitHub to push |
| Want to read or modify the agent's source, or run local models | Codex | Apache 2.0 CLI, --oss with LM Studio or Ollama |
| Want to customize the agent heavily (hooks, plugin marketplaces, agent teams) | Claude Code | It has the widest set of documented extension points |
| Want one agent for a team in Slack | Depends on plan | Codex Slack from Plus; Claude Tag on Team and Enterprise |
Many developers end up keeping both, since a shared AGENTS.md and portable skills make switching cheap. If you're also weighing an AI editor rather than a terminal agent, see Claude Code vs Cursor. When either one starts throwing errors, check Codex status or Claude Code status before you debug your setup.
Frequently asked questions
Is Codex better than Claude Code?
Neither is better at everything. As of November 2026, Codex has a free entry point, an open-source CLI, a stricter default sandbox and no 5-hour limit at $100; Claude Code has Claude models, a JetBrains plugin, more customization and no 5-hour limit at $200. The quality of the code depends mostly on the model and your repo, so test both on the same real task.
Claude vs Codex: which is better for coding?
"Claude" for coding usually means Claude Code, Anthropic's agent, which uses Claude models such as Opus 5.5. Codex is OpenAI's agent, using GPT models such as GPT-6.2 Sol. Both are full coding agents with a CLI, editor extensions, a desktop app and cloud tasks from $20 a month, so the choice comes down to the model you prefer and the plan details on this page.
Is Codex cheaper than Claude Code?
At the entry level they cost the same: $20 a month for ChatGPT Plus or Claude Pro, as of November 2026. Codex is cheaper to try (there is a limited free version) and drops the 5-hour limit at $100 instead of $200. Claude Pro is a little cheaper billed annually, at $17 a month.
What is the difference between the Codex and Claude Code token limits?
Neither publishes a token allowance. Both use a 5-hour window plus a weekly limit, shared with the rest of the subscription. OpenAI publishes estimated message ranges per model on Plus (for example 17-180 local messages per 5 hours with GPT-6.2 Sol), while Anthropic only publishes multipliers such as "5x Pro usage" on Max. See Codex limits and Claude Code pricing for the details.
Claude 20x vs Codex 20x: which is the better top plan?
Neither company sells a plan called "20x" as of November 2026. Claude's top individual plan is Ultra at $200 a month, described as "10x Pro usage" per week with no 5-hour limit for verified accounts. Codex's top plan is Pro 500 at $500 a month, with Pro 100 and Pro 200 below it; OpenAI doesn't publish a multiplier for any of them.
Codex 5.5 vs Claude Code Opus 4.7: are those still the models to compare?
No. Those are older models. As of November 29, 2026, OpenAI recommends GPT-6.2 Astra and GPT-6.2 Sol for Codex, and Claude Code defaults to Opus 5.5 with Sonnet 5.5, Haiku 5.5 and Fable available. Comparisons that quote the older versions are out of date.
Can I use Codex and Claude Code on the same project?
Yes. Codex reads AGENTS.md, and Claude Code reads AGENTS.md when there is no CLAUDE.md, so one instruction file can serve both. Skills in the SKILL.md format work in both, and claude import codex can bring Codex config into Claude Code.
Is Claude Code open source like Codex?
No. The Codex CLI is open source under Apache 2.0 on GitHub. Claude Code's public GitHub repository holds docs, plugins and the changelog, and its license says "All rights reserved", with use subject to Anthropic's commercial terms.
Do Codex and Claude Code work on Windows?
Yes, both do. Codex runs natively in PowerShell with its own Windows sandbox. Claude Code also installs natively on Windows (PowerShell, CMD or WinGet), but its sandbox only works under WSL2; on native Windows it runs commands unsandboxed.
Sources
All checked on November 29, 2026.
- OpenAI, Codex docs home: https://learn.chatgpt.com/docs
- OpenAI, Codex pricing: https://learn.chatgpt.com/docs/pricing
- OpenAI, Codex models: https://learn.chatgpt.com/docs/models
- OpenAI, Codex IDE extension: https://learn.chatgpt.com/docs/codex/ide
- OpenAI, desktop app: https://learn.chatgpt.com/docs/app
- OpenAI, Codex Cloud: https://learn.chatgpt.com/docs/cloud
- OpenAI, Codex sandboxing: https://learn.chatgpt.com/docs/sandboxing
- OpenAI, Codex MCP: https://learn.chatgpt.com/docs/extend/mcp
- OpenAI, Codex skills and plugins: https://learn.chatgpt.com/docs/skills-and-plugins
- OpenAI, Build skills: https://learn.chatgpt.com/docs/build-skills
- OpenAI, Codex subagents: https://learn.chatgpt.com/docs/agent-configuration/subagents
- OpenAI Codex on GitHub: https://github.com/openai/codex (LICENSE: Apache 2.0)
codex --helpon Codex CLI 0.167.1 (latest on npm: 0.172.0, https://www.npmjs.com/package/@openai/codex)- Anthropic, Claude Code overview: https://code.claude.com/docs/en/overview
- Anthropic, Claude plans and pricing: https://claude.com/pricing
- Anthropic, Claude Code in the cloud: https://code.claude.com/docs/en/claude-code-on-the-web
- Anthropic, Claude Code permission modes: https://code.claude.com/docs/en/permission-modes
- Anthropic, Claude Code sandboxing: https://code.claude.com/docs/en/sandboxing
- Anthropic, Claude Code model configuration: https://code.claude.com/docs/en/model-config
- Anthropic, Claude Code skills: https://code.claude.com/docs/en/skills
- Anthropic, Claude Code subagents: https://code.claude.com/docs/en/sub-agents
- Anthropic, Claude Code plugins: https://code.claude.com/docs/en/plugins
- Anthropic, Claude Code costs: https://code.claude.com/docs/en/costs
- Anthropic, Claude Code on GitHub: https://github.com/anthropics/claude-code (LICENSE.md)
claude --helpon Claude Code 2.1.332