Skip to content
BENIBIX Learn

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.

AI🧩 Claude Agent SDK

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.

Example
Leo's agent reads code and runs tests. He allows Read, Glob and Bash(npm test), so it never stops to ask for those.
Why it matters
An agent that stops for each read is slow. One that asks for nothing is a risk.
Full entry
AI🧩 Claude Agent SDK

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.

Example
Mia's agent must never reach the web. She puts WebFetch and WebSearch in disallowedTools.
Why it matters
Some things must never happen, whatever mode the agent is in.
Full entry

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.