Context is a budget
Everything the agent knows arrived from somewhere and cost tokens, and
CLAUDE.md is the part of that bill you pay on every turn. Read the window as a budget
and the question about a line changes: not is it true, but is it worth its cost.
Everything in the window was paid for
Open a session and the window already holds what loaded before you typed: the system prompt,
the CLAUDE.md files that apply where you started, the auto memory Claude keeps for
this project where it is on, the attached tools' names, and a description of each available
skill. The run fills the rest — the ticket, the files read, every command's output — until something
compacts or clears it. Compaction, automatic near the limit or by /compact, replaces
the conversation with a summary, then reloads the system prompt, memory, tools, recently modified
files and your CLAUDE.md: your instruction file is back on the bill immediately.
Nothing there is free: a file read in the first minute is still there in the fortieth, taking room from the failing test output.
Every command below runs from day1-work. Look at what you are paying:
wc -l CLAUDE.md
wc -l CLAUDE.md
Around 180 lines for a module of five source files with no dependencies, paid on every turn of every session your team runs.
Look at what actually loaded
/context shows what is in the window right now, broken down by where it came
from. Run it before you theorize about an ignored
instruction file: often it never loaded, because the session started outside its directory.
You read the numbers off your own screen in Exercise 4's first step, in a session started
inside day1-work: the tokens shown for your CLAUDE.md (under Memory
files) and the total. The exercise compares both before and after a cut.
CLAUDE.md is the standing spec
Project instructions live at ./CLAUDE.md or ./.claude/CLAUDE.md,
loaded from the directory you started in and every directory above it; your personal ones live at
~/.claude/CLAUDE.md. Today's project file is day1-work's, which is why
every session today starts inside that folder. The lane also ships a
.claude/settings.json whose claudeMdExcludes skips any instruction file
above day1-work and whose "autoMemoryEnabled": false turns auto memory
off. If a block in the breakdown still surprises you, it is usually your personal file, a managed
policy file your organisation ships, a CLAUDE.local.md of your own, or a rules file
with no paths: list (below).
In a repository with none, /init generates one from the build commands, tests and
conventions it finds: a good first draft and a poor final one, since it records what is true
about the codebase, not what an agent gets wrong.
The line test
For each line, ask: if I removed this, would the agent make a specific mistake I can name? If you can, keep it; if not, cut it: every session is paying for it.
Your lane's file holds both kinds: a line that names its mistake, and a block that names none.
Without the line forbidding NumberFormatter and Locale, an agent
formatting an amount reaches for the platform formatter and the golden fixture stops matching.
None of the Engineering principles
lines would have changed a diff.
Without the line forbidding java.text.NumberFormat and
DateTimeFormatter, an agent formatting an amount reaches for the platform formatter
and the golden fixture stops matching. None of the Coding standards
lines would have
changed a diff.
Boris Cherny described Anthropic doing the large version of this to Claude Code's own system
prompt: You delete the entire system prompt, and then you bring it back line by line
,
keeping what measurably earns its place.
Where the cut lines go
Cutting is not deleting knowledge: a cut line has two places to go, and only one changes its cost.
An @path/to/file reference inside CLAUDE.md imports that file, and an
imported file may import others up to four hops deep. That buys you one topic per file, not a
smaller bill: count the imported lines as paid on every turn, like the rest of the file.
The sharper tool is a path-scoped rule: a file at .claude/rules/<name>.md
whose YAML frontmatter lists paths: globs enters the window when the agent reads a
matching file, and stays out otherwise. Exercise 4 moves part of your lane's file into one.
Resetting between tasks
/clear starts a new conversation with an empty window and is the correct move
between unrelated tasks, as in Exercise 1. /compact keeps a summary of the thread
instead of its transcript, with focus instructions on the same line.
When a long file is the right answer
Short is not the goal; earned is. An unusual build step, a constraint with legal weight, a footgun that has bitten two people: each prevents a mistake you can name, so each stays.
Under about fifty lines, a cut buys back little; and a smaller wc -l alone
proves nothing: what counts is whether the agent still avoids the mistakes the file names.
Exercise 4 runs all of this on your lane's file.
Quick check
Your lane's CLAUDE.md carries Don't repeat yourself
in its block
of general coding advice. Keep it or cut it?
Cut it. You cannot name the mistake its removal would cause, and it is paid for on every turn. A specific convention with a file path, or a lint rule the agent can run, would earn the same space.
You have just finished a merchant-filter task and are starting an unrelated formatter task in the same session. What do you run first, and why?
/clear. The filter transcript is now cost with no benefit, and leftover detail
about the wrong file is exactly where the next wrong edit comes from.
Sources
Claude Code documentation; cc-core-40 to cc-core-44 accessed
2026-09-23.
cc-core-08,cc-core-09,cc-core-10,cc-core-11,cc-core-12,cc-core-13,cc-core-15,cc-core-16,cc-core-17,cc-core-40,cc-core-42,cc-core-43,cc-core-44— instruction-file locations and loading, imports,/init, path-scoped rules,claudeMdExcludesand auto memory: Manage Claude's memory.cc-core-41— the launch directory is the primary working directory: Permissions.cc-core-18,cc-core-19,cc-core-20—/context,/clearand/compact: Slash commands.cc-core-35,cc-core-36— what loads at startup and after compaction: Explore the context window.cc-core-32— the version checked: Claude Code changelog.practitioners-01— the talk in the video, 2026-08-02: notes on Boris Cherny at YC Startup School 2026.context-eng-12— the ablation method quoted above, 2026-08-05: the ablation playbook write-up.