What probably matters to youSection of the release
Unclear The check also depends on a further condition that is not resolved, so whether it is active by default is not established.
What
Before Claude runs a shell command, Claude Code checks whether it needs your permission. That check now looks inside inline shell scripts, meaning code passed as text to bash -c, sh -c or zsh -c, and judges any rm in them.
An rm whose target comes from a variable or from another command's output, so it is only known when the script runs, now triggers a prompt: Dangerous rm operation in a shell -c script.
A script that cannot be checked, or a permission-rule deny found inside the script, also leads to a prompt instead of automatic approval.
The prompt counts as a dangerous-removal safety check (dangerousRemovalsafetyCheck), so your permission rules cannot allow it automatically.
Nested shell code is judged recursively, with a shared depth and budget limit. The result of this new pass is inlineShellScript.
A new heredoc_redirect path re-reads commands with plain unquoted heredocs (blocks of text fed into a command) so they can be auto-allowed when sandboxing is on and auto-allow for sandboxed commands is enabled. It is behind tengu_amber_larch. The flag server returned on for this site's account and for the anonymous baseline, but no reading has been taken under this release yet.
Why
Before this change, an rm wrapped inside a bash -c script could get past the dangerous-removal check that a plain rm would hit. Expect new prompts for scripted commands such as rm -rf $VAR, and know that allow rules will not silence them. Set the environment variable if you need the old behaviour.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT, on All settings.* [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`, `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`, `CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT`, and `CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT`](/docs/en/env-vars#variables), which Claude Code r…settings-referencesee the edit
Added sinceA small documentation edit on Choose a permission mode touched a line naming CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT after this was published.To turn off the check on a critical path typed directly in a `-c` script, such as `~`, set [`CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT=1`](/docs/en/env-vars#variables) in the environment that launches Claude Code.permission-modessee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtThe check also depends on a further condition that is not resolved, so whether it is active by default is not established.
Anthropic's documentation agreesA small documentation edit on Choose a permission mode touched a line naming CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT after this was…
Anthropic's release notes agreeFixed 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…
The name it cites is new in this buildNew in this build: CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT