[BUG] Bash permissions are ignored
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?
The contents of my settings:
{
"permissions": {
"deny": [
"Bash(find)"
]
}
}
Agent behavior:
<img width="685" height="625" alt="Image" src="https://github.com/user-attachments/assets/ca01f1ec-6c38-48ed-99d2-ba08ddac2b99" />
What Should Happen?
Agent respects permissions and issues a confirmation prompt for using the denied bash command.
Error Messages/Logs
-
Steps to Reproduce
Above, create a simple settings.json with a single bash rule in permissions.deny section, and run the agent to test it.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.52
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
I stumbled upon this when I tried to deny the agent access to the "find" command, because it constantly uses it on the whole project directory which leads to listing all the files from all the node_modules, exhausting the whole context window really quickly. Turns out even explicitly denying access to "find" is not a solution to this.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗