Idle compaction
Claude Code v2.1.299: come back from a break without reprocessing your whole session
Idle compaction in the terminal
- Kicks in
- 200K+ tokens, idle about 54 minutes, before the 1-hour prompt cache expires
- Tune or turn off
- CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS, or idleCompaction in settings.json (both need 2.1.290+)
Step away from a long Claude Code session, and it now compacts itself before the one-hour prompt cache runs out. That covers conversations past 200K tokens, so your next message skips reprocessing all of it.
File mentions as paths
>An @ file mention can hand Claude the path instead of the contents
- Set
- CLAUDE_CODE_DISABLE_FILE_MENTIONS
- Claude gets
- the paths, and reads them with its own file tools
- @-mentioned PDFs
- their bytes no longer sit in the session transcript
An at-sign file mention no longer has to paste the whole file into your prompt. With one new environment variable, Claude gets the path and reads the file itself. Mentioned PDFs also stay out of the transcript.
Prompt hooks run first
>UserPromptSubmit hooks now run before a skill or slash command expands
- A hook that blocks
- also stops the command's embedded shell commands
- A skill's own hook
- first runs on the prompt after the one that invokes the skill
Prompt hooks now run before a skill or custom slash command expands. So when your UserPromptSubmit hook blocks a prompt, the shell commands embedded in that command stop with it.
MCP rules by full name
>An MCP allow rule now reaches only the server it names
- Was
- mcp__a also allowed servers named a__b or a_
- Agent tools: lists
- take only the named server's tools
- Deny and ask rules
- now apply to servers whose names contain __
An MCP allow rule now reaches only the server it names. A rule for one server used to cover other servers whose names began the same way. An agent's tool list now follows the same rule.
Sandbox fixes
>Sandboxed commands can no longer write plugin code that runs outside the sandbox
- --plugin-dir
- a sandboxed command could write into it, and Claude Code reloads that code unsandboxed
- macOS symlinks
- a denied path was reachable by its real location
- Glob rules
- re-checked when their starting folder is replaced by a symlink
The sandbox closes a way out. A sandboxed command could write into a plugin folder that Claude Code reloads and runs outside the sandbox. On macOS, denied paths were also reachable through symlinks.
Gateway keys stay put
>A third-party gateway's API key no longer goes to Anthropic
- Had carried it
- feature flag, startup, fast mode, profile and feedback requests
- Also fixed
- the server-managed settings request
- Still sent
- Anthropic API keys
If you run Claude Code through a third-party gateway, its API key now stays with that gateway. Startup, feature flag and feedback requests to Anthropic had been carrying it. Anthropic API keys are still sent.
Fixes you may have hit
>Fixed: usage past 100%, silent cut-off replies, repeat scheduled tasks
- /usage and the status line
- no longer show more than 100% used
- Replies at the output limit
- no longer end the turn silently after a non-streaming fallback
- Scheduled tasks and loops
- stop firing after every turn when daylight saving time ends
The usage meter stops climbing past a hundred percent. A reply cut off at the output limit no longer ends the turn in silence. And scheduled tasks stop firing every turn when daylight saving time ends.
The full changelog
Every change is in the Claude Code changelog
https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
About 190 changes shipped in this build, many for mods, Remote Control, cloud sessions and Claude in Slack. The Claude Code changelog on GitHub lists every one.



















