{"version":"2.1.283","anchor":"idle-compaction-before-the-prompt-cache-expires-behind-teng","canonical_anchor":"idle-compaction-before-the-prompt-cache-expires-behind-teng","heading":"Idle compaction before the prompt cache expires, behind tengu_sunny_locket","tier":"notice","area":"Compaction","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283\/e\/idle-compaction-before-the-prompt-cache-expires-behind-teng","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283","markdown":"### Idle compaction before the prompt cache expires, behind tengu_sunny_locket\n\nA new idle path can compact a long conversation shortly before the one-hour prompt cache expires, controlled by the tengu_sunny_locket setting\n\n**Unclear.** The default minimum conversation size for idle compaction is not confirmed, and neither is exactly where the idle timer is scheduled.\n\n**What**\n\nCompaction 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\".\n\n- 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.\n\n- 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.\n\n- 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.\n\n- 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.\n\n- `compact_idle` joins the list of compaction kinds and is recorded when an idle compaction settles.\n\n- Separately, `compactConversation` now records the trigger \"manual\" rather than \"plugin\" when it is called without an origin.\n\n**Why**\n\nWhen 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`.\n\n- Flag `tengu_sunny_locket`: Not enough to say (read for one account on one subscription tier against v2.1.283; this account: no value returned, anonymous baseline: no value returned, compiled default: 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.\n- Area: Compaction\n- Tier: You'll notice\n- Useful: 5\/5\n- Signal: 4\/5"}