Blog

Codex vs Claude Code: usage limits, cost and which lasts longer

Codex and Claude Code meter usage the same way: a short rolling window plus a weekly cap on a plan, or per-token billing on an API key. Neither lasts longer by default. Both re-send the whole conversation every turn, so session length, tool output and model choice decide which one runs out first.

67.7%
of a Claude Code bill is re-reading old context
72%
under baseline on a real session through condense
3×
more work from the same Claude plan

Codex vs Claude Code at a glance

On billing and limits the two agents are closer than most comparisons suggest. Plans and allowances change often, so check each vendor's pricing page for current figures.

CodexClaude Code
VendorOpenAIAnthropic
SubscriptionChatGPT plansClaude Pro and Max
Pay as you goOpenAI API keyAnthropic API key
Limit shapeShort window plus weekly5-hour window plus weekly
Main cost knobModel and reasoning effortModel (Opus, Sonnet, Haiku)
Project instructionsAGENTS.mdCLAUDE.md
Check usage/status/status, /context, /cost
Shrink context/compact, /new/compact, /clear
Works with condenseYesYes

How the limits work

Both count compute, not messages. A late-session turn can carry a hundred thousand tokens of input for a reply of a few hundred.

On an API key there is no weekly cap, only per-token billing. See Claude subscription vs API key.

Compare cost per task, not per token

The top and entry tiers sit at similar prices. What matters is how many tasks each finishes, as covered in cost per task vs cost per token.

  1. 1
    Pick ten real tasks

    Bugs and small features from your backlog, not toy prompts.

  2. 2
    Match the settings

    Comparable model and effort, same instruction file, same MCP servers.

  3. 3
    Record usage before and after

    Run /status at start and end, or read the API bill.

  4. 4
    Count finished tasks

    A cheap run that needs a human to finish it is not cheap.

Which lasts longer?

It depends on habits more than vendor. These move usage on both, in rough order of impact.

  1. 1
    Session length

    A fresh session per task with /clear or /new is the biggest saving.

  2. 2
    Tool output

    Test suites and broad searches ride along every turn. See how to compress tool output.

  3. 3
    Model and effort

    Heavy settings for planning and hard bugs, lighter ones for routine edits.

  4. 4
    Fixed overhead

    Trim AGENTS.md, CLAUDE.md and MCP servers.

Running both side by side

Switching agents buys a fresh allowance, not better habits. Two plans only double capacity if both stay lean.

  1. 1
    One source of project rules

    Keep content in AGENTS.md and point CLAUDE.md at it.

  2. 2
    Hand off with a summary

    Goal, files touched, what is left. Never paste the whole transcript.

  3. 3
    Match MCP servers to the job

    Connect browser or database tools only where they are needed.

  4. 4
    Measure each one separately

    Track /status per agent for a week before upgrading or dropping a plan.

Make either agent last longer

condense compresses re-sent history before each request. For Claude Code, install with curl -fsSL https://cli.condense.chat/unix | sh (Windows: irm https://cli.condense.chat/nt | iex) and run dense claude. For Codex, add a provider in ~/.codex/config.toml; the coding agents docs have the config.

938-turn session, priced
Baseline vs through condense
Opus baseline
$771
Opus + condense
$214
Sonnet baseline
$154
Sonnet + condense
$43
The same session came in 72% under baseline on both models. From the anatomy of a token bill.

dense usage shows Claude plan usage next to what it would have been uncompressed. For Codex, dense info shows tokens before and after.

Frequently asked questions

Is Codex cheaper than Claude Code?

Not by default. The cheaper one is the one that finishes your tasks in fewer tokens, which you only learn by running the same work through both.

Does Codex have a weekly limit like Claude Code?

Yes. Both have a short rolling window and a weekly limit on a plan. Run /status in either agent to see where you stand.

Claude Max vs ChatGPT Pro: which gives more coding?

Neither vendor publishes limits you can compare directly, and both change them. Run the same tasks for a week on each and note when you hit the caps.

Can I use both Codex and Claude Code?

Yes. Put shared rules in AGENTS.md and point CLAUDE.md at it so both agents read the same conventions.

Does condense work with both Codex and Claude Code?

Yes. Claude Code runs through dense claude. Codex uses a provider entry in ~/.codex/config.toml, and ChatGPT-login requests go to the ChatGPT Codex backend.

All posts