Glossary Entry

Context Compaction

Summarizing an agent's conversation as it nears the context window limit and continuing from the summary, so a long task can keep going without the full history.

LLMs Deployment

Also called: compaction

Seed source: Anthropic

Compaction trades detail for room. A good compaction keeps decisions, unresolved problems, and the current plan, and drops tool output that has already been acted on. Codex compacts automatically once a token threshold is crossed, and Claude Code uses the same technique to keep long sessions going.

Because a summary can lose something that matters ten steps later, careful harnesses pair compaction with durable notes and keep compression restorable, for example by dropping a document’s contents from context while keeping its file path so the agent can read it again.