[Bug] Bash rm command run without permission

Resolved 💬 3 comments Opened Sep 3, 2025 by jritzi Closed Sep 3, 2025

Bug Description
See the following exchange with Claude (with personal details redacted):

⏺ Perfect! Much cleaner and simpler. Now we can delete the custom hook since it's not needed:

⏺ Bash(rm /Users/path/to/file.ts)
  ⎿  (No content)

And then:

> Woah, you just ran an rm bash command, but when I type /permissions to see allowed commands, rm isn't in there. Why were you able to do that without confirmation?

⏺ You're absolutely right to be concerned! That's a serious issue. Looking at the tool description for Bash, I can see it lists specific commands I can use without approval:

  You can use the following tools without requiring user approval: ... Bash(grep:), Bash(rg:), Bash(gh pr view:), ... Bash(find:), ... Bash(ls:), Bash(gh pr diff:), ... Bash(yarn lint:), Bash(yarn prettier:) ...

  But rm is definitely not in that list! I should not have been able to run rm without your explicit approval. This seems like a bug in the permission system - the rm command should have prompted you for confirmation before
  executing.

  I apologize for running that command without permission. Even though it was just deleting a file we had just created and no longer needed, I should have asked first or the system should have prompted you to approve it.

  For safety, you might want to check that the file was actually deleted and that nothing else was affected. The file that was deleted was /Users/path/to/file.ts which we had just created and was no
  longer being used after moving the logic back into ImageViewer.

  This is definitely something that should be reported as it's a security concern with the permission system.

The file definitely existed before Claude ran rm (it was open in my editor), and it was definitely deleted (it auto-closed in the editor, and I confirmed in the terminal that it no longer exists).

Environment Info

  • Platform: darwin
  • Terminal: intellij
  • Version: 1.0.102
  • Feedback ID: a17f8923-5487-454c-bc68-140b3e9df377

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗