October 14, 2026
idleCompaction: Claude Code now compacts a conversation left idle for 54 minutes
Claude Code 2.1.299 now compacts a conversation of 200,000 tokens or more on its own once it has sat idle for 54 minutes.

A 200,000-token conversation sat idle for an hour. The prompt cache expired, and the next message recomputes the entire history from scratch.
Claude Code 2.1.299 closes this gap on its own: at the 54th minute of idle time, the terminal compacts the conversation while the one-hour cache is still alive. The people who pay for the recompute are the ones who keep long sessions open, so they get the savings.
Nothing to turn on. Idle compaction is on by default and needs version 2.1.290 or newer. The CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS variable changes the 200,000-token threshold, and the line "idleCompaction": false in settings.json turns it off completely.
@ files now go in as a link. The CLAUDE_CODE_DISABLE_FILE_MENTIONS variable gives the agent the path of a mentioned file instead of its contents, and the agent reads the file with its own tools when it actually needs it. A PDF mentioned with @ no longer sits in the session transcript.
The same version fixed the "Prompt is too long Β· automatic compaction failed" error around 200,000 tokens for users who route through their own ANTHROPIC_BASE_URL.
Both settings require version 2.1.290 or newer; on older builds neither the variable nor the settings.json line has any effect.