Claude Code Now Asks Before More Destructive rm Commands
Claude Code 2.1.330 makes more rm commands aimed at the root, the home folder, a top-level folder or the working folder ask for approval. Where nobody can answer a prompt, those commands are refused outright.
Key Takeaways
- More
rmcommands now prompt when they hit the root, home, a top-level folder or the working folder. - Headless sessions refuse them because no one can approve.
- It is a trust-boundary hardening, protecting against destructive agent mistakes.
- Normal file deletes are not affected.
- The default flows through the existing permission system.
- Auto mode also stopped asking approval to
rmsymlinks in 2.1.329.
A Wider Approval Net for rm
Claude Code 2.1.330 widened the set of rm commands that require approval. Commands that target the filesystem root, the home directory, a top-level folder or the current working folder now prompt the user rather than running.
Unattended Sessions
In sessions where no one can answer a permission prompt, such as headless runs, these commands are refused instead of left waiting. This closes a gap where a destructive delete could run without a human decision.
Why It Matters
Deleting a home or project folder is among the most damaging mistakes an agent can make. The change tightens that boundary without affecting ordinary deletes of single files or build directories.