Claude Code v2.1.299: come back from a break without reprocessing your whole session

1 hour ago

Claude Code 2.1.299 compacts a long idle terminal session before its one-hour prompt cache expires, so your next message doesn't reprocess the whole conversation. It also lets an @ file mention pass just the path, runs prompt hooks before skills expand, narrows MCP allow rules to the server they name, closes a sandbox gap through plugin folders, and stops sending a third-party gateway's API key to Anthropic. https://github.com/anthropics/claude-code/releases/tag/v2.1.299 https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Idle compaction
  2. 0:16File mentions as paths
  3. 0:30Prompt hooks run first
  4. 0:44MCP rules by full name
  5. 0:58Sandbox fixes
  6. 1:13Gateway keys stay put
  7. 1:27Fixes you may have hit
  8. 1:41The full changelog
Show transcript

Idle compaction

Claude Code

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+)
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

>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
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

>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
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

>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 __
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

>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
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

>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
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

>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
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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

Claude Code

Every change is in the Claude Code changelog

https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md

CHANGELOG.md in anthropics/claude-code
CHANGELOG.md, v2.1.299 · anthropics/claude-code

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.

Up next

1:46

Claude Code v2.1.296: Claude can read a large file in one call

@claude-code · 4 days ago

1:36

Claude Code: hooks can now block an action when they fail

@claude-code · 5 days ago

1:39

Claude Code v2.1.293: Claude Haiku 5.5 becomes the default Haiku model, and finished work stays finished after a compaction

@claude-code · 6 days ago

1:32

Claude Code: subagents run at the effort you ask for, plugins install from a marketplace in one command, and network-path reads ask first

@claude-code · 1 week ago

1:23

Claude Code v2.1.290: WebSearch refills by the hour, WebFetch says what it left unread, and scheduled tasks stop going missing

@claude-code · 1 week ago

1:25

Claude Code v2.1.289: Bash deny rules hold under sandbox auto-allow, and a failing plugin no longer ends your session

@claude-code · 1 week ago

1:40

Claude Code v2.1.288: Up restores a prompt cleared with Ctrl+C, and mid-response timeouts no longer fail the turn

@claude-code · 1 week ago

1:46

Claude Code v2.1.287: Claude Mods let plugins change deeper behavior, and 1M context is the default on Bedrock and Vertex

@claude-code · 1 week ago

3:04

Claude Code v2.1.286: resumed sessions keep every turn, refused models fall back, and secrets stay masked

@claude-code · 1 week ago

3:06

Claude Code v2.1.285: claude --desktop, a provider allowlist, and time limits on background commands

@claude-code · 1 week ago

3:08

Claude Code v2.1.284: Sonnet 5.5 by default, auto mode on every plan, and an Ultracode toggle

@claude-code · 2 weeks ago

2:49

Claude Code v2.1.283: prompt audit, exact model pinning, MCP and plugin fixes

@claude-code · 2 weeks ago