The second layer. The model can only act on what is in its window — and attention is a budget, not a bucket. Context engineering is curating the smallest set of high-signal tokens that lets the model do the job. Nine lessons — from the attention budget to the startup ledger, the four failure modes, and the delete-first discipline.
Bigger windows didn't solve memory: accuracy degrades as context grows — practitioners call it context rot. Every token you add competes with every other token for the model's attention. The discipline starts by treating context as a scarce resource: what does this task actually need to see, and what is just noise riding along?
Anthropic's rule: find the smallest high-signal token set that maximizes the outcome. System prompts live in a Goldilocks zone — specific enough to guide, flexible enough to generalize. Tools should be unambiguous and non-overlapping. If two instructions or two tools could both apply, the model will sometimes pick wrong; make one of them clearly the answer.
Instead of stuffing everything into the window up front, give the model lightweight references — file paths, IDs, links — and tools to fetch details when needed. This mirrors how people work: you don't memorize the codebase, you know where to look. Retrieval at runtime keeps the window clean and the information current.
Long tasks outgrow any window. Two moves keep them alive: compaction (summarize the conversation so far, keep decisions, drop dead ends) and structured note-taking (an external NOTES.md the agent updates and re-reads — memory that survives the window). What you preserve matters more than how much you cut: keep decisions and constraints, discard transcripts.
The heaviest context tool is a second context. A sub-agent explores a big problem in its own window and returns a 1–2k-token summary — the main thread gets the conclusion, not the noise. This is where context engineering hands off to graph engineering: each node in a graph is, among other things, a context boundary.
Before you type a single character, the window is already loaded: system prompt, memory files, tool names, skill descriptions, project instructions. In Anthropic’s own session simulation that fixed overhead runs roughly 7,850 tokens — against your 45-token request. And unlike your prompt, the overhead reloads on every request for the life of the project. A bad prompt costs you one answer; a bad line of always-loaded context taxes a fraction of every answer the model will ever give you here.
“Too much context” is not a diagnosis. Drew Breunig catalogued four distinct failure modes: poisoning (a hallucination enters context and everything downstream builds on it), distraction (accumulated context overwhelms what the model knows from training), confusion (irrelevant tools and files influence the answer), and clash (parts of the context disagree with each other). Clash is the one you author yourself — one file says document thoroughly, another says never add comments — and you pay the reconciliation tax on every request, invisibly, because the output still looks fine.
Anthropic removed over 80% of Claude Code’s system prompt for the newest model generation — and measured no loss on their coding evals. Not a rewrite; a deletion, of guidance that felt load-bearing right up until it was gone. Invert your default: treat every line as guilty until proven useful. Cut whole blocks, not sentences (single lines sit below the noise floor of any eval), run a small harness — even ten prompts you care about with a rubric — and restore only if something breaks. When a rule does survive, convert it: “never Y” becomes “prefer Z; Y is a known gotcha here” — a principle that tells the model what to look at, not what to output. Keep hard rules only for destructive operations, security boundaries, and compliance.
Examples now constrain more than they teach: demonstrate three ways to use a tool and you quietly cap the model at those three. Put the effort into the interface instead — a status enum of pending / in_progress / completed teaches an entire lifecycle without a single example, and when tool schemas load on demand the description becomes the discovery surface, so write it to say when the tool applies. Retrieval over tool descriptions has been shown to improve selection accuracy roughly threefold. Documents follow the same shape: an always-loaded core under 200 lines holding only the gotchas the model cannot infer by reading the repo, with everything else behind triggers — a tree, not a scroll. And put critical rules at the top of every file: truncation after compaction keeps the start.