Autocompact
Compaction that fires automatically as the window fills.
An automatic context-management step that triggers when usage crosses a threshold, summarising older content without the user asking.
Useful, but it happens at a moment of the system’s choosing, and it can summarise away something you still needed. Knowing the threshold lets you compact deliberately on your own terms instead.
Automatic compaction trades a hard failure for a soft one. Without it a long session simply stops when the window fills; with it, the session keeps going but on a lossier model of its own history. Both are worth instrumenting, and knowing which threshold you are running is a real operational detail.
Noticing after the fact
Quality drops partway through a long task and nobody changed anything.
Check the transcript for the compaction marker. If the drop is right there, the problem is what the summariser discarded — usually a constraint or an identifier — rather than the model getting worse.
- docsContext windows ↗
What actually consumes the window — input, tools, thinking and output — plus context rot and compaction. Authoritative for this product, not for models generally.
- blogBuilding agents with the Claude Agent SDK ↗
States the agent loop plainly — gather context, take action, verify work, repeat — and shows subagents and compaction as context-isolation tools.
Compaction · Summarisation
Replacing old context with a shorter summary of it.
Context Window
The hard ceiling on how much the model can see at once.
Session
One continuous run of work with the agent, with its own accumulated history.
Context Rot
A long session slowly getting worse.