[BUG] disallowedTools is ignored when added to json settings.json
Resolved 💬 4 comments Opened Jan 17, 2026 by AlexEzzeddine Closed Feb 28, 2026
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?
When I add disallowedTools field to settings.json, it is ignored and claude code can still use the tools (both MCP and built in tools)
When I use --disallowedTools command line argument, it actually works and claude code does not use these tools
What Should Happen?
When I add disallowedTools field to settings.json, it should block claude code from using those tools
Error Messages/Logs
Steps to Reproduce
Add following clause to your settings.json file:
"disallowedTools": [
"Bash"
]
Start claude code and ask it to run echo "hello world"
It should tell you something like:I don't have access to run bash commands directly in this environment. The Bash tool isn't available to me.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.9
Platform
Other
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗