The context meter
A long chat starts forgetting what it promised. The tempting answers add room: a bigger context window, longer summaries. The exam wants structure instead. Keep the facts that matter where no summary can touch them, cut what nobody reads, and put the key points where Claude reads best.
D5 Context Management & ReliabilityExam guide 5.1 and 5.4About 15 minutes
Start here: the hospital handover
A patient stays on a ward for a week. Every shift, one nurse hands over to the next.
Two more habits keep the handover useful. Nobody staples every lab printout into it; they copy the three values that matter. And the allergy goes at the top in a box marked Allergies, not on page 9 of a thick folder. A bigger folder would not help: it only gives page 9 more pages around it.
Claude's context window works the same way. When a chat gets near the limit, older turns are replaced by a summary: the retelling. A case-facts block is the chart. Trimming tool results is copying three values instead of stapling the printout. Key facts first, with headers, is the allergy box at the top.
- Amounts, dates or promises drift after summaries: pull them into a case-facts block that sits outside the summarised history.
- Tool results fill the window with fields nobody uses: trim them to the relevant fields before they pile up.
- One long input fits, but the middle gets missed: put key facts first and give each section a header.
- A Claude Code session is full of old output: /compact it, and keep key findings in a scratchpad file.
- A bigger window or a longer summary: it postpones the problem. On the exam it is the tempting answer, not the best one.
Words in the question that tell you which side you're on
Structure problem (the usual case)
- “after the summary”, “offers a smaller refund than it promised”
- “forgets which items”, “the numbers were right earlier”
- “about forty fields; the agent uses five”
- “the whole spec fits”, “misses the middle sections”
- “refers to typical patterns instead of the classes it found”
Tempting “more room” answers
- switch to a model with a larger context window
- make the summary longer or more detailed
- summarise more often
- tell Claude to pay attention to the whole input
- start a fresh session and explain again
Try it: fill the context meter
Pick a situation, then a strategy. The meter fills turn by turn. When it passes 90%, older turns are replaced by a summary. At the end you see which facts are still exact and what the agent actually says.
Token sizes and blur rates are illustrative, chosen to show the shape. They are not measurements. Each fact gets the same dice under every strategy, so the strategies differ only in how they work. The exam guide's point is that summaries condense numbers, dates and expectations into vague text, and that the middle of a long context is the part most easily missed.
Things to try: long refund dispute with a bigger window, then a case-facts block. Then many order lookups with trim tool results, and watch the meter stay low. Then one long input with a bigger window: nothing changes, because it already fit.
The three traps
| Trap | What the wrong option looks like | Why it loses |
|---|---|---|
| More room | “Switch to a model with a larger context window”, “raise the limit before summarising” | It postpones the summary, then the facts sit in the middle of a longer context. Every turn also re-sends more. |
| Better retelling | “Make the summary longer and more detailed”, “tell the summariser to keep all numbers” | Still a model rewriting the facts, pass after pass. Fewer slips, not none. Exact facts need a home outside the summary. |
| Right fix, wrong problem | Trim tool results when the middle of one input is missed; a case-facts block when tool results flood the window; /compact in an Agent SDK app | Each fix acts on one place in the window. Match it to where the facts are being lost. |
Practice: three exam-style questions
Answer first, then open “Think it through”.
Rule to remember
Exam guide 5.1: “Progressive summarization risks condensing numbers, %, dates, customer expectations into vague summaries.” and “Extract transactional facts into a persistent "case facts" block; trim verbose tool outputs to relevant fields; place key summaries at the beginning + explicit section headers.” Exam guide 5.4: “Scratchpad files persist key findings across boundaries; subagent delegation isolates verbose output.”