Comparisons 12 min read

Codex vs Claude Code: Usage Limits, Pricing, Models and Which One to Pick

Codex vs Claude Code compared on usage limits, plan pricing, models, sandboxing and real agent tasks, with a clear pick for each kind of work.

Shabnam Katoch

Shabnam Katoch

Growth Head

Codex vs Claude Code cover: two terminal windows side by side, each with a usage meter above it showing how its plan limits work

Same job, two very different meters. The limits decide this more than the models do.

Here's the short version before the detail:

If you...PickWhy
Already pay for ChatGPT Plus and code a few hours a weekCodexIt's included, and GPT-6.1 Terra or GPT-6 Luna stretch the 5-hour window
Live in Claude all day and run long sessionsClaude Code on Max or UltraFile rewind, automatic subagents, and no 5-hour limit on verified Ultra
Want no 5-hour wall for the least moneyCodex on ChatGPT Pro $100Pro currently has no five-hour limit; Claude needs Ultra at $200
Code on native Windows and care about defaultsCodexSandboxed by default, with a native Windows sandbox

Picture this: it's Thursday, 3pm. You're on step four of a six-step refactor and the agent stops with a reset time.

Wait. Was that the 5-hour limit or the weekly one?

That question, not benchmark scores, is what decides most Codex vs Claude Code choices. We read OpenAI's Codex docs and pricing page, Anthropic's pricing page, Claude Code docs and support articles on 10 November 2026, so every number below comes from the vendors themselves.

Codex vs Claude Code at a glance

CodexClaude Code
Comes withChatGPT Plus, Pro, Business, Enterprise, EduClaude Pro, Max, Ultra, Team, Enterprise
Entry pricePlus $20 a monthPro $20 a month ($17 billed annually)
Bigger plansPro $100, $200 or $500Max $100, Ultra $200
5-hour limitPlus and Business yes; Pro none for nowPro and Max yes; verified Ultra none
Weekly limit"May also apply"Yes, on every paid plan
Shares usage withChatGPT Work today, ChatGPT from DecemberClaude on web, desktop and mobile
Default modelGPT-6.1 Sol suggested to startOpus 5.5 on every plan
SandboxOn by defaultOff by default (/sandbox)
MCPYes, codex mcp addYes, claude mcp add
SubagentsOn request, or when AGENTS.md asksBuilt-in Explore and Plan, used automatically
Where it runsCLI, IDE, desktop app, web, iOSTerminal, IDE, desktop app, web
Latest CLI0.167.0 (npm, 6 Nov)2.1.322 (npm, 10 Nov)

Two rows matter more than the rest: the 5-hour row and the sandbox row. They point in opposite directions, and we come back to both.

Both tools also run on a plain API key instead of a plan. OpenAI lists "API Key" as its own Codex option, with no cloud features. Claude Code bills API rates whenever ANTHROPIC_API_KEY is set.

Codex vs Claude Code usage limits, side by side

Neither vendor publishes a fixed message count. Anthropic's pricing page says outright there's "no fixed message count". OpenAI publishes ranges.

Codex vs Claude Code usage limits table: ChatGPT and Claude plans with price, 5-hour limit, weekly limit and what each shares usage with

On Codex, OpenAI's pricing page gives these estimates for local messages per five hours on Plus and Standard Business:

ModelLocal messages per 5 hours (Plus)
GPT-6 Astra5 to 45
GPT-6.1 Sol15 to 160
GPT-6.1 Terra35 to 285
GPT-6 Luna350 to 3,000

Look at the spread. Luna's low estimate is higher than Astra's high one, so the model you pick is your Codex limit. OpenAI also says cloud tasks "may use more of your allowance than local messages", and Fast mode uses included usage at 2.5x the Standard rate.

Pro is different. The same page says "Pro plans currently have no five-hour limit", with weekly limits that may still apply. Note the word currently.

Then there's December: OpenAI's help centre article "Understanding ChatGPT and Codex usage limits" says Plus, Pro and Business usage will be shared across ChatGPT and Codex from December. Today Codex already shares its pool with ChatGPT Work, per the pricing page. Our ChatGPT and Codex shared usage limit guide tracks what that change counts and what it doesn't.

On Claude Code, the meters are multipliers. Pro is 1x, Max is 5x Pro every 5 hours and every week, and Ultra is 10x Pro every week with no 5-hour limit for verified accounts. Anthropic's Claude Code support article says Claude and Claude Code draw from the same limits, IDE use included.

The weekly reset works differently too. Anthropic's Max support page says the weekly limit resets at a fixed time assigned to your account, whatever day you subscribed. Check it with /usage in Claude Code, or /status in Codex.

Codex limits move with the model you choose. Claude Code limits move with the plan you buy. That one difference explains most of the confusion.

If you're already seeing the wall on Claude, our Claude rate limit reached guide shows how to tell the 5-hour message from the weekly one.

Claude Code vs Codex pricing, and what one task costs

Plan prices first: both start at $20. Codex Business is $20 per user a month billed annually for two or more users, or $25 monthly. Claude's Team Standard seat costs the same $20 or $25, and Claude Code is included.

At the top, ChatGPT Pro comes at $100, $200 or $500, with Ultrafast mode only on Pro $500. Claude tops out at Ultra for $200.

Here's what we find more useful: the cost of one task on an API key, where both tools bill per token. We can't share a measured run yet, so this is a defined workload, calculated from list prices on 10 November 2026.

The task: about 10 model calls averaging 40,000 tokens each, so 400,000 input tokens in total. Of those, 85% are cache reads, 10% cache writes and 5% fresh input, plus 20,000 output tokens. Cache writes use Anthropic's 5-minute rate and OpenAI's 30-minute rate.

Model (tool)Input $/MCache read $/MCache write $/MOutput $/MOne task
GPT-6 Astra (Codex)10.001.0012.5050.00$2.04
Opus 5.5 (Claude Code)4.000.205.0020.00$0.75
GPT-6.1 Sol (Codex)2.000.102.5010.00$0.37
Sonnet 5.5 (Claude Code)2.000.102.5010.00$0.37
GPT-6.1 Terra (Codex)1.000.051.255.00$0.19
Haiku 5.5 / GPT-6 Luna0.100.010.1250.50$0.02

Claude Code vs Codex cost per task bar chart, calculated from list API prices for one defined 400K input, 20K output task

Two things jump out. GPT-6.1 Sol and Sonnet 5.5 have identical list prices. And each tool's default lands on a different row: Claude Code's default, Opus 5.5, costs about twice what OpenAI's suggested GPT-6.1 Sol does for the same tokens.

The table assumes both tools spend the same tokens, and they won't. Prompts, tool calls and caching differ, so measure your own run: /usage in Claude Code shows the session's token use, /status in Codex shows tokens and remaining limits.

For scale, Anthropic's cost docs say enterprise Claude Code deployments average around $13 per developer per active day. Twenty Opus tasks like ours would come to about $15.

Models and effort levels

Claude Code's default model is Opus 5.5 on Pro, Max, Ultra, Team and Enterprise, per Anthropic's model configuration docs. Its default effort is medium, with low, medium, high, xhigh and max available.

Fable models, which Anthropic's docs call the most capable in Claude Code, aren't the default anywhere. You pick one with /model fable, which now resolves to Fable 5.2. On Pro it's paid with usage credits; on Max and Ultra it's included up to half your weekly limit.

Codex has four current model lines. OpenAI's models page calls GPT-6 Astra its most capable, GPT-6.1 Sol "near-Astra performance" at a lower cost, GPT-6.1 Terra fast and efficient, and GPT-6 Luna its most efficient for focused, high-volume work. Reasoning effort runs from low to max, and ultra on supported models.

You switch with /model in both tools. In Codex, /model --reasoning=high changes effort without changing model.

One correction to something you may have read. Codex subagents don't default to Astra. OpenAI's subagent docs say a subagent "inherits the parent agent's model and reasoning effort" unless you configure one:

# ~/.codex/config.toml
[agents]
default_subagent_model = "gpt-6-luna"
max_concurrent_threads_per_session = 2

Claude Code works the same way: subagents inherit the main conversation's model unless you set model in the subagent's file or CLAUDE_CODE_SUBAGENT_MODEL. So switching to Opus before Claude delegates a test run puts that run on Opus too.

Agent behaviour: plan mode, subagents and the task where step 4 fails

Both tools plan before they touch code. Claude Code enters plan mode with Shift+Tab or /plan, and edits stay blocked until you approve the plan. Codex has /plan too, to "propose an execution plan before implementation work starts."

Subagents split differently. Claude Code delegates to its built-in Explore and Plan agents on its own, and those start without your CLAUDE.md to keep research cheap. Current Codex releases spawn subagents when you ask directly, or when AGENTS.md or a skill tells them to.

So what happens on a six-step task when step 4 fails? Say the steps are: read the issue, write a failing test, patch the code, install a new package, rerun the tests, open a PR. Here's what each tool's docs say happens at step 4.

  • Codex: the default sandbox keeps network access off, so the install pauses for your approval. In a non-interactive run, or a subagent that can't surface a prompt, the action fails and the error goes back to the parent.
  • Claude Code: in the default auto mode a classifier reviews the install and lets it run if it matches your request. With the sandbox on, the classifier also checks the hosts the command needs; in manual mode, a new domain prompts first.

Recovery is where they really differ. Claude Code checkpoints every prompt, and /rewind restores file edits, though not files that only Bash changed. Codex's CLI docs list no file rewind; OpenAI tells you to create Git checkpoints before and after a task, and /diff shows what changed.

Both have /goal, which keeps the agent working toward a stated finish line after a hiccup. That's documented behaviour, not a benchmark, and we'll publish our measured run when it's done.

Safety and sandboxing: opposite defaults

This is the biggest practical difference between the two.

Codex starts sandboxed. OpenAI's security docs say the CLI and IDE default to no network access and writes limited to the active workspace, enforced by the operating system: Seatbelt on macOS, bubblewrap on Linux and WSL2, and a native sandbox on Windows.

Claude Code starts unsandboxed. Anthropic's sandbox docs say "the sandbox is off by default", you turn it on with /sandbox, and it runs on macOS, Linux and WSL2. On native Windows, Claude Code runs commands unsandboxed.

Instead, Claude Code leans on permissions. Since v2.1.283 interactive sessions start in auto mode, where a separate classifier reviews actions before they run. Anthropic's own warning: auto mode "does not guarantee safety."

Codex vs Claude Code safety defaults: Codex sandbox on with network off, Claude Code auto mode classifier with the sandbox off until enabled

Each tool has a "skip everything" flag. Codex calls it --dangerously-bypass-approvals-and-sandbox, alias --yolo, and marks it not recommended. Claude Code's --dangerously-skip-permissions is documented for isolated containers and VMs only, though deny rules still block in that mode.

A sandbox you never turned on protects nothing. On Claude Code, run /sandbox once and check that it stuck.

Our take: on a laptop with real credentials, Codex's defaults are the safer starting point, and Windows users feel that most. Claude Code with /sandbox on closes most of the gap. For a deeper look at running Claude Code safely next to an always-on agent, see our OpenClaw vs Claude Code comparison.

Moving between Codex and Claude Code

The instruction file is the easy part. Codex reads AGENTS.md, and not CLAUDE.md unless you add it to project_doc_fallback_filenames. Claude Code reads AGENTS.md only when there's no CLAUDE.md.

So keep your rules in AGENTS.md and make CLAUDE.md a one-line @AGENTS.md import. Our CLAUDE.md vs AGENTS.md guide covers the layout for nested folders.

Here's what carries over and what you rewrite:

PieceClaude CodeCodexCarries over?
InstructionsCLAUDE.md, or AGENTS.mdAGENTS.mdYes, via AGENTS.md
Skills.claude/skills/<name>/SKILL.md.agents/skillsYes, same Agent Skills format
SubagentsMarkdown in .claude/agents/TOML in .codex/agents/Rewrite
MCP servers.mcp.json or claude mcp addconfig.toml or codex mcp addRe-add
Settings~/.claude/settings.json~/.codex/config.tomlRewrite

Hooks and permission rules need a rewrite too. Budget an afternoon, not a week.

Codex vs Claude Code vs Cursor, OpenCode and Gemini CLI

The search box keeps asking about three more names, so here's one short table with each vendor's own terms today:

ToolWhat it isHow you payWatch out for
CursorEditor with agentsPlus $8 (Grok models only), Premium $30, Super $100, Ultra $200Claude and GPT models billed separately at API list price
OpenCodeOpen source agent, MIT licenceBring your own key or subscription, or OpenCode Go from $10You assemble the setup yourself
Gemini CLIGoogle's open source CLI, Apache 2.0Gemini Code Assist Standard or EnterpriseFree and Google AI plan users moved to Antigravity CLI on 18 June 2026

That last row surprises people. Gemini CLI's own README now says it's for Code Assist organisations and isn't tuned for Gemini 4. If you want a terminal agent across many providers, our Hermes vs Pi vs OpenCode comparison goes deeper on the open options.

Which to pick: four kinds of developer

Codex vs Claude Code decision flow by reader type: casual Plus user, all-day Claude user, no 5-hour wall on a budget, Windows and security-first teams

You already pay for ChatGPT Plus and code a few hours a week. Use Codex. It's included, and choosing Terra or Luna over Astra is the difference between 45 messages and thousands in a 5-hour window.

You live in Claude and run long sessions. Use Claude Code on Max, or Ultra if the 5-hour wall keeps breaking your flow. Rewind, automatic subagents and the shared Claude pool suit all-day work. Our Claude Code vs Cowork guide helps if some of that work isn't code.

You want no 5-hour wall for the least money. ChatGPT Pro at $100 currently has no five-hour limit. On Claude, the cheapest way to drop it is verified Ultra at $200.

You're on Windows, or your laptop holds real secrets. Codex, for its sandbox-on default and native Windows sandbox. If your team prefers Claude Code, make /sandbox part of setup, or run it in WSL2.

Can you use both? Yes. The plans are separate subscriptions, and a shared AGENTS.md keeps both on the same rules.

Running Codex or Claude Code as an always-on agent

Both tools can run headless: codex exec for Codex, claude -p for Claude Code. Point either at a cron job and it works.

But look at whose meter that cron job drains. On a plan, it's your own allowance, and from December on Codex that includes your ChatGPT chats. On verified Ultra or ChatGPT Pro, there's no 5-hour brake to stop a loop either.

Agents that run while you sleep belong on an API key with a hard cap. Claude Code's --max-budget-usd stops a print-mode run at a spend you set, and Console workspace spend limits cap a key. OpenAI bills Codex on an API key at standard API rates, per token and separate from your ChatGPT plan.

That's the setup we built BetterClaw for. Your always-on agent runs on your own OpenAI or Anthropic key with zero markup, across 28+ providers, so you pay the provider's list price and keep your plan for your own coding. Plans start at $19 a month, and your first workspace starts with a 7-day free trial. See BetterClaw plans

To be fair about our side: BetterClaw isn't an IDE or a terminal coding agent. It won't edit your repo the way Codex or Claude Code does. It runs agents on schedules and connectors, 500+ of them, and it's the place to send work that shouldn't eat your coding allowance.

The meter is the product

Strip away the model names and both tools are excellent at reading code and changing it. What you're really buying is a meter: how it counts, when it resets, and who else drinks from it.

So run one real day on each before you commit. Check /status and /usage at 5pm, and keep the tool whose meter you never think about.

Frequently Asked Questions

Is Codex better than Claude Code?

Neither wins everywhere. Codex is safer out of the box, with a sandbox on by default and native Windows support, and its cheapest no-5-hour-limit plan costs $100. Claude Code has stronger recovery tools like /rewind, automatic subagents and a default Opus 5.5 model, which suit long sessions.

Which has higher usage limits, Codex or Claude Code?

It depends on the model and the plan. On ChatGPT Plus, OpenAI estimates 15 to 160 local messages per 5 hours on GPT-6.1 Sol and 350 to 3,000 on GPT-6 Luna, and Pro currently has no 5-hour limit. Claude publishes multipliers instead: Max is 5x Pro and Ultra is 10x Pro every week, with no 5-hour limit on verified Ultra.

Is Codex cheaper than Claude Code?

Both start at $20 a month. On an API key, GPT-6.1 Sol and Sonnet 5.5 have the same list prices, but Claude Code defaults to Opus 5.5, which cost about twice as much as Sol for our calculated task. For no 5-hour limit, ChatGPT Pro at $100 is cheaper than Claude Ultra at $200.

Can I use both Codex and Claude Code?

Yes. They're separate subscriptions, and both read AGENTS.md, so one instruction file keeps them on the same rules. A sensible split is one for long sessions and the other for quick tasks or reviews.

Does Codex read CLAUDE.md?

Not by default. Codex reads AGENTS.override.md and AGENTS.md, plus any names you add to project_doc_fallback_filenames in config.toml. Keep shared rules in AGENTS.md and make CLAUDE.md a one-line @AGENTS.md import.

Does Claude Code run sandboxed on Windows?

No, not natively. Anthropic's docs say the sandbox runs on macOS, Linux and WSL2, and native Windows commands run unsandboxed, so use WSL2 if you want it. Codex ships a native Windows sandbox.

Can I run Codex or Claude Code on an API key instead of a plan?

Yes. Codex lists an API key option billed at standard API rates, without cloud features like GitHub code review. Claude Code uses ANTHROPIC_API_KEY when it's set and bills API rates instead of your subscription.

Every model above, one platform.

All models compared work on BetterClaw via BYOK. Switch between them in settings. No config changes.

Try it free
Tags:codex vs claude codeclaude code vs codexcodex usage limitsclaude code usage limitscodex vs claude code pricingcodex vs claude code vs cursorcodex vs gemini cli
Shabnam Katoch

Written by

Shabnam Katoch

Growth Head

Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.

Share this article
Was this helpful?