The full guide
Codex vs Claude Code, step by step
At $20 a month the two cost the same: Codex comes with ChatGPT Plus, Claude Code with Claude Pro, and both cap use in five-hour windows, with weekly limits that can apply on top. At $100 and $200 they part: ChatGPT Pro 100 and Pro 200 have no five-hour limit, while Claude Max 5× and Max 20× keep it, with five and twenty times Pro's usage. Prices read 20 October 2026. On my machine, which runs both, the median Codex call cost $0.032 and the median Claude Code call $0.094 at list prices — about a third — partly because Claude Code's calls carried more context, partly because of the models each one ran.
Codex vs Claude Code pricing, plan by plan
Prices read on 20 October 2026 from OpenAI's Codex pricing and claude.com/pricing. OpenAI lists ChatGPT Pro at monthly prices only, and Anthropic sells Max monthly only, while Claude Pro drops to $17 a month billed annually. ChatGPT Free and Go ($8) include Codex in the desktop app, subject to rollout; Claude Free does not include Claude Code. For teams, a ChatGPT Business seat and a Claude Team standard seat are both $25 a month, $20 billed annually. For enterprises OpenAI lists no price, and Anthropic lists $20 a seat plus usage.
The $20 plan: ChatGPT Plus vs Claude Pro
ChatGPT Plus includes Codex on the web, in the CLI, the IDE extension and iOS. OpenAI publishes its limit as estimated local messages per five hours, by model: 15–160 on GPT-6.1 Sol, 5–45 on GPT-6 Astra, 350–3,000 on GPT-6 Luna. Claude Pro includes Claude Code in the terminal and supported IDEs, on an allowance shared with claude.ai: a five-hour session limit and a weekly limit, with no counts published. The price is the same; the difference is that Plus gives a rough count of messages, and Claude Pro publishes only its windows.
The $100 plan: ChatGPT Pro 100 vs Claude Max 5×
ChatGPT Pro 100 has no five-hour limit, though weekly limits may apply to any plan; OpenAI does not say how much more it gives than Plus. Claude Max 5× gives five times Pro's usage per session and keeps the five-hour window, a weekly limit across all models and a separate weekly limit for Fable. Max adds priority access at high-traffic times. So at $100 the difference is the window: ChatGPT has no five-hour one, Claude does, and only Claude states a ratio to the plan below.
The $200 plan: ChatGPT Pro 200 vs Claude Max 20×
ChatGPT Pro 200 has more usage than Pro 100 and no five-hour limit. New Pro 200 subscriptions get a lower allowance than OpenAI gave before, at the same $200; those who held one between 22 and 29 September 2026 keep the old allowance through 29 October. Claude Max 20× gives twenty times Pro's usage, with the same windows as Max 5×. Above $200 only OpenAI has a tier: Pro 500, with the most usage and Ultrafast mode.
Codex vs Claude Code usage limits
Claude Code's allowance resets every five hours, with a weekly limit on top, and it is shared: Claude Code, claude.ai and Claude Desktop draw from the same one. Anthropic publishes no message counts, only how the plans compare: Max 5× and 20× are five and twenty times Pro. "5× and 20×" are Claude's tiers; OpenAI names its Pro tiers by price and publishes no multiple of Plus.
On Plus and Business, OpenAI publishes estimated local messages per five hours by model, as ranges it says "are not fixed message limits". ChatGPT Pro has no five-hour limit; weekly limits may apply to any plan. Local and cloud work share one allowance. At the cap OpenAI lets a running Codex turn finish; Anthropic says Claude Code may keep working briefly to finish the step in progress, a small allowance that counts toward the weekly limit and is still rolling out. Past the limit, Plus and Pro can buy credits, and Claude can turn on usage credits billed at API rates.
Per-token prices, if you use an API key
Model for model the rates are close: GPT-6.1 Sol and Claude Sonnet 5.5 both list $2 input and $10 output per million tokens. Above 272K input tokens OpenAI bills double for input and 1.5× for output; Claude 4.6 and later run their full 1M-token context at the standard price, except Haiku 5.5, which bills prompts over 100K tokens at five times its rates. At the top, GPT-6 Astra lists $10 input and $50 output, Opus 5.5 $4 and $20.
What each cost on one machine
Caprock reads both agents into one table, priced at each provider's list prices, so the two can be read side by side. A call here is one request to the model — Claude Code records one usage line per API message, Codex one token_count per request — so a turn that runs five tools is several calls. Read on 3 October 2026: 79,014 Claude Code calls on 56 days, 18 July to 2 October, and 16,415 Codex calls, most of them 10–28 September.
The median Claude Code call cost $0.094 and the median Codex call $0.032, a gap of about three times. Two things explain most of it. The models: most Claude Code calls ran Opus 5 or Opus 4.8, at $5 per million input tokens, and a third of Codex's ran its Luna models, which cost a fraction of that. And the context: Claude Code's median call re-sent 169K tokens of conversation, Codex's 128K, and every call re-reads all of it. Both read almost all of it from the cache, so cache reads were most of both bills.
What this does not show: which writes better code, or what the same task costs in each. The two worked on different projects in different weeks, on models priced differently, and one heavy user is not a benchmark. It is the cost of the work I actually gave each, read the same way.
Which one to pick on cost
On a $20 plan the price is the same; what differs is the limits. Claude's allowance is shared with chat, and ChatGPT Plus publishes per-model estimates. If you work all day, compare the $100 and $200 tiers by when they stop you: ChatGPT Pro has no five-hour window, Claude Max does, with five or twenty times Pro's allowance. On an API key the rates are close model for model, so the bill follows the model you pick and how much context each call carries. Measure it rather than assume it.
Claude Code pricing covers Anthropic's plans in full, and Codex usage explains Codex's limits. OpenCode vs Claude Code makes the same comparison with OpenCode.
Measure both on your machine
Inside each agent: /usage in Claude Code; in Codex, /usage for the account and /status for the session. Each sees only itself.
Caprock reads Claude Code's and Codex's transcripts from disk into the same columns — how the two are joined — and prices them at each provider's list prices. The Cost screen breaks the total down by model and shows each agent's plan limits, and caprock export writes every call of both:
$ caprock export events --format tsv --out events.tsv 319033 events rows → events.tsv
Every dollar is a list-price estimate, as Claude Code's own /usage is, beside each plan's dollars and the share of its weekly limit the work used. Free, open source; nothing leaves your machine. Install Caprock and it reads back every session both agents still have on disk, started in any terminal.
Questions people ask
- Is Codex cheaper than Claude Code?
- The plans cost the same at $20, $100 and $200. Per call at list prices, the median Codex call on one machine cost $0.032 and the median Claude Code call $0.094, mostly because of the models each ran and the context each call carried.
- How much does Codex cost?
- Codex comes with ChatGPT: Free and Go ($8) in the desktop app, subject to rollout; Plus at $20; Pro at $100, $200 or $500; Business at $25 a user, $20 billed annually. On an API key it bills per token.
- ChatGPT Plus or Claude Pro: which $20 plan is better for coding?
- Both include their agent and both cap use in five-hour windows. Plus publishes estimated messages per five hours by model; Claude Pro publishes no counts and shares its allowance with claude.ai. Claude Pro is $17 a month billed annually.
- Claude Max $100 vs ChatGPT Pro $100: what is the difference?
- ChatGPT Pro 100 has no five-hour limit. Claude Max 5× keeps the five-hour window and a weekly limit, with five times Pro's usage and priority access at high-traffic times. Both are billed monthly.
- Does ChatGPT Pro have 5× and 20× tiers like Claude Max?
- No. Max 5× and Max 20× are Claude's multiples of Claude Pro. OpenAI's Pro 100, 200 and 500 each include more usage than the tier below, but OpenAI publishes no multiple of Plus.
- Is Codex included in ChatGPT Plus?
- Yes. ChatGPT Plus at $20 a month includes Codex on the web, in the CLI, the IDE extension and iOS; Free and Go include it in the desktop app, subject to rollout.
- Does ChatGPT Pro have a five-hour limit for Codex?
- No. OpenAI says Pro has no five-hour limit, though weekly limits may apply to any plan. Claude Max keeps the five-hour window and a weekly limit.
- Can I use Codex or Claude Code with an API key?
- Yes, both. Each then bills per token at its provider's API rates instead of drawing on a plan's limits.
- Which is better, Codex or Claude Code?
- Neither across the board. Codex suits you if you already pay for ChatGPT or want ChatGPT Pro with no five-hour window; Claude Code if you want Claude models on a plan shared with claude.ai. This page compares price and limits, not code quality.
- Can I see Codex and Claude Code costs in one place?
- Yes. Caprock, a free desktop app, reads both agents' sessions on your machine, whether or not it started them, and prices every call at list price, per session and per repository, beside each plan's weekly limit.
Sources
- Codex pricing and usage limits, read 20 October 2026
- OpenAI Help — About ChatGPT Pro tiers
- OpenAI API pricing, read 20 October 2026
- Codex docs — authentication and API-key billing
- Codex docs — CLI commands (/usage, /status)
- Claude plans and prices, read 20 October 2026
- Claude Help Center — What is the Max plan?
- Claude Help Center — Claude Code with your Pro or Max plan
- Anthropic API pricing, read 20 October 2026
- Anthropic release notes — Haiku 5.5 and the Sonnet 5.5 cache-read cut, 7 October 2026
- Caprock's dated price table (both providers)
- Caprock export schema — the columns used here
- How Caprock reads Codex transcripts
Try it
The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app