[BUG] Asked permission to run `cd /x/y/z && rm -rf *` in "bypass permissions" mode.
Open 💬 3 comments Opened Jul 8, 2026 by TK009
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?
Asked permission to run cd /x/y/z && rm -rf * in "bypass permissions" mode.
What Should Happen?
It seems to have mistaken that rm -rf is run for some more important directory, but the cd is in front, but that is a bug that shouldn't even surface in bypass permissions mode, It shouldn't ask for permission even for crazy commands. The "--dangerously-skip-permissions" mode is used for sandboxes or computers where it doesn't matter or is intended. This gets the agent stuck in a mode that should never ask for permission.
Error Messages/Logs
Steps to Reproduce
- claude --dangerously-skip-permissions
- Do work that involves removing stuff in directories
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.201
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗