TokenSave logo TokenSave

TokenSave Data · Dataset

How much does a big CLAUDE.md or AGENTS.md cost? Claude Code vs Codex

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. Claude Code’s prompt cache absorbs most of the cost after the first turn.

Measured 2026-10-18 · 6 file sizes · 2 tools · 2 runs · License CC BY 4.0 · Related: Claude Code vs Codex startup tokens

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

Extra input tokens per request for CLAUDE.md and AGENTS.md files from 0 to 50 KB

Key findings

Input tokens and cost by instruction file size

Prompt: “Reply with the single word OK.”, then “Reply with the single word OK again.” in the same session. Both runs gave identical token counts. Cost is the API list-price figure Claude Code reports (the runs used a Max plan); Codex does not report cost.

Instruction fileClaude Code input, turn 1Added by fileClaude cost, turn 1Claude cost, turn 2Codex input, turn 1Added by file
none35,795+0$0.162$0.14314,690+0
975 bytes (1 KB)36,295+500$0.166$0.14314,962+272
5,044 bytes (5 KB)37,532+1,737$0.176$0.14315,791+1,101
10,163 bytes (10 KB)39,098+3,303$0.189$0.14416,838+2,148
25,550 bytes (25 KB)43,875+8,080$0.227$0.14520,029+5,339
51,181 bytes (50 KB)51,780+15,985$0.290$0.14621,524+6,834

Is an instruction at the end of a big file followed?

A line “The release codename for this project is BLUE-HERON-47.” was added at the start or at the end of the 50 KB file, and each tool was asked for the codename without being allowed to open any files.

ToolWhere the line was placed in a 50 KB fileRuns that knew the codename
Claude Code (CLAUDE.md)Start of the file2 / 2
Claude Code (CLAUDE.md)End of the file2 / 2
Codex (AGENTS.md)Start of the file2 / 2
Codex (AGENTS.md)End of the file0 / 2

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.md and AGENTS.md size: what instruction files cost in Claude Code and Codex [Data set]. Zenodo. https://doi.org/10.5281/zenodo.23453217

Embed the chart

Related

Questions or corrections: contact@jonhisking.com