On this page 9 sections
Codex and Claude Code do the same job. You describe what you want in plain words, and the agent reads your project, edits the files, runs the commands and shows you what it changed. One comes from OpenAI and lives inside ChatGPT. The other comes from Anthropic and lives inside Claude.
So which one should you use? It mostly comes down to three things: what you're willing to pay, how much you'll use it, and which tools you already have.
Here's a plain-English comparison, using only what the two companies publish themselves.
Prices and limits checked on December 1, 2026; plan prices and the 5-hour limits rechecked on December 6.
Codex vs Claude Code at a glance
| Codex | Claude Code | |
|---|---|---|
| Made by | OpenAI | Anthropic |
| Cheapest way in | Free (limited, still rolling out) | Claude Pro, $20 a month ($17 billed yearly) |
| $20 plan | ChatGPT Plus | Claude Pro |
| Bigger plans | ChatGPT Pro: $100, $200 or $500 a month | Claude Max $100, Claude Ultra $200 a month |
| Teams | $25 a seat a month ($20 billed yearly) | $25 a seat a month ($20 billed yearly) |
| Limit on the $20 plan | About 15 to 160 messages every 5 hours (GPT-6.1 Sol) | Not published; resets every 5 hours, plus a weekly limit |
| Where it runs | Terminal, VS Code and JetBrains, desktop app, web, iPhone | Terminal, VS Code and JetBrains, desktop app, web, iPhone and Android |
| Project notes file | AGENTS.md | CLAUDE.md (it can also read AGENTS.md) |
| Open source | The command-line tool is (Apache-2.0) | No |
| Works with an API key | Yes | Yes |
Is Codex better than Claude Code?
Neither one wins at everything. Both companies publish test scores for their newest models, and the lead tends to change hands as new models come out. Those scores also come from the companies themselves, so read them with that in mind.
What matters more is how each one fits your work and your budget. The good news is that trying both is cheap: Codex costs nothing to try, and Claude Code costs $20 for a month. Give both the same small task in your own project and compare the results. One afternoon tells you more than any chart.
Price: which one is cheaper?
To start, Codex is cheaper. It comes with every ChatGPT plan, including Free and Go ($8 a month). On those plans you get a limited amount with GPT-6 Luna, OpenAI's lowest-priced model, in the Codex desktop app. Claude Code has no free version. It starts with Claude Pro at $20 a month.
At $20, it's a tie on price. ChatGPT Plus and Claude Pro both cost $20 a month, and Claude Pro drops to $17 a month if you pay for a year.
Above that, the steps are similar:
- $100 a month: ChatGPT Pro ($100) or Claude Max (5 times Pro's usage).
- $200 a month: ChatGPT Pro ($200) or Claude Ultra. Ultra has no 5-hour limit once your account is verified, and 10 times Pro's usage each week.
- $500 a month: only ChatGPT has this tier, which adds Ultrafast mode.
For teams, ChatGPT Business and Claude Team both cost $25 a seat a month, or $20 billed yearly.
In some countries you may see local prices at checkout instead of dollars.
Usage limits: which one lasts longer?
Both tools have a limit that resets every 5 hours on the $20 plans, and both can have a weekly limit on top.
- Codex on ChatGPT Plus: OpenAI's estimate is about 15 to 160 messages every 5 hours on GPT-6.1 Sol, and 350 to 3,000 on the small GPT-6 Luna.
- Claude Code on Claude Pro: Anthropic no longer publishes a number. Its last published figure was about 10 to 40 Claude Code prompts every 5 hours.
Those ranges look easy to compare, but they aren't quite. Both tools count work, not messages. A small fix uses very little, while a long session on a big project uses a lot. And the Claude number is older.
Two more differences are worth knowing:
- On Claude, chat and code share one limit. Every message in the Claude app and in Claude Code comes out of the same allowance. On ChatGPT, everyday chats are unlimited and Codex has its own allowance.
- At $200, both drop the 5-hour limit. ChatGPT Pro and verified Claude Ultra accounts only have a weekly limit.
To see your own numbers, try our Codex usage limit calculator and Claude usage limit calculator. Both estimate how far your plan goes for the way you work.
Models: GPT or Claude?
Each tool runs its own company's models. If you use an API key instead of a plan, you pay these prices per million tokens (input / output):
| Model size | Codex | Claude Code |
|---|---|---|
| Everyday | GPT-6.1 Sol: $2 / $10 | Claude Sonnet 5.5: $2 / $10 |
| Most capable | GPT-6.2 Astra: $8 / $40 | Claude Opus 5.5: $4 / $20, Claude Fable 5.2: $8 / $40 |
| Small and fast | GPT-6 Luna: $0.10 / $0.50 | Claude Haiku 5.5: $0.10 / $0.50 |
The everyday models cost the same on the API. Opus 5.5 costs half as much as GPT-6.2 Astra, though on the Claude Pro plan you'll use up your limit faster with Opus than with Sonnet. Fable is Anthropic's top model; on Pro you can only use it with paid usage credits.
How they work day to day
These two have become very alike. Both can:
- work in the terminal, in VS Code (and Cursor) and JetBrains editors, in a desktop app and in the browser;
- run tasks in the cloud while you do something else;
- follow your project rules from a notes file;
- connect to other tools through MCP, like your issue tracker or database;
- split a big job between several helper agents.
The differences are smaller than you'd think:
- Open source: the Codex command-line tool is open source, so anyone can read its code. Claude Code isn't.
- Phone: Claude Code works in the Claude app on iPhone and Android. Codex has an iPhone app.
- Team chat: on Team and Enterprise plans, you can mention Claude in Slack with a bug report and get a pull request back.
- Code review: both can review pull requests on GitHub.
Using both? Write your project rules in an AGENTS.md file. Codex reads it, and Claude Code can read it instead of a CLAUDE.md, so one file works for both.
ChatGPT Plus vs Claude Pro: which $20 plan is better for coding?
If you can only pay for one plan, think about what else you'll use it for.
- ChatGPT Plus gives you Codex plus ChatGPT with unlimited everyday chats. It also lets you try Codex for free first, on the Free plan.
- Claude Pro gives you Claude Code plus the Claude app. Your chats and your coding share one limit, so heavy chatting leaves less for code.
If you mostly code and rarely chat, the difference shrinks. Pick the one whose results you like better after a week of real use.
Which one should you pick?
- You're new and don't want to pay yet: start with Codex on ChatGPT Free.
- You already pay for ChatGPT Plus: try Codex first. You already have it.
- You already pay for Claude Pro: try Claude Code first, for the same reason.
- You want to read or change the tool's own code: Codex, since its command-line tool is open source.
- Your team lives in Slack: Claude Code on a Team plan can take bug reports straight from Slack.
- You code all day: compare ChatGPT Pro and Claude Ultra at $200. Both drop the 5-hour limit.
- You can't decide: use both for a month on the same project, then keep the one you reach for first.
If you run out often, see what Codex pricing gets you on each plan, and what to do when Claude's limit is reached.
Quick answers
Is Codex better than Claude Code? Not across the board. Both are strong, and each new model shifts the lead. Try both on your own project; it costs $0 for Codex and $20 for Claude Code.
Which is cheaper, Codex or Claude Code? Codex, to start: it's included in ChatGPT Free. At $20 a month they cost the same, and Claude Pro is $17 a month if you pay yearly.
Is Claude Code free? No. Claude Code needs a paid plan, starting with Claude Pro at $20 a month, or an API key.
Can I use Codex and Claude Code together? Yes. Put your project rules in AGENTS.md, which both can read, and use whichever suits the task.
Is Codex open source? The Codex command-line tool is, under the Apache-2.0 license. Claude Code isn't open source.
Which has higher limits? At $20, OpenAI publishes about 15 to 160 Codex messages every 5 hours; Anthropic doesn't publish a current number for Claude Code. At $200, both drop the 5-hour limit and keep a weekly one.
Which is better for beginners? Codex is easier to try because it's free to start. Both explain what they're doing and ask before risky changes, so either works once you're comfortable with the basics.
Both companies change prices, models and limits often. Check their pricing pages before you buy.
Sources
The facts in this guide were checked against these sources.
- OpenAI: Codex pricing and usage limits learn.chatgpt.com
- OpenAI: ChatGPT pricing chatgpt.com
- OpenAI: Codex CLI on GitHub (Apache-2.0) github.com
- OpenAI API pricing developers.openai.com
- OpenAI Help: GPT-6 in ChatGPT (chat limits) help.openai.com
- Anthropic: Claude plans and pricing claude.com
- Claude Code docs: overview (surfaces, CLAUDE.md, AGENTS.md, MCP) code.claude.com
- Claude API pricing platform.claude.com
- Anthropic Help: How usage and length limits work support.claude.com
- Claude Code license (all rights reserved) github.com