Answer: You configure allow and deny rules by setting `allowedTools` and `disallowedTools` (TypeScript) or `allowed_tools` and `disallowed_tools` (Python), which Claude Code adds to the allow and deny rule lists in the permission evaluation flow. You can also configure allow, deny, and ask rules declaratively in `.claude/settings.json`. Status: Confirmed Entry: tool/claude-code/permissions-and-security/allow-deny-rules Revision: 1 Digest: sha256:5a6a2e76487a850b (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:52Z Last changed: 2026-11-13T03:02:52Z Last verified: 2026-11-20T12:16:59Z Next check: 2026-11-21T12:16:59Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of TypeScript options | allowedTools | [1] | 2026-11-20 Python options | allowed_tools | [1] | 2026-11-20 Allow rule example | allowed_tools=["Read", "Grep"] | [1] | 2026-11-20 Deny rule example | disallowed_tools=["Bash"] | [1] | 2026-11-20 Declarative config file | .claude/settings.json | [1] | 2026-11-20 Sources: [1] Anthropic. "Configure permissions". https://code.claude.com/docs/en/agent-sdk/permissions.md Role: primary. Accessed: 2026-11-20T12:16:59Z Quote: "When you set `allowedTools` and `disallowedTools` (TypeScript) or `allowed_tools` and `disallowed_tools` (Python)" (Supports: TypeScript options, Python options) Quote: "| `allowed_tools=["Read", "Grep"]` | `Read` and `Grep` are auto-approved" (Supports: Allow rule example) Quote: "| `disallowed_tools=["Bash"]` | The `Bash` tool definition is removed from the request. |" (Supports: Deny rule example) Quote: "You can also configure allow, deny, and ask rules declaratively in `.claude/settings.json`." (Supports: Declarative config file) Published: 2026-11-20T02:56:53Z Snapshot SHA-256: 71a1150baab20a9356435f97bb11ff724e3216a955dd586527a03ea91b3f38ff (captured 2026-11-20T12:16:58Z) 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:16:59Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:59Z Last attempt: 2026-11-20T12:16:59Z Notes and limitations: Extracted automatically from a single official source (section "Allow and deny rules"). Related: https://latestn.com/tool/claude-code/permissions-and-security/allow-mcp-tools How do I allow or auto-approve MCP tools in Claude Code Agent SDK using allowedTools? https://latestn.com/tool/claude-code/permissions-and-security/approve-apps-per-session How do I approve which apps Claude can control during a computer use session? https://latestn.com/tool/claude-code/permissions-and-security/authenticate-remote-mcp-oauth How do I authenticate Claude Code with a remote MCP server using OAuth? https://latestn.com/tool/claude-code/models/set-model-agent-sdk-session How do I set the model for a Claude Code Agent SDK session? https://latestn.com/tool/claude-code/models/todo-tools-model-availability Which Claude models have the task-tracking tools (TodoWrite, TaskCreate, TaskGet, TaskUpdate, TaskList) available by default in Claude Code? https://latestn.com/tool/claude-code/permissions-and-security/additional-working-directories How do I let Claude Code read and edit files outside the working directory? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:02:52Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/permissions-and-security/allow-deny-rules/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/permissions-and-security/allow-deny-rules POST: https://latestn.com/dispute/tool/claude-code/permissions-and-security/allow-deny-rules with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/permissions-and-security/allow-deny-rules?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure allow and deny rules for tools in Claude Code? Revision 1, last verified 2026-11-20T12:16:59Z. https://latestn.com/tool/claude-code/permissions-and-security/allow-deny-rules (accessed 2026-11-21T09:58:08Z). @misc{LatestN_tool_claude_code_permissions_and_security_allow_deny_rules_r1, title = {How do I configure allow and deny rules for tools in Claude Code?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/permissions-and-security/allow-deny-rules}}, note = {Revision 1; digest sha256:5a6a2e76487a850b; last verified 2026-11-20T12:16:59Z; accessed 2026-11-21T09:58:08Z} } 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/permissions-and-security/allow-deny-rules