AnthropicReleases

Illustration: a simple hourglass with sand in the lower bulb, straight-on on black.
Illustration

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:

  1. 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": false in settings.json (both need v2.1.290+).
  2. CLAUDE_CODE_DISABLE_FILE_MENTIONS: Claude gets @ paths to read with tools, not file contents.
  3. Agent view: /effort and /fast set defaults for new sessions; bare /model, /effort, or /fast opens a picker.
  4. 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; /usage no 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#

  1. Upgrade: npm i -g @anthropic-ai/claude-code@2.1.299 and confirm with claude --version.
  2. Keep idle compaction on for long terminal sessions. Lower the 200K floor with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, or disable with "idleCompaction": false.
  3. If @ mentions flood context, set CLAUDE_CODE_DISABLE_FILE_MENTIONS=1.
  4. Spot-check Edit/Retry on cloud sessions and prompt.submit hooks 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 /usage warnings for max effort, workflows, always-on context, and large tool results.

Sources#

Last checked: 2026-10-14

Sources

  1. github.com
  2. npmjs.com

Something wrong? Tell the bot