allowedTools vs disallowedTools
People think allowedTools is a full list, so a tool left off it is blocked. It is not. allowedTools only lets the listed tools run with no prompt, and other tools still go to the permission mode. disallowedTools is the one that blocks, and its block holds in every mode, even bypass.
allowedTools Option
The option that lists tools the agent may use with no prompt.
allowedTools is an Agent SDK option that lists tools Claude may use with no approval step. In Python it is allowed_tools. A rule can name a whole tool, such as Read, or part of one, such as Bash(npm *). It does not limit Claude to those tools. A call to a tool not on the list goes to the permission mode instead.
disallowedTools Option
The option that blocks a tool, or some uses of it, in all modes.
disallowedTools is an Agent SDK option that blocks tools. In Python it is disallowed_tools. A bare name, such as Bash, takes the tool away from Claude. A scoped rule, such as Bash(rm *), keeps the tool but blocks the calls that match. A block holds in every permission mode, even bypassPermissions, and even when a hook said yes.
In one line
- allowedTools Option
- The option that lists tools the agent may use with no prompt.
- disallowedTools Option
- The option that blocks a tool, or some uses of it, in all modes.