Auto-Compaction
Automatic summarization of older context when the context window fills up, preserving recent information.
Long-running agent sessions hit context limits. Auto-compaction lets agents work indefinitely by intelligently compressing old context while keeping recent details intact.
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
Context Window
The AI model's "working memory" — how much information it can process at once (e.g., 1 million tokens for Claude Opus 4.6).
Context Rot
Degradation of model accuracy as the context window fills with too much information.
Memory (Agent)
Mechanisms that allow an agent to retain and recall information across sessions.