Claude Code · 5 min read

Idle compaction keeps long conversations cheap after a break

Claude Code now compacts a 200K+ token terminal conversation after about 54 idle minutes, before the one-hour prompt cache expires. The week also tightens MCP allow rules and aligns subagent defaults across the terminal, SDK, desktop and VS Code.

Key takeaways 6
  • Idle compaction in the terminal compacts a conversation of 200K+ tokens that has been idle for about 54 minutes, before the one-hour prompt cache expires, so your next message doesn't reprocess everything.
  • You can turn idle compaction off in a new `/config` row or with `"idleCompaction": false`, and change the 200K-token minimum with `CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS`.
  • MCP allow rules now match only the server they name, so `mcp__a` no longer covers `a__b` or `a_`. Check any rules that relied on the old behavior.
  • Fork subagents are now on by default in `claude -p`, the Agent SDK, the desktop app and VS Code. `CLAUDE_CODE_FORK_SUBAGENT=0` turns them off.
  • Auto mode gets `CLAUDE_CODE_AUTO_MODE_MODEL` for the client-side classifier, and headless runs with no permission mode start in `default` mode in more situations.
  • `/advisor` now works on Claude Platform on AWS, and VS Code renders LaTeX math.

A long conversation is expensive to resume once the prompt cache behind it has expired. You step away for lunch, come back, and your next message pays to reprocess everything. This week Claude Code compacts such conversations for you before the cache runs out. It also tightens how MCP allow rules match server names and makes subagent defaults the same across the terminal, SDK, desktop app and VS Code.

The period is Week 42, October 14 to 18, 2026: versions 2.1.299 to 2.1.303, five releases and 393 changelog entries. Below are the changes that affect daily work, followed by shorter technical notes.


Idle compaction: what happens when you leave a long session alone

What it does. In the terminal, a conversation of 200K+ tokens that sits idle for about 54 minutes is compacted before its one-hour prompt cache expires. Your next message then doesn’t reprocess the whole conversation. The feature arrived in 2.1.299, and 2.1.302 added the controls described below. The context window documentation covers the background.

Conditions. The feature applies only in specific circumstances:

  • It runs in the terminal.
  • The conversation must be at least 200K tokens. CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes that minimum.
  • The conversation must sit idle for about 54 minutes, which is just inside the one-hour cache window.
  • The environment variable and the idleCompaction setting both need v2.1.302 or later.

How to turn it off. Version 2.1.302 added an Idle compaction row to /config that switches the feature off or back on. You can also put "idleCompaction": false in settings.json. The notices shown after an idle compaction now tell you how to turn it off, so you don’t have to remember any of this when it first triggers.

Who benefits. If you keep one big session open all day and come back to it after meetings, the default is probably what you want. (If you prefer to decide yourself when a conversation gets compacted, the off switch is one row away.)


Changes for everyday work

Subagent defaults now match everywhere. Fork subagents (subagent_type: "fork") are on by default in claude -p, the Agent SDK, the desktop app and VS Code, as they already were in the terminal. CLAUDE_CODE_FORK_SUBAGENT=0 turns them off, and claude mcp serve never offers them. The desktop app and VS Code also always run the main conversation’s subagents in the background, as the terminal does, rather than letting Claude choose. A subagent’s own Agent calls in claude -p, the SDK, desktop and VS Code now run in the foreground by default. Details are in the subagents documentation.

MCP allow rules match only the server they name. An allow rule such as mcp__a no longer also allows a server named a__b or a_. To allow every tool of a server, write mcp__<server>__* with the server’s whole normalized name. Agent tools: lists follow the same rule, so a server whose name contains __ must be listed as mcp__<whole name>__*. A fix in the same release means deny and ask rules for such servers now apply as well. If a rule of yours depended on the looser matching, it will stop allowing those tools. See the permissions documentation.

Auto mode: classifier model and headless defaults. CLAUDE_CODE_AUTO_MODE_MODEL selects the model the client-side auto mode classifier uses. It does not change the model for server-side auto mode. Separately, claude -p and Agent SDK sessions with no permission mode now start in default mode on third-party providers, with telemetry off, or on a fresh install. --permission-mode auto keeps auto. With the server-side classifier, a conversation too long for the safety check is now compacted instead of every checked tool call being denied. The auto mode configuration page has the details.

/advisor on Claude Platform on AWS. The command now works there. No advisor runs until you pick one with /advisor, the advisorModel setting or --advisor. CLAUDE_CODE_DISABLE_ADVISOR_TOOL=1 turns the advisor off. More in the advisor documentation.


Technical notes

Context and models. Switching to a model with a smaller context window now has the previous model summarize a conversation that is too long for the new one (2.1.301). /usage now warns about max effort, workflows, always-on context and large tool results. Setting CLAUDE_CODE_DISABLE_FILE_MENTIONS makes @ file mentions pass Claude only the file paths, to read with its file tools, instead of the files’ contents.

Agent view. It gets /effort and /fast to set what new sessions start with. A bare /model, /effort or /fast there now opens a picker.

Editor and terminal. VS Code renders LaTeX math in Claude’s responses, including $$ and \[ … \] blocks and inline $…$ and \(…\). The new claudeCode.attachSelection setting stops text selected in the editor from being added to your messages. Vim mode gets the % motion to jump to the matching bracket, alone or combined with d, c or y.

Unattended runs and telemetry. CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS makes unattended retry mode end a request at a usage limit that resets too far away instead of waiting. The OpenTelemetry api_request event now has cache_creation_5m_tokens and cache_creation_1h_tokens, and trace spans carry GenAI semantic-convention attributes.

Mods. Mods can now rewrite a workflow agent’s prompt and model in agent.spawn and listen to the new prompt.change hook. Input accepts rows for multi-line fields.

Routines and Slack. A routine’s page now shows a banner explaining why its last run didn’t start, such as your organization reaching its limit on concurrent cloud sessions. In Slack, an Owner or Claude Tag admin can let Claude answer in Slack Connect channels shared with another organization (off by default). Connector actions that need approval get a private Allow once / Deny card.


What to take away

If you work in the terminal. Open /config and look at the new Idle compaction row, then decide whether you want the default. If your long sessions regularly sit idle, raise or lower the threshold with CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS. Run /usage to see the new warnings, and try % in Vim mode.

If you run parallel sessions. Fork subagents are now on by default outside the terminal too, so check whether your SDK or claude -p workflows behave differently. Set CLAUDE_CODE_FORK_SUBAGENT=0 if they do. In agent view, set /effort and /fast once for new sessions, and use the bare /model picker.

If you administer integrations and company deployments. Review your MCP allow rules and agent tools: lists, especially for servers whose names contain __. Rewrite broad rules as mcp__<server>__*. Check which headless jobs have no permission mode, since they may now start in default mode. Consider CLAUDE_CODE_AUTO_MODE_MODEL if you use the client-side classifier. The new cache-creation fields in the OpenTelemetry api_request event are worth adding to your dashboards. In Slack, Slack Connect answers stay off until an Owner or Claude Tag admin enables them.

Sources: the Claude Code changelog, versions 2.1.299 to 2.1.303 (October 14 to 18, 2026), and the linked documentation pages. Availability of individual features may change, so check the documentation for your plan and platform.

Patrick Zandl trains teams in Claude Code and agentic software development in Prague and writes about what actually works in real-world AI-assisted projects. Follow on LinkedIn

Read next

Get the next one by email

New articles and the weekly Claude Code update. No spam.