Context Preservation Across Long Interactions
Keeping Claude focused over long conversations. Summarization strategies, context window budgeting, key information anchoring, and the 'lost in the middle' effect that causes critical facts to vanish.
Quick Reference
- →Progressive summarization loses numerical values, percentages, and dates -- extract them into persistent fact blocks instead
- →The 'lost in the middle' effect means models attend to the beginning and end of context far better than the middle
- →Tool results accumulate fast -- a single API call can return 40+ fields when you only need 5
- →Budget your context window: system prompt + case facts + recent turns + tool results must fit with headroom for the response
- →Place critical facts at the TOP of aggregated inputs to mitigate position bias
- →Structured subagent outputs (JSON with metadata) compress better than raw conversation transcripts
- →Use a 'case facts' block that is re-injected into every prompt turn so transactional data never drifts
- →Trim tool outputs immediately after the call -- downstream agents should never see raw payloads
- →For multi-turn customer support, the system prompt + case facts block should consume no more than 15-20% of the context window
- →When context is exhausted, spawn a subagent with a focused mandate rather than continuing in-context
Why Context Preservation Is an Exam Topic
Context management is the single biggest reliability risk in production Claude deployments. A customer support agent that forgets the order number mid-conversation, a research agent that silently drops a source's findings, a code agent that loses track of which files it already edited -- all of these are context preservation failures. The exam tests whether you can design systems that maintain factual accuracy across long interactions, not just short prompt-response pairs.
Domain 5 (Context Management & Reliability) accounts for 15% of the exam. Context preservation is the foundational concept -- every other topic in this domain builds on it.
The core tension is simple: Claude's context window is finite. As conversations grow, you must decide what stays, what gets summarized, and what gets dropped. Every choice carries risk. Summarize too aggressively and you lose critical details. Keep everything and you exhaust the window, degrade performance, and increase cost. The architect's job is to design strategies that preserve the right information at the right level of detail.