Codex vs Claude Code
OpenAI's Codex and Anthropic's Claude Code side by side: what each plan costs, how the usage limits work, which models they run and what changes on an API key.
Published November 28, 2026
Both start at $20 a month: Codex comes with ChatGPT Plus and Claude Code with Claude Pro. Codex runs OpenAI's GPT models and its command-line tool is open source. Claude Code runs Anthropic's Claude models and isn't open source. Both can also run on an API key and bill per token instead of a plan.
At a glance
| Codex | Claude Code | |
|---|---|---|
| Made by | OpenAI | Anthropic |
| Where it runs | ChatGPT's apps, a CLI, IDE extensions, cloud tasks, GitHub and Slack | A CLI, VS Code and JetBrains, a desktop app, the web, phones, GitHub Actions |
| Cheapest plan with it | ChatGPT Plus, $20 a month | Claude Pro, $20 a month ($17 billed yearly) |
| Bigger plans | Pro at $100, $200 or $500 a month | Max at $100 and Ultra at $200 a month |
| Models | OpenAI's GPT models | Anthropic's Claude models |
| On an API key | Yes, without the cloud features | Yes, in place of the plan |
| Open source | Yes, Apache-2.0 | No |
Made by
- Codex
- OpenAI
- Claude Code
- Anthropic
Where it runs
- Codex
- ChatGPT's apps, a CLI, IDE extensions, cloud tasks, GitHub and Slack
- Claude Code
- A CLI, VS Code and JetBrains, a desktop app, the web, phones, GitHub Actions
Cheapest plan with it
- Codex
- ChatGPT Plus, $20 a month
- Claude Code
- Claude Pro, $20 a month ($17 billed yearly)
Bigger plans
- Codex
- Pro at $100, $200 or $500 a month
- Claude Code
- Max at $100 and Ultra at $200 a month
Models
- Codex
- OpenAI's GPT models
- Claude Code
- Anthropic's Claude models
On an API key
- Codex
- Yes, without the cloud features
- Claude Code
- Yes, in place of the plan
Open source
- Codex
- Yes, Apache-2.0
- Claude Code
- No
Plans and limits
Codex comes with ChatGPT Plus at $20 a month, Business at $25 a seat ($20 billed yearly), and Pro at $100, $200 or $500 a month. On Plus and Business, limits count messages per five hours for each model: for GPT-6.2 Sol, OpenAI gives a range of 17 to 180 local messages. Pro plans have no five-hour limit, and weekly limits can apply to every plan (OpenAI).
Claude Code comes with Claude Pro at $20 a month, Max at $100 with 5 times Pro's usage, and Ultra at $200 with 10 times Pro's weekly usage and no five-hour limit for verified accounts. Team seats cost $25 or $125 a month (Anthropic). The limits are shared with Claude's chat apps, and past them you can buy extra usage at API prices (Anthropic).
Neither maker publishes how many messages a plan allows in a week. How fast you reach a limit depends on the model, the length of the session and the size of the files.
Paying per token instead
Both run on an API key. Codex signs in with codex login --with-api-key; you then pay API prices and lose the cloud features, such as code review on GitHub (OpenAI). Claude Code uses ANTHROPIC_API_KEY in place of the plan, even while you're logged in (Anthropic).
On the API, Anthropic puts the average Claude Code cost across enterprise deployments at about $13 per developer per active day, or $150 to $250 a month, at its own prices (Anthropic). At /model's prices the same tokens cost less:
Claude prices here
Prices as of Nov 30, 06:33 PM UTCPer 1M tokens, input / output, at the cheapest channel serving each model now.
- Claude Opus 5.5Anthropic's price:
$4.00 / $20.00Here: $0.55 / $2.7586% off - Claude Sonnet 5.5Anthropic's price:
$2.00 / $10.00Here: $0.275 / $1.37586% off - Claude Haiku 5.5Anthropic's price:
$0.10 / $0.50Here: $0.033 / $0.16367% off - Claude Fable 5.2Anthropic's price:
$8.00 / $40.00Here: $2.60 / $13.0067% off
Models
Codex lists GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Astra and GPT-6 Luna. OpenAI suggests Astra for demanding work and Sol for everyday coding. Another provider must offer OpenAI's Responses API: current Codex releases don't take the Chat Completions format (OpenAI).
Claude Code picks Claude models by alias: opus, sonnet, haiku and fable. Its default is Opus 5.5 on every plan and on the API (Anthropic). Another provider must speak Anthropic's Messages API.
What sets them apart
- Codex cloud tasks run in a workspace of their own and keep going while your computer sleeps (OpenAI).
- Codex CLI is open source under Apache-2.0, so you can read and change it (GitHub). Claude Code's license reserves all rights to Anthropic (GitHub).
- Claude Code runs in more places: the terminal, VS Code and JetBrains, a desktop app, the web, phones and CI (Anthropic).
- Both take MCP servers, subagents and scripted runs (
codex exec,claude -p). Claude Code reads a project'sAGENTS.mdas well as its ownCLAUDE.md.
Which to choose
- Choose Codex for GPT models, an open-source CLI, or tasks that run in the cloud while you're away.
- Choose Claude Code for Claude models, or to work from the same agent in the terminal, the editor and the browser.
- On a budget, use either on an API key and pay per token: a quiet day costs little, and no weekly limit stops you.
One /model key runs both: Claude models in Claude Code, and GPT models in Codex CLI through the Responses API. The Claude Code guide and the Codex CLI guide show the settings.
Sources
Each opened on November 28, 2026.