Follow Discord
Sweep 23 Nov 2026 · 19:13Z Build v2.1.331 548 read Stable v2.1.323 Latest v2.1.330 Next v2.1.331 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.331 ·

Risky rm commands on a variable path can be rewritten to stop if the variable is empty

When switched on, Claude Code rewrites rm commands on a variable path so they abort instead of running if that variable turns out to be empty

Nothing to try yet In Development
JSON All of v2.1.331
Nothing to try yetTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
Bash SafetyArea: what it touches
In DevelopmentKind: in v2.1.331,
In DevelopmentSection of the release
What

When Claude wants to run an rm command (the shell command that deletes files) on a path built from a variable, such as rm -rf $VAR/, Claude Code can now rewrite the command to use ${VAR:?} instead. With that form, the shell stops with an error if the variable is empty, rather than running the delete on whatever path is left.

The permission prompt gives the reason as "Dangerous rm operation on possibly-empty variable path".

This is controlled by a remote setting. It is off unless it is switched on remotely with a specific value.

Why

An empty variable can turn rm -rf $VAR/ into rm -rf /, which deletes far more than intended. Where this is active, the command that actually runs is the guarded version, so an empty variable makes it fail safely.

Read from
Feature flag
tengu_purring_naur Not enough to say

Nothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.

This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.331: not a boolean we can read

These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.

Read once, for one account on one subscription tier, against v2.1.331. It isn't a statement about your account. What a flag value here can and cannot tell you

See this entry in the whole of v2.1.331 →

Feedback