Lesson 2 · 8 min
Context Compaction
Summarize old turns to keep recent detail.
Compaction summarizes early turns into a short briefing and keeps the recent N turns verbatim. Claude Code auto-compacts at ~90% of context. For your own agents, trigger compaction explicitly so the summary captures task-relevant state, not just a generic recap.
Quick check
Context & ReliabilitySelect one
What's a sensible target utilization of the context window?
