Skip to content

Claude Code v2.1.299

Released · Anthropic

BreakingSecurity fixChanges context and compaction settings, hooks, sandbox settings, settings files

What the release notes say

What's changed

  • Added CLAUDE_CODE_DISABLE_FILE_MENTIONS environment variable: Claude gets the paths of @ file mentions to read with its file tools, not the files' contents
  • 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
  • Added CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS to change idle compaction's 200K-token minimum; "idleCompaction": false in settings.json turns it off. Both need v2.1.290 or later
  • Added $.prompt.media so a prompt.submit hook of a mod installed by managed settings can read the bytes of an image or document attached to the prompt
  • Added $.session.identity() for mods installed by managed settings: how the session is signed in, and its organization and email when managed forceLoginOrgUUID lists that organization
  • Added size, weight, mono and tabular to a mod's Text and named spacing steps (xs to xl) to its Box; bold is deprecated in favor of weight
  • Added --shutdown-drain-sec to claude 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
  • Added the skill's frontmatter, source, plugin name and file path to what a mod's skill.prompt hook receives
  • Added /effort and /fast in agent view to set what new sessions start with; a bare /model, /effort or /fast there now opens a picker
  • Added a "safe mode" line to the agents view peek panel for background sessions started with --safe-mode
  • Added a one-time note when plan mode won't ask before most edits or commands because bypass permissions is available
  • Added --disallow-tools and a disallowed_tools case field to claude plugin eval to keep specific built-in tools, such as Agent, out of eval runs
  • Added support for turning off the attribution block in Claude Desktop's Code tab: set CLAUDE_CODE_ATTRIBUTION_HEADER=0 in the env of a Claude apps gateway's code policy
  • Added a field to the attribution block in Claude Code sessions behind a Claude apps gateway; remove the block with CLAUDE_CODE_ATTRIBUTION_HEADER=0
  • Added a queue door to the session.append mod hook, so a mod can make the transcript's queue records differ from the prompt as sent
  • Added a note in /plugin and claude plugin validate naming a mod's hooks that are skipped where an organization manages Claude Code
  • Added /usage warnings for max effort, workflows, always-on context and large tool results
  • Fixed the error for a denied cloud session, which could point to the wrong organization when a key from apiKeyHelper was in use
  • Fixed sessions on a gateway-specific model name behind a custom ANTHROPIC_BASE_URL ending with "Prompt is too long · automatic compaction failed" near 200K tokens instead of sending the request
  • Fixed a mod that submits a prompt at the end of every turn keeping a headless run going past --max-turns, --max-budget-usd, an interrupt, or the end of the host's conversation
  • Fixed cloud sessions sometimes showing the model's follow-up text after a tool group's one-line label
  • Fixed the Write and Edit tools creating a mod in a session's mods folder without asking in accept-edits mode when the config directory's path has no .claude in it
  • Fixed installed mods that kept running in an open session after being turned off remotely; they now unload between turns
  • Fixed Edit and Retry in Cowork and claude.ai cloud sessions failing on a message stopped while its UserPromptSubmit or mod prompt.submit hooks were still running (regression in 2.1.296)
  • Fixed an agent teammate started without a description keeping part of a credential from its prompt in the task description shown for it
  • Fixed the claude.ai view of a Remote Control or cloud session freezing when a large batch of events could not finish uploading over a slow connection
  • Fixed a sandboxed shell command being able to write into a --plugin-dir folder, whose code Claude Code reloads and runs outside the sandbox
  • Fixed memory growth under heavy debug logging (--debug, --debug-file), and a hang on exit when the debug log is on a disk or network mount that stops accepting writes
  • Fixed memory growing without bound when debug output goes to stderr and the parent process stops reading it
  • Fixed rm prompts on shell -c scripts that don't run rm. An rm built at run time in a script Claude Code can't read no longer prompts unless CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT=1
  • Fixed double-clicking a word in an expanded transcript row in fullscreen mode collapsing the row instead of selecting the word
  • Fixed claude mcp list, claude doctor and /status reporting an empty .mcp.json as invalid
  • Fixed /btw jumping the transcript to the bottom when asked while scrolled up in fullscreen
  • Fixed sandboxed commands failing on WSL2 with bwrap: Can't mkdir /mnt/c/Program Files/ClaudeCode when the sandbox can write to the Windows drive
  • Fixed scheduled wakeups (ScheduleWakeup) not firing while a background task was running in Agent SDK, IDE and claude remote-control sessions
  • Fixed a mod's prompt.submit rewrite being silently dropped, sending the prompt as typed, for some prompts with a pasted image or an image that can't be read
  • Fixed a Remote Control prompt being lost when another queued prompt in the same batch failed to deliver
  • Fixed a Remote Control prompt that had passed its hooks being dropped from prompt history when Stop interrupted the next queued prompt's hook
  • Fixed sign-in, MCP servers and project trust appearing lost on Linux after a sandboxed command left an empty .config.json in the config directory
  • Fixed /sandbox reporting success when its setting could not be saved because the project folder is not writable; it now says nothing changed and why
Claude Code v2.1.299 release notes · DevAgentRadar