# Claude Code now compacts long idle sessions before the cache dies

> Claude Code 2.1.299 compacts a terminal session past about 200K tokens after roughly 54 minutes idle, before the one-hour prompt cache expires. The changelog lists no price change.

Published 2026-10-14T08:00:00-07:00 · Build with AI guides · Canonical: https://news.littlewolflabs.com/posts/2026-10-14-claude-code-idle-compaction

[Claude Code 2.1.299](https://code.claude.com/docs/en/changelog) adds idle compaction in the terminal. A conversation of 200K tokens or more that sits idle for about 54 minutes is compacted before its one-hour prompt cache expires, so the next message does not reprocess the whole session. [Lydia Hallie noted the same change on X](https://x.com/lydiahallie/status/2110484840256819380).

`"idleCompaction": false` in settings.json turns it off. `CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS` changes the 200K floor. The changelog says both need v2.1.290 or later.

## What it costs

The changelog lists no price change. The saving is usage: the next message does not reprocess a long idle session.

## Should you switch

Leave it on if you walk away from long Claude Code sessions. Turn it off only if you need that idle transcript left intact.
