
Claude Code 2.1.299: idle compaction before the prompt cache dies
Leave a 200K+ token terminal session idle about 54 minutes and it compacts before the one-hour cache expires; plus a file-mentions env flag and a long fix list.
If you leave huge Claude Code terminal sessions sitting open, update to 2.1.299. Idle compaction now runs before the one-hour prompt cache expires, so the next message does not reprocess a 200K+ token conversation from scratch. The release also adds path-only @ file mentions and a long fix list.
What changed#
npm published @anthropic-ai/claude-code@2.1.299 at 2026-10-13 8:23 PM ET. Headline items:
- Idle compaction: a 200K+ token conversation left idle about 54 minutes is compacted before its one-hour prompt cache expires. Tune with
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, or set"idleCompaction": falsein settings.json (both need v2.1.290+). CLAUDE_CODE_DISABLE_FILE_MENTIONS: Claude gets@paths to read with tools, not file contents.- Agent view:
/effortand/fastset defaults for new sessions; bare/model,/effort, or/fastopens a picker. - Fixes: sandboxed shells can no longer write into
--plugin-dir; WSL2 bwrap path fix; Edit/Retry regression from 2.1.296 on mid-hook stops; Remote Control prompt-loss edges;/usageno longer shows over 100%.
Why it matters#
Long sessions that pause for lunch often paid a full cache miss on return. Compacting just before the hour keeps context cheaper. Path-only @ mentions cut accidental context bloat. The --plugin-dir write fix hardens sandboxed runs near plugin code.
How to use it#
- Upgrade:
npm i -g @anthropic-ai/claude-code@2.1.299and confirm withclaude --version. - Keep idle compaction on for long terminal sessions. Lower the 200K floor with
CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, or disable with"idleCompaction": false. - If
@mentions flood context, setCLAUDE_CODE_DISABLE_FILE_MENTIONS=1. - Spot-check Edit/Retry on cloud sessions and
prompt.submithooks after upgrade.
I am on Claude Code before 2.1.299. List my settings.json and env vars that relate to idle compaction, file mentions, attribution headers, and sandbox plugin dirs. Recommend exact values for 2.1.299 for a laptop that often leaves 200K+ token sessions idle for an hour.
Good to know#
- Idle timing is "about 54 minutes"; not a hard SLA.
- Attribution block off:
CLAUDE_CODE_ATTRIBUTION_HEADER=0. - Platform release notes on docs.anthropic.com still top out at Oct 9; this ship is Claude Code only.
- Watch next: idle compaction showing up alongside the new
/usagewarnings for max effort, workflows, always-on context, and large tool results.
Sources#
- https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md (## 2.1.299, checked 2026-10-14 5:57 AM ET)
- npm 2.1.299 time 2026-10-14T00:23:19.588Z via registry.npmjs.org (checked 5:57 AM ET)
Last checked: 2026-10-14