Claude Code v2.1.304: rm on mounted drives asks first, a usage warning when you resume#

Published by

Part of the Claude Code Version Tracker series. | Official Env Vars | Official Changelog

Claude Code v2.1.304, the release after v2.1.303, extends the dangerous-removal safety prompt to rm on a mounted drive or a folder at its top level (/Volumes, /media, WSL's /mnt/c), warns Pro and Max users when resuming an inactive conversation would use a noticeable share of their 5-hour limit, and adds decider: "person" and e.isReadOnly to a mod's tool.check.[1]

rm on a mounted drive now gets the safety prompt#

An rm -r of a mounted drive, the folder that holds mounted drives, or a file or folder at the top level of a drive now triggers the same dangerous-removal prompt that rm -rf /Applications gets.[1] CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT, new in this build, turns the check off.

A warning before you resume an idle conversation#

On Pro and Max plans, resuming an inactive conversation that would use a noticeable share of your 5-hour usage limit now shows a warning: resume anyway, or start a new conversation and let Claude look up the previous one if you refer to it.[1] /usage now says when a rate limit on usage data ends instead of "try again in a moment".[1]

A mod can refuse a call no person can approve#

A mod's tool.check answer takes decider: "person": only the permission dialog or a host's callback can approve the call, and where nobody can be asked it is refused with the mod's reason.[1] The same event gains e.isReadOnly, set when the tool call is read-only.[1] A transcript line now records when a plugin that runs first skips one of your mod's hooks, naming the event and the plugin, and the compaction summary in the transcript view (Ctrl+O) lists the tools called earlier.[1]

Headless, SDK, and worktree fixes#

  • A plugin can no longer keep a headless run going past --max-turns, Stop, or ended input by spawning subagents or re-running a finished one.[1]
  • claude --worktree no longer removes the worktree and its branch without asking at exit when HEAD was detached or on another branch, which could lose commits.[1]
  • Model switches, messages, and interrupts no longer wait behind a context-usage check in SDK and desktop sessions, and the first request after resuming a large compacted session is sent sooner.[1]
  • context_management: Extra inputs are not permitted errors behind an LLM gateway are resolved by resending the request without that field.[1]
  • CLAUDE_CODE_AUTO_COMPACT_WINDOW now accepts k and M suffixes and warns when a value is out of range, so =200k no longer silently sets a 100K window.[1]

New Environment Variables#

VariableWhat It Does
CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPTTurns off the dangerous-removal prompt this release adds for an rm that targets a mounted drive, the folder that holds mounted drives, or a top-level entry of a drive. New in v2.1.304.

Actions that need a person, when no one is at the keyboard#

Several of this release's changes draw the same line: an action that needs a human stays blocked when no human is there. decider: "person" refuses a tool call where nobody can be asked rather than letting a mod approve it, and a scheduled Cowork cloud session no longer waits five minutes per subagent for a WebFetch URL approval that nobody is present to give.[1]

For unattended work, those paths now fail closed instead of stalling. A plugin can no longer stretch a headless run past its --max-turns or Stop by spawning subagents, and claude --worktree stops deleting a branch at exit without asking.[1] An unattended run that would once have hung waiting for input it could never get now ends on its own terms, and one that risked discarding a detached-HEAD commit keeps it.

Sources#

  1. Claude Code Official Changelog, v2.1.304 release notes

This analysis is conducted for educational and research purposes under fair use principles. All trademarks and software referenced belong to their respective owners.


Previous Claude Code analysis: v2.1.303 (October 18, 2026)

All 75 Claude Code analyses: Claude Code Version Tracker · Official Claude Code changelog