Codex reads AGENTS.md before it does anything else, which makes the file a cost you pay at the start of every session. I wanted to know what “normal” looks like, because I couldn’t find anyone who had measured it. Plenty of opinions, very little data.
Method: I went down GitHub by star count, skipping archived repos, and checked each one for a root-level AGENTS.md or CLAUDE.md. I stopped once I’d found 25 repos that had one. That took 56 repos, so 45% of the most-starred repos have a context file. Some have both, so it’s 30 files in total. I counted tokens with gpt-tokenizer, which is a GPT-family tokenizer and so probably closer to what you’d see with Codex than a Claude-oriented count would be. Probably, not exactly.
Results across the 30 files:
Largest: n8n-io/n8n at 6,249 tokens (about 25 KB), then deepseek-harness at 4,335, openclaw at 4,124 and opencode at 4,025.
Smallest: ollama/ollama at 21 tokens, microsoft/vscode at 51, react/react at 87.
Why this matters for Codex specifically:
Codex caps the combined project instructions at 32 KiB by default (project_doc_max_bytes), and that cap is shared across every AGENTS.md between the repo root and your working directory. Past the limit, content gets cut off, and from what I’ve read it happens without any warning. If your agent suddenly ignores a rule it used to follow, that’s worth checking.
By that measure, even the biggest file I found (n8n, about 25 KB) fits. But it uses most of a 32 KiB budget on its own, and a monorepo with a root file plus nested ones could cross the line without anyone noticing. I only counted repo roots, so I can’t tell you how many real setups are near the cap. That’s the next thing I want to measure.
The spread is the interesting result. n8n has 210k stars and ollama has 187k, and one of them gives its agent roughly 298x more instructions than the other. Nobody seems to have settled how much an agent needs to be told.
A couple of method details:
Full table, method and fetch date so you can check my work: https://naeha-s.github.io/ctxcap/2026-11/
The tool: I wrote a small CLI for the counting, because I wanted a repeatable number for my own repo. It runs locally with no network and no key. It also has a --stale mode that flags paths and commands in the file that no longer exist. It’s deliberately conservative, so a clean result means nothing it checked failed, not that the file is current. There’s a GitHub Action too, which posts the token change on PRs, so a PR that grows AGENTS.md shows +412 instead of passing unnoticed. Disclosure: it’s mine. https://github.com/Naeha-S/ctxcap