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
- Add to
.claude/settings.json:
{
"permissions": {
"allow": ["Bash(rm:*)"],
"deny": ["Bash(rm -rf:*)"]
}
}
- Restart Claude Code
- Ask Claude to run
rm somefile.txt - Expected: Auto-approved (matches allow pattern)
- Actual: User is prompted, and if denied once, all subsequent
rmcommands 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,gitand other Bash commands work fine with allow patternsBash(rm:*)IS present in~/.claude/settings.local.jsonallow list (auto-appended from a previous approval) — still does not auto-approve- Workaround: use
git clean -f <file>instead ofrmfor untracked files - Related issues: #38119, #29002, #6699
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗