What
Compaction means summarising a long conversation so it takes less space. The prompt cache is stored, already-processed conversation that makes the next request cheaper while it lasts. A new idle path can compact the conversation while the session sits idle, shortly before a one-hour prompt cache lapses, and then shows "Compacted while idle, before the prompt cache expired".
- It is controlled by the remote setting
tengu_sunny_locket. If that setting supplies no value, the mode falls back to "off". It runs only in mode "log" or "compact". Mode "log" only records that it would have compacted; mode "compact" compacts. - A timer fires a fraction of the way (default 0.9) from the last request to the cache's expiry, and only when the last request used the one-hour cache.
- When it fires it checks, in order: the mode, that compaction is enabled, that the conversation's start is unchanged, that the cache is the one-hour kind, that it is still warm, that the context is over the token minimum (default 200000, never below 100000), that no newer request was made, and that usage is not near its limit.
- It declines with "held_elsewhere" when another process holds the session, "transcript_advanced" or "transcript_unreadable" when the saved conversation does not match, "busy" during a turn, and "present" when you were active recently.
compact_idlejoins the list of compaction kinds and is recorded when an idle compaction settles.- Separately,
compactConversationnow records the trigger "manual" rather than "plugin" when it is called without an origin.
Why
When it is in "compact" mode, a long session left idle is shrunk before its cache expires, so the next message does not have to reprocess the whole history from scratch. Whether it runs for you depends on tengu_sunny_locket.
tengu_sunny_locket Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.283: not a boolean we can read
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
Read once, for one account on one subscription tier, against v2.1.283. It isn't a statement about your account. What a flag value here can and cannot tell you
The default minimum conversation size for idle compaction is not confirmed, and neither is exactly where the idle timer is scheduled.
New in this build: tengu_sunny_locket