Agent economics

Claude Code vs Codex CLI: reading the cost tables correctly

24.1M tokens per task for Claude Code, 3.9M for Codex CLI. Same category of work. The table is not a verdict on either model; it is a verdict on what each harness sends to it.

Published ยท 11 min read ยท by AgentBurn Editorial ยท dataset snapshot 2026-10-27

1. The two rows, exactly as published

In the 2026-10-27 dataset snapshot, two project cards sit next to each other and look like a verdict. Claude Code: 24,100,000 tokens and $13.30 per task. Codex CLI: 3,900,000 tokens and $1.50 per task. Both cards cite Artificial Analysis's Claude Code vs Codex comparison, and both describe the same category of work at the highest effort setting the page publishes. The token count differs by 6.2x; the bill differs by 8.9x.

Two derived numbers make the gap easier to read. Divide cost by tokens and the implied average price is $0.55 per million tokens for Claude Code and $0.38 per million for Codex CLI. Those rates are 1.4x apart while the bills are 8.9x apart. Almost all of the difference is volume, not rate.

ProjectTokens per taskCost per taskImplied $ per 1M tokensRow source
Claude Code24,100,000$13.30$0.55AA comparison, v2.0 figures in the card's provenance note
Codex CLI3,900,000$1.50$0.38AA comparison, v2.0 figures in the card's provenance note

Three provenance notes. The figures are per-task averages from the cited comparison, not our own runs. The cards' runs-per-day values (30,000 and 45,000) are model estimates with no public source, and they are not part of these rows. Prices are list prices, before discounts or batch rates. The rows also pair different models โ€” Sonnet 5.5 against GPT-6.1 Sol โ€” so nothing here isolates the model from the harness.

2. Where 24.1M tokens come from

Our dataset carries a workflow breakdown for one Claude Code task: orient in the repository 6% of tokens, plan the change 7%, edit files 22%, run tests 18%, debug and retry 31%, verify and commit 16%. Generation is the edit block at 22%. The largest single block is the retry loop at 31%. The rest is reading, re-reading and verifying context.

The card's description states the mechanism plainly: the harness keeps a 1M-token context warm through prompt caching, so most of the spend is re-reading context on every turn rather than generating output. Codex CLI's description draws the contrast from the other side: it plans edits, runs commands and tests in one batched loop instead of one action per turn. Fewer turns means fewer context re-reads, and fewer context re-reads means fewer tokens on the invoice.

That is a harness property: turn structure, context retention, compaction policy, retry policy. The model sets the price per token; the harness sets how many tokens a finished task needs. For these two rows the model price lists are identical โ€” Sonnet 5.5 and GPT-6.1 Sol both list at $2 per million input and $10 per million output โ€” so the 6.2x token gap cannot be explained by the price list at all.

What we cannot do is split the 6.2x into a "harness share" and a "model share". The rows differ in both, and the effort labels differ too. Read the pair as a demonstration of the mechanism, not a measurement of either ingredient.

3. Same model, same harness, different effort

The cleanest isolation in our files is a configuration sweep rather than a product comparison. The Artificial Analysis table in benchmarks.json lists the same Claude Code product, on the same Sonnet 5.5 model, at three effort settings. One warning: that table is flagged UNVERIFIED and STALE as of 2026-10-27. The publisher's page now serves Index v2.0, the v1.5 rows no longer appear on it, and the dataset keeps them unchanged because they cannot be re-verified. Use them to see a mechanism, not as current scores.

ConfigurationIndex scoreTokens per taskCost per taskImplied $ per 1M
Sonnet 5.5 (max)6827,700,000$14.19$0.51
Sonnet 5.5 (xhigh)637,100,000$3.33$0.47
Sonnet 5.5 (high)552,700,000$1.24$0.46

Over this sweep, tokens per task fall 10.3x and the index score drops 13 points. The implied price per million barely moves: $0.46 to $0.51. The same pattern as the two products above, in a much tighter comparison. If you want to know why the dollar figure moved, read the token column, not the price column.

We keep the stale flag visible because the alternative โ€” quoting v1.5 as current โ€” would hide the drift the flag exists to catch. The dataset's note records Opus 5.5 at 62 and Sonnet 5.5 at 59 on v2.0, which is why the old rows were not silently refreshed.

4. Two tables from the same benchmark family disagree

Our own files contain the disagreement. benchmarks.json holds the v1.5 rows; the project cards carry v2.0 figures from the same comparison page. For Claude Code on Sonnet 5.5, the older row says 27.7M tokens at $14.19; the card says 24.1M at $13.30. That is 13% fewer tokens and 6% less money after a version change โ€” with no model price moving. For Codex, the v1.5 row is an xhigh configuration at 3.2M tokens and $1.04, while the card carries a max configuration at 3.9M and $1.50. Those labels do not describe the same run, and the cost difference is 44%.

The point is not which table is right. A row is a triple: product, configuration, task set. When the configuration string changes, the numbers move, and the movement is usually larger than the difference between the products the table invites you to rank.

A third table makes the same point from another angle. On Terminal-Bench 3.0, the codex row is the token-heavier one:

Agent and configurationReward %Tokens per taskCost per task
GPT-5.6 Sol via codex (max)56.6577,000$0.99
Claude Fable 5.1 via claude-code (high)47.3455,000$1.59
Kimi K3 via terminus-2 (thinking)39.8126,000$0.35

Here the claude-code row uses fewer tokens but costs more, because Fable 5.1 lists at $10 per million input and $50 per million output. Claude Code is not a token hog by nature; it was the token-heavy side of the AA task set and the token-light side of this one. Reward percentages and AA index scores are not the same scale, so neither column can be compared with the other.

5. What to do with the row

The published row is a starting point, not a forecast: it gives the order of magnitude of tokens per completed task on a comparable task set, and it shows which harness does the extra context work. For your own bill, multiply. At 200 tasks per day โ€” the default volume on the cost and ROI calculator โ€” 24.1M tokens per task is 4.8 billion tokens a day and 144.6 billion a month. At the published per-task cost, the Claude Code row is $79,800 a month at that volume; the Codex row is $9,000 before retries and failures.

Reading rule: when two rows differ by a factor of nine, check the volume before the price. Here the implied rates are within 1.4x. A token count is a property of the (model, harness, effort, task set) combination; a price is a property of the model.

6. What this comparison does not tell you

Four limits, in order of how likely they are to change a decision:

  • No success rate. Artificial Analysis publishes index scores, not task success rates, and our cards leave the field empty rather than filling it. Cost per solved task โ€” the number a budget needs โ€” is not derivable from these two rows.
  • Run volume is modelled. Every runs-per-day figure in the dataset is a model estimate; no vendor publishes fleet volume. The monthly figures above use a stated 200 tasks/day.
  • List prices only. No negotiated discounts and no batch pricing. Your invoice can be lower; it is unlikely to be higher.
  • The index table is stale, not settled. The v1.5 rows are kept for the mechanism they show; the v2.0 figures in the project cards are the ones the dataset treats as sourced.

None of this makes the rows useless. It makes them a description of two harnesses on one task set at one moment โ€” which is exactly the question the headline "Claude Code vs Codex" pretends to answer.

Sources

  • AgentBurn dataset snapshot 2026-10-27 โ€” projects.json (Claude Code and Codex CLI cards), benchmarks.json (Artificial Analysis v1.5 rows; Terminal-Bench 3.0), models.json (list prices).
  • Artificial Analysis โ€” Claude Code vs Codex coding-agent comparison, comparison page; the v1.5 rows in our file are flagged UNVERIFIED/STALE against the current v2.0 build.
  • Terminal-Bench 3.0 leaderboard โ€” bench.turing.com.
  • Provider list prices captured 2026-10-27 โ€” claude.com/pricing, openai.com/api/pricing.
  • AgentBurn methodology โ€” provenance labels, list-price policy and the runs-per-day caveat.