Dataset Viewer
Auto-converted to Parquet Duplicate
tool
string
file
string
file_kb
int64
file_bytes
int64
run
int64
turn
int64
input_tokens
int64
cache_write_tokens
float64
cache_read_tokens
int64
output_tokens
int64
cost_usd
float64
answer
string
claude_code
CLAUDE.md
0
0
1
1
35,795
19,870
15,923
4
0.1622
OK
claude_code
CLAUDE.md
0
0
1
2
35,836
17,424
18,410
4
0.1432
OK
codex
AGENTS.md
0
0
1
1
14,690
null
12,032
5
null
OK
codex
AGENTS.md
0
0
1
2
14,709
null
14,464
5
null
OK
claude_code
CLAUDE.md
0
0
2
1
35,795
19,870
15,923
4
0.1622
OK
claude_code
CLAUDE.md
0
0
2
2
35,836
17,424
18,410
4
0.1432
OK
codex
AGENTS.md
0
0
2
1
14,690
null
7,680
5
null
OK
codex
AGENTS.md
0
0
2
2
14,709
null
14,464
5
null
OK
claude_code
CLAUDE.md
1
975
1
1
36,295
20,370
15,923
4
0.1662
OK
claude_code
CLAUDE.md
1
975
1
2
36,336
17,424
18,910
4
0.1433
OK
codex
AGENTS.md
1
975
1
1
14,962
null
12,032
5
null
OK
codex
AGENTS.md
1
975
1
2
14,981
null
14,720
5
null
OK
claude_code
CLAUDE.md
1
975
2
1
36,295
20,370
15,923
4
0.1662
OK
claude_code
CLAUDE.md
1
975
2
2
36,336
17,424
18,910
4
0.1433
OK
codex
AGENTS.md
1
975
2
1
14,962
null
12,032
5
null
OK
codex
AGENTS.md
1
975
2
2
14,981
null
14,720
5
null
OK
claude_code
CLAUDE.md
5
5,044
1
1
37,532
21,607
15,923
4
0.1761
OK
claude_code
CLAUDE.md
5
5,044
1
2
37,573
17,424
20,147
4
0.1435
OK
codex
AGENTS.md
5
5,044
1
1
15,791
null
12,032
5
null
OK
codex
AGENTS.md
5
5,044
1
2
15,810
null
15,616
5
null
OK
claude_code
CLAUDE.md
5
5,044
2
1
37,532
21,607
15,923
4
0.1761
OK
claude_code
CLAUDE.md
5
5,044
2
2
37,573
17,424
20,147
4
0.1435
OK
codex
AGENTS.md
5
5,044
2
1
15,791
null
7,680
5
null
OK
codex
AGENTS.md
5
5,044
2
2
15,810
null
15,616
5
null
OK
claude_code
CLAUDE.md
10
10,163
1
1
39,098
23,173
15,923
4
0.1887
OK
claude_code
CLAUDE.md
10
10,163
1
2
39,139
17,424
21,713
4
0.1438
OK
codex
AGENTS.md
10
10,163
1
1
16,838
null
12,032
5
null
OK
codex
AGENTS.md
10
10,163
1
2
16,857
null
16,640
5
null
OK
claude_code
CLAUDE.md
10
10,163
2
1
39,098
23,173
15,923
4
0.1887
OK
claude_code
CLAUDE.md
10
10,163
2
2
39,139
17,424
21,713
4
0.1438
OK
codex
AGENTS.md
10
10,163
2
1
16,838
null
14,336
5
null
OK
codex
AGENTS.md
10
10,163
2
2
16,857
null
16,640
5
null
OK
claude_code
CLAUDE.md
25
25,550
1
1
43,875
27,950
15,923
4
0.2269
OK
claude_code
CLAUDE.md
25
25,550
1
2
43,916
17,424
26,490
4
0.1448
OK
codex
AGENTS.md
25
25,550
1
1
20,029
null
0
5
null
OK
codex
AGENTS.md
25
25,550
1
2
20,048
null
19,840
5
null
OK
claude_code
CLAUDE.md
25
25,550
2
1
43,875
27,950
15,923
4
0.2269
OK
claude_code
CLAUDE.md
25
25,550
2
2
43,916
17,424
26,490
4
0.1448
OK
codex
AGENTS.md
25
25,550
2
1
20,029
null
12,032
5
null
OK
codex
AGENTS.md
25
25,550
2
2
20,048
null
19,840
5
null
OK
claude_code
CLAUDE.md
50
51,181
1
1
51,780
35,855
15,923
4
0.2901
OK
claude_code
CLAUDE.md
50
51,181
1
2
51,821
17,424
34,395
4
0.1464
OK
codex
AGENTS.md
50
51,181
1
1
21,524
null
14,336
5
null
OK
codex
AGENTS.md
50
51,181
1
2
21,543
null
21,376
5
null
OK
claude_code
CLAUDE.md
50
51,181
2
1
51,780
35,855
15,923
4
0.2901
OK
claude_code
CLAUDE.md
50
51,181
2
2
51,821
17,424
34,395
4
0.1464
OK
codex
AGENTS.md
50
51,181
2
1
21,524
null
0
5
null
OK
codex
AGENTS.md
50
51,181
2
2
21,543
null
21,376
5
null
OK

CLAUDE.md and AGENTS.md size: what instruction files cost in Claude Code and Codex

Claude 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.

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Citation

TokenSave (2026). CLAUDE.md and AGENTS.md size: what instruction files cost in Claude Code and Codex [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23453217

Check your own Claude Code usage at tokensave.app.

Downloads last month
88