[BUG] Claude deleting files without requesting permission
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
While using Claude Code, it ran the command Bash(rm -rf) on three occasions & executed the deletion, without asking for permission first.
I had not previously allowed any deletions in this project, and neither the global claude/settings.json nor .claude/settings.local.json had rm in the list of allowed commands. Also, I was not using --dangerously-skip-permissions.
What Should Happen?
It should request permission as usual, asking you to allow on this occasion, for all similar commands in future, or reject.
Error Messages/Logs
Steps to Reproduce
I'm not sure how exactly to reproduce this, but I have the chat history .jsonl files available of where this happened before, if useful.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.69 but it's possible this issue occurred on a slightly earlier version like 2.0.68
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗