Skill tool rather than adding a new tool entry.
On Pro, Max, and Team plans, Claude Code starts sessions in auto mode, where a classifier decides most of these prompts instead of you. The
Permission required column shows whether the tool prompts in Manual mode for paths inside the working directory. File-access tools marked No, including Read, Grep, and Glob, still prompt for paths outside the working directory and additional directories. Bash is marked Yes but runs a built-in set of read-only commands without prompting.Configure tools with permission rules and hooks
For the most part, Claude decides when to use these tools and you don’t need to name them yourself when interacting with Claude. You reference tool names directly when defining permissions and other configuration:- in
permissions.allowandpermissions.denyin settings, and the/permissionsinterface - in the
--allowedToolsand--disallowedToolsCLI flags - in the Agent SDK’s
allowedToolsanddisallowedToolsoptions - in a skill’s
allowed-toolsfrontmatter - in a hook’s
ifcondition
ToolName(specifier). The specifier depends on the tool, and several tools share a format:
Tools not listed here, such as
ExitPlanMode or ShareOnboardingGuide, accept only the bare tool name with no specifier.
An Edit(...) allow rule also grants read access to the same path, so you don’t need a matching Read(...) rule. A Read(...) deny rule also blocks the Edit and Write tools on the same path, including creating a new file there, because both tools change content Claude has to be able to read back. The Read deny check requires Claude Code v2.1.208 or later on edits, and v2.1.228 or later on writes.
Hook matcher fields use bare tool names, not the parenthesized rule format. See matcher patterns for the matching rules. For the field names each tool passes to tool_input in hooks, see the PreToolUse input reference.
Agent tool behavior
The Agent tool spawns a subagent in a separate context window. The subagent works through its task autonomously, then returns a single text result to the parent conversation. The parent doesn’t see the subagent’s intermediate tool calls or outputs, only that final result. With agent teams enabled, a call that carries aname can launch a teammate instead, which reports back through team messages rather than by returning a result.
To cap how many turns a subagent runs, set maxTurns in the subagent definition. When the subagent reaches the limit, Claude Code marks the returned result as partial output, and Claude can resume the subagent to continue.
The same Agent tool also launches forked subagents wherever fork mode is on. A fork inherits the full parent conversation instead of starting fresh, runs in the background apart from the cases that stay in the foreground, and still surfaces permission prompts in your terminal. The rest of this section describes non-fork subagents.
Which tools a non-fork subagent can use depends on the tools and disallowedTools fields in the subagent definition:
- Neither field set: the subagent inherits every tool available to subagents.
toolsonly: the subagent gets only the listed tools.disallowedToolsonly: the subagent gets every parent tool except the listed ones.- Both set:
disallowedToolstakes precedence. A tool listed in both is removed.
tools.
If every entry in a subagent’s tools list fails to match a usable tool, the Agent tool usually returns an error naming the entries instead of launching the subagent; see Agent would be spawned with zero tools for the message and how to fix each entry.
Launching the subagent doesn’t itself prompt for permission. Claude Code checks the subagent’s own tool calls against your permission rules as it runs.
Where you see a subagent’s permission prompts depends on whether it runs in the foreground or the background. Claude Code runs subagents in the background by default, apart from the cases that run in the foreground.
- Foreground subagents show the same permission prompts you would see in the main conversation, at the moment each tool call happens.
- Background subagents surface permission prompts in your main session as of v2.1.186. The prompt names which subagent is asking, and pressing Esc denies that one tool call without stopping the subagent. Before v2.1.186, background subagents auto-denied any tool call that would otherwise prompt and continued without that tool.
tools field, for example by leaving Bash off the list, or set deny rules in your settings.
AskUserQuestion tool behavior
Claude usesAskUserQuestion to ask you multiple-choice questions when it needs a decision or a clarification. Answer by picking an option, or type your own text through the Other row or the notes field.
When you answer by typing your own text, Claude Code relays the answer with neutral wording so Claude follows what you wrote, including a request to wait or explain first.
Question auto-continue timeout
Questions stay open until you answer them. If you want a question you leave unanswered to eventually close and let Claude continue without you, set theaskUserQuestionTimeout setting to 60s, 5m, or 10m, either in your user settings.json or from the Question auto-continue timeout row in /config.
After a question sits that long with no input, the dialog closes on its own: it submits any options you’d already selected and tells Claude you may be away from your keyboard, so Claude proceeds on its own judgment and can re-ask later. You see a countdown for the last 20 seconds. Press any key to restart the timer; on terminals that report focus, switching to the window restarts it too.
The timeout applies only to AskUserQuestion’s multiple-choice questions; permission prompts, including plan approval, never auto-resolve on idle.