
Every always-on instruction file costs tokens on every turn, and past a point it starts costing...
Every always-on instruction file costs tokens on every turn, and past a point it starts costing adherence too. Here is what Claude Code, Cursor and Codex actually document about size, plus a checklist for trimming.
Originally published on clogmeter.vercel.app.
Short answer: aim for a lean always-on file — roughly under 200 lines per CLAUDE.md
(Anthropic’s documented target) and treat Cursor project rules as under 500 lines each,
split by concern. There is no universal “perfect” line count. The real limit is whether the model
still follows the rules that matter once system prompt, tools, skills and the task compete for the
same attention budget.
No invented benchmarks here. The numbers below come from vendor docs and published guidance as of late 2026.
| Tool | File | Published guidance |
|---|---|---|
| Claude Code | CLAUDE.md / rules | Target under 200 lines per file; longer files consume more context and reduce adherence. Imports organise files but still load with the parent. |
| Cursor | .cursor/rules / AGENTS.md | Keep rules under 500 lines; split large rules into focused files. Prefer references over pasting whole docs. |
| OpenAI Codex | AGENTS.md | Combined project instruction files are capped (default 32 KiB); overflow is truncated. |
Community write-ups often talk about a practical “~150 instruction” attention budget for frontier models before adherence drops — that is research/context, not a hard file limit. Your instruction file shares that budget with the agent’s system prompt and tool descriptions, so leave headroom.
CLAUDE.md / AGENTS.md is re-read at session start; fat files tax every message and every general-purpose subagent./context (and /doctor for trim proposals). For any stack, paste the files into Clogmeter to see token weight vs common windows and spot duplicates/conflicts.AGENTS.md / path-scoped Cursor or .claude/rules files beat one giant root file.AGENTS.md with thin CLAUDE.md / Cursor adapters instead of divergent copies.If the root file is hundreds of lines, mixes architecture essays with one-off workflows, or repeats the same rule in three places, it is already too long for reliable adherence — even if the model still “sees” the file. Vendors warn that longer instruction files reduce compliance before hard truncation kicks in (Codex’s 32 KiB cap being the blunt case).
A useful rule of thumb many teams use: if you would not ask a new teammate to memorise the whole file before their first PR, do not force the agent to either. Make the root file the map; put the territory in scoped docs and skills.
If you want to see where your own AGENTS.md, CLAUDE.md or Cursor rules spend tokens, I built a free browser-only checker that also flags duplicates and always/never conflicts: Clogmeter.
aiI like AI coding agents. I do not like when they rewrite a file that was already fine, hard-code a...
mcpConnecting 3 to 5 Model Context Protocol (MCP) servers (GitHub, Postgres, Linear, Slack, Notion) into...
aiHow Claude Code, Codex and Cursor load skills, what really costs context, and how to audit, prune and scope installed skills.
aiI use Cursor almost every day. The hard part is not generating code. It is giving the agent enough context, constraints, and a plan so the feature still makes sense after it reaches production.
aiLearn how the Model Context Protocol standardizes AI integrations, with a look at connecting Claude and Cursor to custom environments.
cursorCursor's November 6 changelog entry is short — "Voice Chat with Agents" — but it changes the shape of...
Workflows from the Neura Market marketplace related to this Cursor resource