▶ Concept walkthrough: the attention budget

Module 08 opening video · ~3 minutes · watch one session fill, rot, and recover with the four levers

The context window, top to bottom

system promptalways first; you never see it
CLAUDE.mdyour standing instructions
auto memoryClaude's notes from earlier sessions
tools and skills listnames only until used
your prompttiny next to what loaded
IntakeController.java540 lines, stays for the session
ProviderIdRule.javastays
TimelyFilingRule.javastays
order lookup result40 fields; 5 mattered
search result2,000 lines of matches
nine more fileseach one stays
summary of the conversationwhat compaction leaves behind
the session · /context
> /context

Context window: 200k tokens

Memory files
  CLAUDE.md (project)          1.9k
  MEMORY.md (auto memory)       0.7k
System prompt                   4.2k
Tools and skills (listing)      0.9k

Used before your first word: ~8k

Nothing you typed is in here yet.
the session · your first ask
> which class validates an incoming claim?

Reading IntakeController.java
Reading ProviderIdRule.java
Reading TimelyFilingRule.java

Three files enter the window. They stay
there for the rest of the session, whether
or not the next question needs them.
a tool result · the order lookup
{ order_id: 88213, member_id: 40021,
  status: "rejected", amount: 412.50,
  currency: "USD", created: "2026-08-11",
  updated: "2026-08-12", channel: "portal",
  plan_code: "H2", provider_npi: ...,
  provider_name: ..., provider_addr_1: ...,
  provider_addr_2: ..., provider_city: ...,
  ... 26 more fields ...
}

Five fields answer the question. Forty
sit in the window. Every later answer
spends attention on the other thirty five.
the session · 4pm, the same question
> which class validates an incoming claim?

The validation layer typically handles
that through a set of rule classes.

(10am answer: IntakeController hands each
claim to ProviderIdRule, TimelyFilingRule,
and DuplicateClaimRule.)

Same model. Same files still in the
window. The specific answer is in there,
in the middle, under 150k tokens of
later reading. This is context rot.
the session · after /compact
> /compact focus on the claims validation
  question

Conversation compacted.
Re-read CLAUDE.md
Re-read MEMORY.md
Read TimelyFilingRule.java
Read findings.md

The history is now one summary. The files
that survive were reloaded from disk, not
remembered. Anything you said only in
conversation is in the summary or gone.
findings.md · structured note-taking
2026-08-29 | intake/IntakeController.java
  entry point for every claim
2026-08-29 | intake/rules/ProviderIdRule.java
  rejects a claim with no provider ID
2026-08-29 | intake/rules/TimelyFilingRule.java
  180 days; 3 payer code exceptions

A file is outside the window. It does not
rot, it does not get summarized, and
Claude reads it back when asked. One line
per fact, with its path and date.
a subagent · its own window
> use a subagent to list every test file
  and what each covers. i only want the list

(subagent: reads 62 files in its own
window, 140k tokens of reading)

Report back to you: 62 lines.

Your window grew by the 62 line report.
The 140k tokens of reading never touched
it. This is delegation, the third lever.
just-in-time retrieval
CLAUDE.md (excerpt):

  Provider letter templates live in
  intake/letters/. Read a template only
  when a question is about letters.

A pointer costs one line. The 30 template
files cost nothing until a question needs
one, and then only that one loads. The
window holds references, and loads content
when it matters.
Module 08 · Opening walkthrough
The attention budget
One session, watched from empty to full: what loads before you type, why the answers get vaguer by 4pm, and the four levers that keep a long session sharp. Three parts:
1 · What is in the window 2 · The attention budget 3 · The four levers
Capacity, budget, four levers
Compaction, structured note-taking, subagents, and just-in-time retrieval. The chapter takes each one on its own, and the closing demo runs all four on a real codebase.

Back to the chapter →

Part 1 · What is in the window Part 2 · The attention budget Part 3 · The four levers