You'll noticeTier: how much it should matter to you
4Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
CompactionArea: what it touches
ImprovementsKind: in v2.1.295,
What probably matters to youSection of the release
What
Compaction is when Claude Code summarises the earlier part of a conversation to free up room. The prompt cache is a short-lived store on the server that lets Claude Code resend a long conversation cheaply, and it expires after a while. Claude Code now sets a timer that goes off when 90% of the time until that cache expires has passed. When it goes off, Claude Code queues a compaction only if all of these hold:
The session is idle, meaning you are not typing and nothing is running.
The cache is still warm, meaning it has not expired yet.
The conversation is large enough.
Your rate limits allow the extra request.
The size threshold is still set with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, which defaults to 150000 tokens. The timer also checks whether idle compaction has been turned off.
Why
Your conversation may be compacted on its own while you are away. If you come back to a shorter, summarised history, this timer is the likely reason.