claude/for
Search
Subscribe
Claude Code

Claude Code 2.1.299-2.1.300: idle compaction and MCP rules

Claude Code 2.1.299 and 2.1.300 (Oct 14, 2026) add idle compaction, narrower MCP allow rules, stricter hooks and a cache-write split in telemetry.

Claude Code 2.1.299 and 2.1.300 both carry the date October 14, 2026 in Anthropic's changelog. Three changes deserve a look before you upgrade: long idle terminal sessions can now compact themselves before the prompt cache expires, MCP allow rules match only the server they name, and plugin hooks that cannot answer now block the action.

This brief picks up after the 2.1.295 notes. It is not the full list.

This site is independent and not affiliated with Anthropic. We read the changelog and the docs. We did not install or run these versions, so nothing below is a hands-on result.

Idle compaction before the cache expires

The 2.1.299 entry:

Added idle compaction in the terminal: a 200K+ token conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so your next message doesn't reprocess it all

Anthropic's prompt caching page describes the same behavior: Claude Code can compact a long idle conversation shortly before the cache expires. That page ties it to sessions on the one-hour lifetime, which Claude Code requests by default only on a Claude subscription within your plan's included usage.

Two settings control it, and the changelog says both need v2.1.290 or later:

  • CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS changes the 200K-token minimum.
  • "idleCompaction": false in settings.json turns it off.

The trade-off is yours to weigh. Our prompt caching guide notes that compaction replaces conversation history with a summary. If you rely on the exact wording of something said early in a long session, turn the feature off before you step away.

MCP allow rules now match one server

Two entries in this release pair change how MCP server names are matched:

Changed MCP allow rules to reach only the server they name: mcp__a no longer allows a server named a__b or a_

The entry goes on to say how to write the rule: use the server's whole normalized name.

Changed agent tools: lists to take only the named MCP server's tools; list a server whose name contains __ as mcp__<whole name>__*

The practical step: search your settings files for mcp__ rules and check each one against the server it was meant for. A rule that used to cover a similarly named server will stop doing so. For ask and deny rules, see our permissions guide.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.

Hooks and loading checks tighten

Several entries in these two releases move toward refusing instead of guessing:

  • Plugin hooks fail closed. Actions a plugin hook can block are refused, not let through, when the hook cannot be handed them or cannot hand back its answer. A tool that already ran has its result withheld.
  • Prompt hooks run earlier. UserPromptSubmit hooks run before a skill or custom slash command expands, so a hook that blocks the prompt also stops its embedded shell commands.
  • Hook input is validated. The updatedInput from PreToolUse and PermissionRequest hooks is checked like Claude's own input: unknown keys are dropped, and input the tool rejects denies the call.
  • Odd skill names are skipped. Changed skill and command loading: one whose file or folder name has hidden, direction-changing or blank-like characters is no longer offered until renamed.

Settings hooks got their own fail-closed switch earlier: onFailure: "block" arrived in 2.1.295. Our fail-closed hooks guide covers it.

Transcripts now carry more

The 2.1.300 entry on local session transcripts:

Changed local session transcripts to also record each API request's system prompt, tools and parameters, so a transcript you choose to share can reproduce a request exactly

Our reading: a shared transcript now exposes more than the conversation. Skim it before you attach it to a bug report or a ticket. For how long local transcripts are kept, see our guide on keeping conversations longer than 30 days.

Telemetry: cache writes split by lifetime

2.1.300 adds two fields to the OpenTelemetry api_request event:

Added cache_creation_5m_tokens and cache_creation_1h_tokens to the OpenTelemetry api_request event, splitting cache writes by lifetime

It also adds GenAI semantic-convention attributes to trace spans, such as gen_ai.provider.name, gen_ai.conversation.id, gen_ai.tool.name and error.type. If you export telemetry, the split lets you see whether one-hour or five-minute writes dominate. The prompt caching guide explains why that matters.

Smaller changes worth a glance

  • File mentions: CLAUDE_CODE_DISABLE_FILE_MENTIONS makes Claude get the paths of @ file mentions to read with its file tools, not the files' contents.
  • Usage warnings: /usage now warns about max effort, workflows, always-on context and large tool results.
  • Exit: background commands still running 1.5 seconds after being asked to stop are force-killed.
  • Gzip: large requests to api.anthropic.com use gzip even when telemetry is disabled; CLAUDE_CODE_GZIP_REQUEST_BODIES=0 turns it off.
  • VS Code: the claudeCode.attachSelection setting stops selected text from being added to your messages.
  • Mods: new building blocks include virtualText, the prompt.change hook and $.session.identity() for mods installed by managed settings. Our Claude Mods guide covers enabling them.

Upgrade readout

If youDo this
Leave long terminal sessions idleDecide whether you want idle compaction; set "idleCompaction": false if not
Write MCP allow rulesRe-check each mcp__ rule against its exact server name
Script claude remote-controlRemove --sandbox and --no-sandbox: passing either now exits with an error. Set sandbox.enabled in settings instead
Export telemetryLook at the new 5m and 1h cache-write fields
Share transcriptsReview them first
Anyone elseRoutine upgrade

What this brief does not cover

The changelog also lists many bug fixes and smaller improvements under both versions. We did not read through them. Anything between 2.1.295 and 2.1.299 is also outside this note.

What does Claude Code idle compaction do?

A terminal conversation of 200K or more tokens that sits idle for about 54 minutes is compacted before its one-hour prompt cache expires. Your next message then does not reprocess the whole history. It arrived in 2.1.299.

How do I turn off Claude Code idle compaction?

Set "idleCompaction": false in settings.json. Anthropic's prompt caching page says this requires Claude Code v2.1.290 or later. To keep the feature but change its 200K-token minimum, set CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS.

Do my MCP allow rules still work after 2.1.299?

Only for the server they name. A rule such as mcp__a no longer allows a server called a__b or a_. Use the server's whole normalized name in the rule, as the changelog entry instructs.

Sources (checked 2026-10-15)

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.