Compaction
Summarising the old conversation so the new part fits in the window.
Compaction is what an agent does when the context window is nearly full: it summarises the conversation so far into a condensed form, drops the raw transcript, and continues with the summary plus the recent turns.
It is the practical alternative to a fresh session, because it preserves decisions and context that a restart would lose. The cost is loss of detail. A summary cannot carry every fact from a hundred tool calls, and what gets dropped is rarely the least important thing.
Good compaction summaries are structured: decisions made and why, facts discovered, files touched, and what is still open. A prose summary of a long session tends to keep the narrative and lose the specifics, which are usually what you need.
Related terms
Context Degradation
The slow loss of quality as a session grows, even though nothing broke.
Context Window
Everything the model sees on one request. Finite, and it decides what fits.
Memory
A system's ability to carry information from one request to the next.
Session
One bounded run of work with an agent, from the first message to the end.
Handoff
Moving work from one session, or one agent, to another without losing the thread.
Want this working inside your team?
It starts with one conversation about your workflow.