Claude Code v2.1.299: Idle Compaction Keeps Your Next Message Light
Hi, it's Shii-chan! Claude Code v2.1.299 is out, so here are the parts I think matter most.
Claude Code ReleaseWhat was announced?
The Claude Code Release page on GitHub published the notes for v2.1.299. There are many entries under Added, Changed, Fixed, and more, so I picked the ones most likely to touch everyday use. Check the original release notes for the full list.
Why it matters
The longer a Claude Code conversation runs, the more the prompt cache expiry matters. This release adds a feature aimed squarely at the slow next message you get after the cache runs out.
It also includes many changes that prevent unintended behavior, such as stricter MCP allow rules and skill name handling.
What changes
First, the headline additions:
- Idle compaction in the terminal: a conversation of 200K+ tokens left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so your next message doesn't reprocess everything
CLAUDE_CODE_DISABLE_FILE_MENTIONSenvironment variable: for@file mentions, Claude gets the paths and reads the files with its own file tools, instead of getting the contents/effortand/fastin agent view set what new sessions start with; a bare/model,/effort, or/fastthere opens a picker--shutdown-drain-secforclaude self-hosted-runner orchestrator: on SIGTERM it stops polling and gives the poll in flight and running spawn hooks up to that many seconds to finish
Dive Deep
Configuring idle compaction
Change the minimum with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS (the default is 200K). To turn it off, set this in settings.json. Both need v2.1.290 or later.
{
"idleCompaction": false
}
New things for mods
There are several additions for plugin mods too:
- A
prompt.submithook of a mod installed by managed settings can read the bytes of an image or document attached to the prompt via$.prompt.media - Mods installed by managed settings can call
$.session.identity()to see how the session is signed in, and its organization and email when managedforceLoginOrgUUIDlists that organization - A mod's Text gained
size,weight,mono, andtabular, and its Box gained named spacing steps fromxstoxl.boldis deprecated in favor ofweight - A mod's
skill.prompthook now receives the skill's frontmatter, source, plugin name, and file path
Changes worth knowing about
There were 25 entries under Changed. These are the ones that alter behavior:
- MCP allow rules reach only the server they name.
mcp__ano longer allows a server nameda__bora_; writemcp__{server}__*with the server's whole normalized name - Agent
tools:lists likewise take only the named MCP server's tools. List a server whose name contains__asmcp__{whole name}__* - Requests to claude.ai's connector proxy and to Anthropic-hosted MCP servers no longer follow HTTP redirects
- The resume command printed at exit names the session by its ID rather than its name, so nothing in a session name can run when the line is pasted
UserPromptSubmithooks run before a skill or custom slash command expands, so a hook that blocks the prompt also stops its embedded shell commands- MCP tool descriptions and server instructions from Anthropic's first-party MCP servers at
api.anthropic.comreach Claude in full instead of being cut at 4,096 characters - A skill or command whose file or folder name has hidden, direction-changing, or blank-like characters,
<, or>is no longer offered until renamed - The errors shown when
/ultrareviewcan't upload a repository no longer suggestgit add ., which could stage untracked files such as.env
Wrap-up
- Conversations of 200K+ tokens are compacted after about 54 idle minutes, before the cache expires (disable with
idleCompaction) CLAUDE_CODE_DISABLE_FILE_MENTIONSmakes@mentions pass paths only- MCP allow rules and agent
tools:lists now match server names strictly - Resume commands, hook ordering, and skill name validation got safety tweaks
This one is for people who leave long sessions sitting, teams writing MCP allow rules, and anyone building mods!