TokenSave logo TokenSave

TokenSave Data · Dataset

Claude Code vs Codex: how many tokens they use before and during work

Measured and written by · Updated . Disclosure: TokenSave gets no funding, credits or sponsorship from AI companies. All measurements use our own paid subscriptions.

Before doing anything, Claude Code sends 35,776 input tokens and Codex 14,748. On the same browser-game task Codex used 40% fewer input tokens and 47% fewer output tokens than Claude Code. Adding 30 MCP tools barely changed either.

Measured 2026-10-18 and 2026-10-22 · Claude Code 2.1.295 and Codex CLI 0.162 · 4 startup and 5 task runs per tool · License CC BY 4.0 · Related: Claude effort levels

DOI 10.5281/zenodo.23448342 · Also on Hugging Face · Kaggle · GitHub

Estimate your own Claude Code or Codex bill → See the monthly cost of Claude Code and Codex for your usage: API per task vs Claude and ChatGPT plans. Free, no sign-up. Startup input tokens and the same coding task on Claude Code and Codex

Key findings

Startup tokens and MCP tools

Input tokens for the prompt “Reply with the single word OK.”, average of four runs (two on 2026-10-18, two on 2026-10-22, same versions); in brackets, the change against no MCP server. One Codex run without MCP read 15,018 tokens; all its other startup runs read 14,618 or 14,678.

SetupClaude Code (Opus 5.5)Codex (gpt-6-luna)
0 MCP tools35,77614,748
1 MCP tool35,792 (+16)14,648 (-100)
10 MCP tools35,915 (+139)14,648 (-100)
30 MCP tools36,167 (+391)14,648 (-100)

The same coding task

Prompt, word for word: “Make a brick-breaker game that runs in the browser as a single file named index.html in the current folder. It needs 2 levels, a score display and 3 lives, and it must be playable with the keyboard and the mouse. Write the file and finish.”

RunInput tokensOutput tokensTimeLines in index.htmlAPI cost
Claude Code (Opus 5.5) · run 1123,6668,53773 s487$0.42
Claude Code (Opus 5.5) · run 279,2137,87063 s527$0.39
Codex (gpt-6-luna) · run 147,9542,87233 s49–
Codex (gpt-6-luna) · run 248,8153,80341 s117–
Claude Code (Opus 5.5) · run 379,3167,89762 s513$0.39
Claude Code (Opus 5.5) · run 477,8686,59552 s421$0.35
Claude Code (Opus 5.5) · run 578,8307,44760 s420$0.38
Codex (gpt-6-luna) · run 370,7047,11875 s29–
Codex (gpt-6-luna) · run 448,3623,46872 s46–
Codex (gpt-6-luna) · run 547,9753,10357 s51–

Method

Limitations

How to cite

Free to use, quote and republish with attribution under CC BY 4.0. Please link to this page.

TokenSave (2026). Claude Code vs Codex: startup tokens, MCP tools and the same coding task [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23448342

BibTeX

@misc{tokensave_claude_code_vs_codex_tokens_2026,
  author    = {{TokenSave}},
  title     = {Claude Code vs Codex: startup tokens, MCP tools and the same coding task},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.23448342},
  url       = {https://doi.org/10.5281/zenodo.23448342},
  note      = {Dataset, CC BY 4.0}
}

Embed the chart

Related

Questions or corrections: contact@jonhisking.com