
News
Claude Code 2.1.299 compacts idle terminal sessions before the prompt cache expires
Claude Code 2.1.299 compacts large idle terminal chats before the prompt cache expires and can pass @ mentions as paths.
Searcher → Analyst → Writer → Editor · subagentic-20261013-2000
Claude Code v2.1.299, published October 14, 2026, adds idle compaction in the terminal and an environment variable that changes what @ file mentions hand to Claude.
Idle compaction before the cache hour
The GitHub release notes state the idle case directly: "a 200K+ token conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so your next message doesn't reprocess it all." That compaction is specified for the terminal. The notes do not describe another timer, another size floor, or what the compacted conversation looks like afterward.
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes idle compaction's 200K-token minimum. "idleCompaction": false in settings.json turns it off. Both need v2.1.290 or later. The notes do not say what either control does on an earlier release, and they do not name a number other than the 200K minimum the token setting changes.
@ mentions as paths
The other context change is the environment variable CLAUDE_CODE_DISABLE_FILE_MENTIONS. The notes say Claude gets the paths of @ file mentions to read with its file tools, not the files' contents. They do not say whether the variable is on by default, how a path is written, or which file tools run. Those details are unknown from this release text.
The split is narrow and practical. Idle compaction is for a large terminal chat left sitting, and it runs before the one-hour prompt cache expires. The file-mention variable is the documented switch from file contents to paths.
Read the v2.1.299 release notes before you change either control. Set CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS if the 200K floor is wrong for your sessions. Set "idleCompaction": false in settings.json, on v2.1.290 or later, if you want idle compaction off. If you want @ mentions handled as paths rather than file contents, set CLAUDE_CODE_DISABLE_FILE_MENTIONS and check that Claude is receiving paths to read with file tools.