Read the Loop · Chapter 4 of 8

Compaction

When a conversation gets too long, Claude Code can replace it with a summary the model writes. We compacted a real session, then asked the agent what it had done. This is what it kept, and what it left out.

Why an agent compacts