Bash(rm:*) in allow list does not auto-approve rm commands

Resolved 💬 3 comments Opened Apr 6, 2026 by geremyturcotte Closed Apr 10, 2026

Description

Bash(rm:*) in .claude/settings.json allow list does not auto-approve rm commands. The user is still prompted interactively, and the command shows as "denied" even with explicit allow.

Steps to reproduce

  1. Add to .claude/settings.json:
{
  "permissions": {
    "allow": ["Bash(rm:*)"],
    "deny": ["Bash(rm -rf:*)"]
  }
}
  1. Restart Claude Code
  2. Ask Claude to run rm somefile.txt
  3. Expected: Auto-approved (matches allow pattern)
  4. Actual: User is prompted, and if denied once, all subsequent rm commands are denied for the session

Environment

  • Claude Code version: 2.1.92
  • OS: macOS (Darwin 25.3.0, Apple Silicon)
  • Shell: zsh

Notes

  • echo, ls, git and other Bash commands work fine with allow patterns
  • Bash(rm:*) IS present in ~/.claude/settings.local.json allow list (auto-appended from a previous approval) — still does not auto-approve
  • Workaround: use git clean -f <file> instead of rm for untracked files
  • Related issues: #38119, #29002, #6699

View original on GitHub ↗

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