Claude Code adds idle compaction mechanism
The story so far
Claude Code released v2.1.299, adding an idle compaction mechanism: a conversation of 200K+ tokens that sits idle for about 54 minutes is compacted before the 1-hour prompt cache expires, avoiding reprocessing all content on the next message. The release also adds the CLAUDE_CODE_DISABLE_FILE_MENTIONS environment variable and fixes several issues including gateway model names, cloud sessions, and sandbox commands.
From Claude Code: GitHub Releases
Updates
2 updates
- Oct 15, 05:36 · 3 reportsClaude Code's idle compaction resumes from a summary; it can be disabled with idleCompaction and the threshold customizedLydia Hallie: Claude Code's idle compaction resumes from a summary; it can be disabled with idleCompaction and the threshold customized
- Oct 14, 10:49 · 1 reportClaude Code v2.1.299 releasedClaude Code: GitHub Releases: Claude Code v2.1.299 released
Coverage timeline
Follow the coverage to see the story from different sides.
- Ado KukicClaude Code adds idle compaction
Claude Code has launched idle compaction: the prompt cache is kept for 1 hour, and sessions of 200K+ tokens are automatically compacted after about 54 minutes idle, so you get a warm summary instead of a cold cache when you return. The threshold can be set via CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, and the feature can be turned off with "idleCompaction": false.
- Lydia HallieClaude Code adds idle compaction
We recently added idle compaction to Claude Code! It now compacts sessions that have been idle for a long time before the prompt cache is about to expire (around 1 hour). If you come back later to keep working, it only needs to reprocess the summary instead of the entire conversation, saving you some usage.
- Lydia HallieTop PickClaude Code's idle compaction resumes from a summary; it can be disabled with idleCompaction and the threshold customized
Claude Code's idle compaction makes Claude continue from a summary rather than the full context. The author notes it can be turned off by setting "idleCompaction": false in settings, and the threshold can be customized via CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, which defaults to 200k.
- Claude Code: GitHub ReleasesClaude Code v2.1.299 released
Claude Code released v2.1.299, adding an idle compaction mechanism: a conversation of 200K+ tokens that sits idle for about 54 minutes is compacted before the 1-hour prompt cache expires, avoiding reprocessing all content on the next message. The release also adds the CLAUDE_CODE_DISABLE_FILE_MENTIONS environment variable and fixes several issues including gateway model names, cloud sessions, and sandbox commands.