Tag: compaction
All the articles with the tag "compaction".
Context Engineering: Compaction, Tool Clearing, and Memory
Updated:An agent's window fills with tool output, not with its own thinking. Three API primitives handle that differently: clearing replaces old tool results with stubs, compaction replaces the transcript with a summary, and memory moves notes outside the window. Each one measured on Claude Sonnet 5.5, with what it costs and what it loses.