TL;DR: Both coding agents start at $20 a month: Codex comes with ChatGPT Plus, Claude Code with Claude Pro ($17 a month billed annually). The usage rules differ more than the prices. Codex on Plus is metered per five-hour window, and OpenAI publishes estimates such as 15 to 160 local GPT-6.1 Sol messages per window; ChatGPT Pro plans have no five-hour limit. Claude Code shares one pool with Claude chat, with five-hour sessions plus a weekly cap and no published message count. On the API, the default models cost the same: $2 input / $10 output per million tokens for both GPT-6.1 Sol and Claude Sonnet 5.5. Pick on workflow, then size the plan to your usage.
Last updated: October 17, 2026. Prices and limits checked against OpenAI’s ChatGPT Learn docs and Anthropic’s pricing and Claude Code docs.
Claude Code and Codex are the two coding agents most developers end up choosing between. Both run in the terminal, in the IDE, on the desktop and in the cloud. Both are bundled with a $20 chat subscription. And both have usage limits that are confusing enough to fill a lot of Reddit threads.
We haven’t run a timed head-to-head on our own codebase, so this isn’t a “we refactored 10,000 lines” review. It’s a side-by-side reading of what each company actually publishes about pricing and Claude Code vs Codex usage limits, with links, so you can choose with your eyes open.
Claude Code vs Codex at a glance
The price ladders match almost exactly; the metering doesn’t. Codex publishes per-model message estimates for Plus and removes the five-hour cap on Pro. Claude Code uses per-session multipliers on Max and a weekly cap on every paid plan.
| Codex (OpenAI) | Claude Code (Anthropic) | |
|---|---|---|
| Entry plan | ChatGPT Plus, $20/month | Claude Pro, $20/month ($17 billed annually) |
| Next tiers | Pro 100, Pro 200, Pro 500 ($100 / $200 / $500) | Max 5x, Max 20x ($100 / $200) |
| Higher-tier multiplier | Pro 100: 5x Plus usage; Pro 200 and Pro 500: more (no published multiplier) | 5x / 20x Pro usage per session |
| Five-hour limit | Yes on Plus; none on Pro tiers | Yes on all plans |
| Weekly limit | “May also apply” | Yes, on all paid plans |
| Shared with | ChatGPT Work and other agentic features | Claude chat, desktop, mobile, Cowork |
| Default coding models | GPT-6.1 Sol, GPT-6 Luna; GPT-6 Astra for hard work | Sonnet 5.5, Opus 5.5; Fable on Max |
| Check usage | Usage dashboard, /status in the CLI |
Settings > Usage, /usage in Claude Code |
| Top-ups | Buy ChatGPT credits | Turn on usage credits at API rates |
Sources: ChatGPT Learn pricing, About ChatGPT Pro tiers, Claude pricing, What is the Max plan?, Claude Code costs.
Which gives more usage for $20?
OpenAI is more transparent at $20, but neither gives a guaranteed number. OpenAI’s pricing doc estimates local messages per five-hour window on Plus: 5 to 45 with GPT-6 Astra, 15 to 160 with GPT-6.1 Sol and 350 to 3,000 with GPT-6 Luna. Anthropic says only that Claude Pro gives at least five times Free’s usage per session.
Both companies stress these are not hard limits. OpenAI says “tasks that look similar can consume different amounts of your allowance,” and that cloud tasks may use more than local messages. Anthropic’s pricing FAQ says usage depends on “the length and complexity of your conversations, the model you choose, and the features you use.”
The bigger structural difference is what else draws from the pool. On Claude Pro, Claude Code shares limits with every chat you have on claude.ai. On ChatGPT Plus, OpenAI says Codex shares usage with ChatGPT Work and some agentic features, but its doc doesn’t put ordinary ChatGPT chat in that pool. If you chat a lot and code a lot on one $20 plan, that matters.
Which gives more usage at $100 to $200?
ChatGPT Pro removes the five-hour wall; Claude Max multiplies it. OpenAI says “Pro plans currently have no five-hour limit,” so a long Codex session won’t stall mid-afternoon. Claude Max 5x and 20x give five or 20 times Claude Pro’s per-session allowance, but the five-hour window and a weekly cap remain. Max 5x and 20x now also include $100 and $200 a month in API credits, but Anthropic’s API credits help page says they don’t cover Claude Code, so they won’t stretch your coding allowance.
A few details worth knowing before you pay:
- ChatGPT Pro 200 changed recently. New Pro 200 subscribers get 10x Plus usage, according to OpenAI’s Pro tiers article. Eligible existing subscribers keep 20x until October 29, 2026.
- Claude Max 20x is the only Anthropic tier that’s cheaper per unit than Pro. It gives four times Max 5x’s session allowance for twice the price.
- Claude Max includes Fable. Anthropic’s Fable article says Max can use Fable models for up to 50% of the weekly limit. On Pro, Fable runs only on paid credits.
- Speed modes cost more. On ChatGPT, Fast mode uses included limits at 2.5x the Standard rate and GPT-6 Astra Ultrafast at 8x. Among individual plans, only Pro 500 gets Ultrafast.
Which is cheaper on the API?
For the default models, it’s a tie. GPT-6.1 Sol and Claude Sonnet 5.5 both list at $2 per million input tokens and $10 per million output. The differences show up in caching and at the top end, where Claude Opus 5.5 is much cheaper than GPT-6 Astra.
| Model | Input / 1M | Cached input / 1M | Output / 1M |
|---|---|---|---|
| GPT-6.1 Sol | $2.00 | $0.10 | $10.00 |
| Claude Sonnet 5.5 | $2.00 | $0.10 (cache read) | $10.00 |
| Claude Opus 5.5 | $4.00 | $0.20 (cache read) | $20.00 |
| GPT-6 Astra | $10.00 | $1.00 | $50.00 |
| Claude Fable 5.1 | $10.00 | $0.25 (cache read) | $50.00 |
| GPT-6 Luna | $0.10 | $0.01 | $0.50 |
Sources: Claude pricing; OpenAI API prices as listed in our GPT-5.5 retirement guide, checked against OpenAI’s API pricing page. Anthropic halved Sonnet 5.5 cache reads from $0.20 to $0.10 per million tokens on October 7, 2026, matching GPT-6.1 Sol’s cached input price; our Sonnet 5.5 vs GPT-6.1 Sol comparison goes deeper on API costs. Anthropic also charges for cache writes ($2.50 per million on Sonnet 5.5); OpenAI’s Codex credit billing has no separate cache-write charge.
Running either agent on an API key has trade-offs. OpenAI says Codex with an API key loses cloud features such as GitHub code review and Slack. Anthropic says API-key use in Claude Code is “pay-as-you-go, billed per token,” with “no hard stop,” so set a spend limit in the Console.
Codex cloud tasks vs Claude Code local: what’s the difference?
Both now do both. Codex runs locally (CLI, IDE extension, desktop app) and in Codex Cloud, which runs tasks in OpenAI-hosted environments and can review pull requests when you tag @Codex on GitHub. Claude Code also runs in the cloud: Anthropic’s cloud docs say cloud sessions are available on Pro, Max and Team plans.
The usage rules differ slightly. OpenAI warns that cloud tasks “may use more of your allowance than local messages,” and GitHub code reviews have their own usage category. In Claude Code, cloud and local sessions draw from the same plan limits as everything else.
Is Claude Code or Codex better for big refactors?
There’s no independent, current answer we’d stand behind. Model rankings shift every few weeks, and benchmark results depend heavily on the harness. What’s documented is how each tool handles large changes: both support plan-first workflows, subagents and project instruction files, so either can do the job with good prompting.
Anthropic’s own Claude Code guidance suggests planning with Opus and executing with Sonnet, built in as /model opusplan. OpenAI’s models page points complex coding to GPT-6.1 Sol and the hardest work to GPT-6 Astra. In practice, run the same real refactor through both on a branch and compare the diffs.
Can you use Claude Code and Codex together?
Yes, and plenty of developers do. The easiest setup is one shared instruction file: Codex reads AGENTS.md, and Anthropic’s memory docs say Claude Code can read a repository’s AGENTS.md on its own or alongside CLAUDE.md.
A common split:
- Write and iterate locally in whichever agent you prefer.
- Review with the other one. Tag
@Codexon a GitHub pull request, or run Claude Code’s review tools, so a second model checks the first one’s work. - Keep both on $20 plans until one of them hits its limit regularly, then upgrade only that one.
Two $20 plans also give you two separate usage pools, which can be cheaper than jumping one of them to $100.
Verdict: which should you pick?
- Pick Codex (ChatGPT Plus or Pro) if you want the clearest published limits, use ChatGPT heavily for other things, or want long uninterrupted sessions: Pro tiers have no five-hour cap.
- Pick Claude Code (Claude Pro or Max) if you prefer Claude’s models and terminal workflow, want Opus at a lower API price than Astra, or want Fable included on Max.
- Try both for a month at $20 each if you’re unsure. It’s the cheapest way to find out which one fits your codebase.
FAQ
Which gives more usage for $20, Claude Code or Codex?
Neither guarantees a number. OpenAI estimates 15 to 160 local GPT-6.1 Sol messages per five-hour window on ChatGPT Plus, while Anthropic says Claude Pro gives at least 5x Free’s usage per session, shared with chat.
Does Codex have a five-hour limit on ChatGPT Pro?
No. OpenAI says Pro plans currently have no five-hour limit, though weekly limits may apply. Plus and Standard Business seats do have five-hour windows.
Is Claude Code or Codex cheaper on the API?
For default models they’re the same: GPT-6.1 Sol and Claude Sonnet 5.5 both cost $2 input and $10 output per million tokens. Claude Opus 5.5 ($4/$20) is cheaper than GPT-6 Astra ($10/$50).
Can I use Claude Code and Codex together?
Yes. Both can read an AGENTS.md file, so one set of project instructions works for both, and many developers use one agent to write and the other to review.
How do I check my Claude Code and Codex limits?
Run /usage in Claude Code or check Settings > Usage on claude.ai. For Codex, use the usage dashboard in ChatGPT’s Codex settings or /status in the Codex CLI.
Sources checked October 11, 2026. Both companies change limits often; we’ll update this comparison when they do.


