Compaction
Also: context compaction
Squeezing a long conversation into a short summary so there is room to keep going. Details can be lost in the squeeze.
The fuller definition
Compaction reduces conversation or task history into a smaller representation so work can continue within context limits.
2,000
8,000
4,000
2,000
A hypothetical 16,000-token budget. Real limits and token accounting depend on the model. Saving a file outside this budget does not mean it is present in the current context, and a passage inside it is not guaranteed equal attention.
A concrete example
A long task is summarized into completed steps, current files, and remaining questions.
The distinction that matters
A summary can omit qualifications. Keep original sources and verify state against actual artifacts.
Related terms
Memory
A feature that saves facts between conversations so you do not have to repeat them. It is a saved note, not the model learning.
FoundationsContext window
How much text the model can hold in mind at once: your question, the documents you added, and the conversation so far. Anything outside it is invisible to the model.
Agents & automationCheckpoint
A saved point in a long task that work can be resumed from.
Where it is taught
Give AI a brief it can actually followSource and further reading
Anthropic · Context engineeringThe definition and example are written for this library. The link gives background, official documentation or legal authority as labelled. Legal scope depends on the jurisdiction and current text; product features depend on release and settings.