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

1 month 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.

Ask about 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
  1. 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.

    Slide text
    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
  2. 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.

    Slide text
    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
  3. 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.

    Slide text
    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
  4. 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.

    Slide text
    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
  5. 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.

    Slide text
    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
  6. 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.

    Slide text
    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
  7. 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.

    Slide text
    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
  8. 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.

    Slide text
    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

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York