Loading...
Loading...
Contributors:
Dataset URI:
10.5281/zenodo.23453218Claude Code and Codex run with CLAUDE.md / AGENTS.md files of 0, 1, 5, 10, 25 and 50 KB: input tokens, cache reads and cost per request over two turns, plus a test of whether an instruction at the end of a 50 KB file is followed. Headline: a 50 KB CLAUDE.md added 15,985 input tokens to every Claude Code request. Codex read only the first 32 KiB of a 50 KB AGENTS.md and silently ignored an instruction placed at the end. Source page, chart and method: https://tokensave.app/data/claude-md-agents-md-size Related: Claude Code vs Codex startup tokens (https://tokensave.app/data/claude-code-vs-codex-tokens) Measured: 2026-10-18 License: CC BY 4.0 Key findings Every kilobyte of CLAUDE.md costs about 320 input tokens on every request: +3,303 for 10 KB, +8,080 for 25 KB, +15,985 for 50 KB (+45% over the 35,795-token baseline). Codex stops reading AGENTS.md at 32 KiB (project_doc_max_bytes, 32 KiB by default): 25 KB added 5,339 tokens, 50 KB only 1,495 more. A codename placed at the end of a 50 KB AGENTS.md was answered "NONE" in 2 of 2 runs; at the start it was found 2 of 2 times. No warning appeared in the output. Claude Code read the whole 50 KB file: the codename was found at the start and at the end in all 4 runs. The prompt cache makes the first turn the expensive one: Claude Code's first request cost $0.162 with no file and $0.290 with 50 KB (+79%); the second turn $0.143 vs $0.146 (+2%). API list-price figures reported by Claude Code. The same 25 KB text added 51% more tokens in Claude Code than in Codex. Files claude-md-agents-md-size.csv: one row per tool, file size, run and turn with tool, file, file_kb, file_bytes, run, turn, input_tokens, cache_write_tokens, cache_read_tokens, output_tokens, cost_usd, answer claude-md-agents-md-size.json: the same data plus the prompts, the codename test results and the generator script gen.js: the Node script that generates the 1-50 KB instruction files (node gen.js out) Input tokens and cost by file size (run 1; both runs were identical) Instruction file Claude Code input, turn 1 Added Claude cost, turn 1 Claude cost, turn 2 Codex input, turn 1 Added none 35,795 +0 $0.162 $0.143 14,690 +0 975 bytes 36,295 +500 $0.166 $0.143 14,962 +272 5044 bytes 37,532 +1,737 $0.176 $0.143 15,791 +1,101 10163 bytes 39,098 +3,303 $0.189 $0.144 16,838 +2,148 25550 bytes 43,875 +8,080 $0.227 $0.145 20,029 +5,339 51181 bytes 51,780 +15,985 $0.290 $0.146 21,524 +6,834 Method The files are a realistic project guide for a TypeScript monorepo, generated by gen.js so the smaller files are prefixes of the 50 KB one; saved as CLAUDE.md or AGENTS.md in an otherwise empty folder. Claude Code 2.1.295 (Opus 5.5, effort medium): claude -p then claude -c -p, --output-format json, no MCP servers. Input = uncached + cache writes + cache reads. Codex CLI 0.162 (gpt-6-luna, effort medium): codex exec --json then codex exec resume --last; turn 2 is the difference from the session total after turn 1. Codename test: "The release codename for this project is BLUE-HERON-47." added at the start or end of the 50 KB file; each tool was asked for it without opening files. Limitations One kind of English instruction text; sizes between 25 and 50 KB were not measured. Cost figures are list-price estimates; subscription plans are not billed per token.
Keyword(s):
AGENTS.md; AI coding agents; Claude Code; CLAUDE.md; Codex.
Grants and Funding:
No Grants or Funding Data Available
Associated Publication(s):
No Associated Publication Data Available
Supplementary Data:
Related Dataset(s):
No Related Dataset Data Available
The National Library of Medicine (NLM) provides information about biomedical datasets. Inclusion on an NLM Web page does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health. Learn more: NLM Web Policies (nih.gov)