[BUG] Deny List not Honored for Edit/Write
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?
Edit and Write tool calls bypass deny list rules completely. The operation succeeds silently — no block, no permission prompt. Only Bash deny rules are enforced.
What Should Happen?
Any tool call matching a deny rule should be hard-blocked, identical to how Bash deny rules behave. A matching Edit or Write call should never execute, with no option to approve.
Error Messages/Logs
Steps to Reproduce
Add the following to ~/.claude/settings.json:
"permissions": {
"deny": [
"Edit(/path/to/protected-file.md)",
"Write(/path/to/protected-file.md)"
]
}
In a Claude Code session, ask Claude to edit /path/to/protected-file.md
Observe: the edit succeeds with no block and no permission prompt
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.141
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
macOS Darwin 25.3.0
Claude Code 2.1.141
VSCode extension
Model: claude-sonnet-4-6
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗