Answer: To restrict which tools a subagent can use, use the `tools` field as an allowlist or the `disallowedTools` field as a denylist; if both are set, `disallowedTools` is applied first, then `tools` is resolved against the remaining pool, and a tool listed in both is removed. Status: Confirmed Entry: tool/claude-code/agents-and-automation/restrict-subagent-tools Revision: 5 Digest: sha256:8e67e268a2861082 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:05:56Z Last changed: 2026-11-20T12:25:44Z (conflict rule: — → A tool listed in both is removed.) Last verified: 2026-11-20T12:25:44Z Next check: 2026-11-21T12:25:44Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of allowlist field | tools | [1] | 2026-11-20 denylist field | disallowedTools | [1] | 2026-11-20 precedence | disallowedTools | [1] | 2026-11-20 conflict rule | A tool listed in both is removed. | [1] | 2026-11-20 allowlist example | tools: Read, Grep, Glob, Bash | [1] | 2026-11-20 denylist example | disallowedTools: Write, Edit | [1] | 2026-11-20 Sources: [1] Anthropic. "Create custom subagents". https://code.claude.com/docs/en/sub-agents.md Role: primary. Accessed: 2026-11-20T12:25:44Z Quote: "use the `tools` field as an allowlist or the `disallowedTools` field as a denylist" (Supports: allowlist field, denylist field) Quote: "If both are set, `disallowedTools` is applied first, then `tools` is resolved against the remaining pool." (Supports: precedence) Quote: "A tool listed in both is removed." (Supports: conflict rule) Quote: "tools: Read, Grep, Glob, Bash" (Supports: allowlist example) Quote: "disallowedTools: Write, Edit" (Supports: denylist example) Published: 2026-11-20T02:51:46Z Snapshot SHA-256: 554874b443a109e88a2c58273dd3ccdd8e74cf6ed0536238fb704dbe0a254b43 (captured 2026-11-20T12:25:44Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. Cross-check: not-available at 2026-11-20T12:25:44Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:25:44Z Last attempt: 2026-11-20T12:25:44Z Notes and limitations: Extracted automatically from a single official source (section "Restrict which tools a subagent can use"). Related: https://latestn.com/tool/claude-code/agents-and-automation/resume-across-hosts How do I resume a Claude Code SDK session across different hosts? https://latestn.com/tool/claude-code/agents-and-automation/resume-session-by-id How do I resume a Claude Code SDK session by its session ID? https://latestn.com/tool/claude-code/agents-and-automation/resume-session-from-store How do I resume a Claude Code Agent SDK session from an external session store? https://latestn.com/tool/claude-code/agents-and-automation/query-function-parameters-returns What does the Claude Code Agent SDK query() function accept and return? https://latestn.com/tool/claude-code/agents-and-automation/query-vs-claudesdkclient When should I use query() versus ClaudeSDKClient in the Claude Code Python Agent SDK? https://latestn.com/tool/claude-code/agents-and-automation/reload-plugins-running-session How do I reload or add plugins to a running Claude Code SDK session? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-20T12:25:44Z | changed | conflict rule: — → A tool listed in both is removed. | [1] 2026-11-20T12:25:44Z | changed | precedence: — → disallowedTools | [1] 2026-11-20T12:25:44Z | changed | withhold every MCP tool: mcp__* → — | [1] 2026-11-20T12:25:44Z | changed | denylist example: Write, Edit → disallowedTools: Write, Edit | [1] 2026-11-20T12:25:44Z | changed | allowlist example: Read, Grep, Glob, Bash → tools: Read, Grep, Glob, Bash | [1] 2026-11-20T12:25:44Z | changed | tool listed in both: removed → — | [1] 2026-11-20T12:25:44Z | changed | precedence when both set: disallowedTools → — | [1] 2026-11-19T12:20:53Z | changed | withhold every MCP tool: — → mcp__* | [1] 2026-11-19T12:20:53Z | changed | tool listed in both: — → removed | [1] 2026-11-19T12:20:53Z | changed | precedence when both set: — → disallowedTools | [1] 2026-11-19T12:20:53Z | changed | denylist example: disallowedTools: Write, Edit → Write, Edit | [1] 2026-11-19T12:20:53Z | changed | allowlist example: tools: Read, Grep, Glob, Bash → Read, Grep, Glob, Bash | [1] 2026-11-19T12:20:53Z | changed | conflict rule: A tool listed in both is removed. → — | [1] 2026-11-19T12:20:53Z | changed | precedence: disallowedTools → — | [1] 2026-11-18T12:20:40Z | changed | precedence: — → disallowedTools | [1] 2026-11-18T12:20:40Z | changed | withhold all MCP tools: mcp__* → — | [1] 2026-11-18T12:20:40Z | changed | precedence order: disallowedTools → — | [1] 2026-11-17T12:31:47Z | changed | withhold all MCP tools: — → mcp__* | [1] 2026-11-17T12:31:47Z | changed | precedence order: — → disallowedTools | [1] 2026-11-17T12:31:47Z | changed | precedence: disallowedTools → — | [1] 2026-11-13T03:05:56Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/restrict-subagent-tools/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/restrict-subagent-tools POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/restrict-subagent-tools with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/restrict-subagent-tools?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I restrict which tools a Claude Code subagent can use? Revision 5, last verified 2026-11-20T12:25:44Z. https://latestn.com/tool/claude-code/agents-and-automation/restrict-subagent-tools (accessed 2026-11-21T09:59:02Z). @misc{LatestN_tool_claude_code_agents_and_automation_restrict_subagent_tools_r5, title = {How do I restrict which tools a Claude Code subagent can use?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/restrict-subagent-tools}}, note = {Revision 5; digest sha256:8e67e268a2861082; last verified 2026-11-20T12:25:44Z; accessed 2026-11-21T09:59:02Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/restrict-subagent-tools