Auto-Compaction

Automatic summarization of older context when the context window fills up, preserving recent information.

Why it matters

Long-running agent sessions hit context limits. Auto-compaction lets agents work indefinitely by intelligently compressing old context while keeping recent details intact.

In practice

Claude Code uses auto-compaction during long coding sessions — earlier file reads and tool results get compressed so the agent can keep working without losing track of what it's building.

Related terms

Back to glossary