Claude Code 2.1.288 fixes an rm guard a bash -c wrapper walked past, but stable is on 2.1.285
Claude Code 2.1.288 fixes a safety check that is meant to stop an agent deleting your working directory, and that a short shell wrapper walked straight past. The fix reached npm on October 2 at 18:30 UTC, and the stable tag still points at 2.1.285, so anyone who installs or pins stable does not have it.

Claude Code checking a shell command before it runs.
Anthropic's changelog says the release fixed "a dangerous rm (such as one on / or the home directory) inside a bash -c or sh -c script running without a prompt in bypassPermissions mode or under a shell allow rule".
The check covers what Anthropic calls critical paths: the filesystem root, any direct child of it such as /usr or /etc, your home directory, and your working directory and its parents. Claude Code stops to ask before an rm or rmdir aimed at one of those, even in modes that skip every other prompt. "This circuit breaker guards against model error," Anthropic's permission-modes page says.
The guard read rm, not the thing running rm
The behaviour was filed on Anthropic's public tracker on September 23, against Claude Code 2.1.280 on Windows 10 in Git Bash. In bypassPermissions mode, the report says, a plain rm -rf on the session's own directory was stopped with the message "Dangerous rm operation detected", and so was the same command wrapped in a subshell, a brace group or a command substitution.
Handing it to a shell changed that. Both sh -c "rm -rf" and bash -c 'rm -rf', pointed at the same directory, ran and deleted the files. The explanation is a parsing one: the program the check sees is sh or bash, and "the rm is inside a string argument, so the check never sees it".
The tests covered the working directory only. Home and system directories "go through the same function", the report says, so the wrapper is expected to behave the same way there, and it states that the command was not run. Anthropic tagged the report under area:security and closed it on October 2 at 20:19 UTC, nine days after it was opened and under two hours after the fix reached npm.
Both of the affected states are ones you switch on
Neither condition in Anthropic's line is a default. bypassPermissions has to be started deliberately, with --permission-mode bypassPermissions or the equivalent --dangerously-skip-permissions flag, and Claude Code shows a warning dialog the first time an interactive session uses it. Anthropic's own advice is blunt: "Only use this mode in isolated environments like containers, VMs, or dev containers without internet access".
The second condition is a shell allow rule you wrote yourself. Anthropic's documentation says Claude Code "never lets a permissions.allow rule or a PreToolUse hook that returns 'allow' approve an rm or rmdir command that targets a critical path, even in modes that skip other prompts", which is the guarantee the wrapper got around.
The stable channel is still on 2.1.285
Read at 21:05 UTC on October 2, npm's dist-tags for @anthropic-ai/claude-code give latest as 2.1.288, next as 2.1.288 and stable as 2.1.285, which was published on September 29. Nothing newer than 2.1.288 had gone out at that point, so the two channels sit three releases apart until the stable tag moves.
The release carries 89 changes, two more of them repairs to the permission checks: a BASHPID assignment whose value the shell would evaluate as arithmetic, which used to be allowed silently, and sandboxed heredocs with an unquoted delimiter, which asked for approval on every run. It follows 2.1.287, which added user-made mods that Anthropic says are not sandboxed and can read your API key, and a run of releases in late September that tightened the same delete checks.
The report points to three earlier changes in the same direction, in 2.1.208, 2.1.261 and 2.1.273, so 2.1.288 is the fourth pass at this one check. Each has closed a wrapper the previous one missed.