Follow Discord
Sweep 25 Sep 2026 · 19:33Z Build v2.1.283 504 read Stable v2.1.274 Latest v2.1.283 Next v2.1.283 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.281 ·

rm guard explains root-level removal when a variable is empty

The rm safety warning now explains that an empty variable can turn a path like $VAR/child into /child, and how to guard against it

You'll notice Improvements
JSON All of v2.1.281
You'll noticeTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
PermissionsArea: what it touches
ImprovementsKind: in v2.1.281,
ImprovementsSection of the release
What

Claude Code warns about risky shell commands before running them. For commands like rm "$VAR/child", the warning now covers the case where the variable is empty, so the command would delete /child at the top of the filesystem. It suggests writing the path out in full, or using the ${VAR:?} form, which makes the shell stop with an error if the variable is empty. When the command is run again through eval or extra quoting, the warning adds that the quotes of a pasted guard would not protect it.

Why

An empty variable can quietly turn a delete aimed at a subfolder into a delete at the root of the system. The warning now names that risk and a fix that holds up.

See this entry in the whole of v2.1.281 →

Feedback