AI context compaction replaces or reorganizes part of a growing context with a smaller representation. The process may summarize older messages, retain selected constraints and move detailed outputs into referenced artifacts.
Compaction can reduce token cost and latency, but it may also remove important evidence or instructions. Systems should preserve original history, validate the compacted context and apply the intervention only within approved policy boundaries.
ELI5
Context compaction reduces a long AI conversation or work history into a smaller form while trying to preserve the instructions, decisions, evidence, and unfinished work needed to continue. Detailed outputs can be moved into referenced files instead of repeated in every prompt.
For example, an agent may replace many old tool messages with a concise summary and links to saved results. The original history should remain recoverable because a poor summary can omit an important constraint or turn uncertain evidence into a false fact.


