Claude Code v2.1.299: idle compaction, file-mention controls, and mod hook upgrades
cliClaude Code 2.1.299 adds idle compaction that pre-compacts 200K+ token conversations before the 1-hour prompt cache expires, a CLAUDE_CODE_DISABLE_FILE_MENTIONS env to make @-mentions path-only, richer mod hook surfaces (prompt.media bytes, session.identity, skill frontmatter, session.append queue door), /effort and /fast agent-view commands, and many sandbox, MCP, and gateway fixes.
An agent can now keep long Claude Code sessions cheap via automatic idle compaction before cache expiry, control whether @-file mentions pass paths vs contents, and build mods that read attached image/document bytes and session identity.
Point release but packs several agent-relevant behaviors: idle compaction (cost/latency), file-mention mode toggle, mod hook additions (prompt.media, session.identity, session.append queue), and MCP/sandbox bug fixes.
npm i -g @anthropic-ai/claude-code@2.1.299# Install
npm i -g @anthropic-ai/claude-code@2.1.299
# Keep @-mentions as paths only (agent reads with file tools)
export CLAUDE_CODE_DISABLE_FILE_MENTIONS=1
# Tune idle compaction (default threshold 200K tokens)
export CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS=150000
# Or disable in settings.json: { "idleCompaction": false }
claude