Source: github.com/anthropics/claude-code/releases/tag/v2.1.299
Idle compaction compacts a conversation of more than 200K tokens that has been left idle for about 54 minutes, before its one-hour prompt cache expires, so the next message does not reprocess all of it. The 200K minimum can be changed with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, and setting "idleCompaction": false in settings.json turns the feature off; both need v2.1.290 or later. A new CLAUDE_CODE_DISABLE_FILE_MENTIONS variable makes Claude receive the paths of @ file mentions instead of their contents.
For mods installed by managed settings, the release adds $.prompt.media, $.session.identity() and skill details passed to skill.prompt hooks. Mod text and spacing options gain weight, mono and tabular, and bold is deprecated in favor of weight. The self-hosted runner orchestrator also gets a --shutdown-drain-sec flag for finishing in-flight work on SIGTERM.
Several fixes affect agents directly. MCP servers named constructor or prototype were never connected, and deny and ask rules for MCP servers whose normalized name contains a double underscore did not apply. Sandboxed commands on macOS could also reach denied paths through symlinks, which is now fixed.
Why it matters if you build agents
Long-running Claude Code sessions that sit idle will be compacted before the cache expires, which changes how much context is reprocessed on the next message. If you rely on the threshold, check the new environment variable and settings option.
MCP allow rules now reach only the server they name, so mcp__a no longer allows a server named a__b. Review allow and deny rules for MCP servers whose names contain double underscores before upgrading.
Get stories like this every weekday
One short email with the day's agent tooling news.