In short.
This guide explains tool permissions for developers building Claude Agent SDK agents, but automatically approved calls skip the application's runtime approval handler. It documents six permission modes, rule precedence, file-path patterns and Python and TypeScript configuration. Its central practical lesson is that allowedTools grants advance approvals rather than defining an exclusive tool list, while permission rules do not provide operating-system isolation. The examples and documented behavior have not been independently run or tested.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete selected Configure permissions page at [https://code.claude.com/docs/en/agent-sdk/permissions.md], including evaluation order, rule syntax, settings sources, six modes, streaming changes, callback warnings, subagent inheritance, version thresholds and safety limitations. Linked documentation, the documentation index and the external flowchart asset are excluded; only the flowchart description supplied in the page is available. No code or agent behavior was executed, and runtime effectiveness, operating costs and licensing remain unverified where the page supplies no evidence.
The overview
Identity
Configure permissions is a Claude Code documentation page about permission controls in the Claude Agent SDK. The resource is the guide itself, covering how an application controls an agent's tool requests through modes, rules, hooks and the canUseTool callback. Original source: [https://code.claude.com/docs/en/agent-sdk/permissions.md].
Assessment
The guide is useful for understanding why a tool call executes, is denied or reaches an application for approval. Its strongest material explains exceptions that could otherwise undermine an application's assumptions: automatic approvals skip canUseTool, deny rules still apply in bypassPermissions, and dontAsk does not prevent operations that need no approval.
It provides substantial configuration guidance, but installation, authentication, complete workspace-trust behavior and auto-mode availability are absent or delegated to linked pages. It does not establish the security effectiveness of any deployed configuration.
Users
The main audience is Python and TypeScript developers building agents that read files, edit code, run shell commands or call connected tools. It is particularly relevant to unattended agents, applications with approval interfaces and applications that delegate work to subagents.
Beginners will benefit from understanding those basic tool operations first. Experienced developers will find details about callback precedence, MCP tool rules, settings sources, path matching and version-dependent behavior.
Capabilities
The guide covers six modes. default follows normal permission rules; dontAsk denies requests that would prompt; acceptEdits automatically approves specified file operations within working directories; plan supports exploration with review of file-tool edits; auto uses a model classifier for actions it reviews; bypassPermissions broadly approves calls while retaining documented exceptions.
It also explains tool-wide and scoped rules, MCP tool-name patterns, project settings, changing modes during streaming and subagent inheritance. A main session's plan mode still applies to its subagents, even when a subagent definition requests acceptEdits.
Using it
Requirements
The examples use Python's claude_agent_sdk package or TypeScript's @anthropic-ai/claude-agent-sdk package. The page does not specify installation steps, authentication requirements, baseline language-runtime versions or a general minimum SDK version. Supported models and providers for auto mode are described elsewhere and are unknown within this page's scope.
Several behaviors have explicit Claude Code version thresholds: MCP interaction annotations require v2.1.199 or later; TypeScript permissionPrompts: 'none' requires v2.1.259 or later; the subagent-definition bypassPermissions exception requires v2.1.267 or later; fallback from auto after switching to an unsupported model requires v2.1.299 or later; and the described default starting-mode behavior applies from v2.1.302.
Mechanism
Tool requests pass through hooks, deny rules, ask rules, the permission mode, allow rules and finally canUseTool. A hook's approval cannot override a matching deny or ask rule. A matching deny resolves the request before the callback, while ordinary ask rules route it to the callback even in bypassPermissions. dontAsk converts prompting into denial.
allowedTools entries grant advance approval; unlisted tools remain available. A bare tool name in disallowedTools removes its definition, while a scoped deny blocks matching calls. Allow-rule tool-name globs require a literal MCP server prefix, such as mcp__github__get_*. Unanchored allow entries such as * or mcp__* are ignored, although deny rules support broader globs.
Calls that need no approval can execute without an allow entry. Conversely, network-path reads and certain interaction or removal requests are not approved by allow rules. Custom tools marked always_ask have additional mode-dependent exceptions, so the name alone does not establish that every call reaches canUseTool.
Setup
Set permission_mode in Python's ClaudeAgentOptions or permissionMode in TypeScript query options. Streaming sessions can change mode through set_permission_mode() or setPermissionMode(). Add allow and deny rules through the corresponding SDK options, and provide canUseTool for approval decisions that remain unresolved.
Project rules can also come from .claude/settings.json. Default query options load the project settings source; when setting_sources or settingSources is supplied explicitly, it must include project for those rules to apply. Additional workspace-trust conditions are referenced but not explained on this page.
File-write path rules use Edit(path), including for Write and NotebookEdit; scoped Write(path) and NotebookEdit(path) rules match no calls. In SDK rule options, // starts an absolute path pattern, while a single / starts a pattern relative to the session's working directory.
Example
For an unattended file-inspection agent, the page gives a TypeScript configuration with allowedTools set to Read, Glob and Grep, and permissionMode set to dontAsk. Those tools receive advance approval subject to exceptions such as network-path reads, while calls that would otherwise prompt are denied without invoking canUseTool.
This does not restrict execution to those three tools. Operations that need no approval, including some read-only shell commands and Agent calls, can still run. The page explains that adding a built-in tool's bare name to disallowedTools hides that tool entirely. This example was not executed.
Assessment & evidence
Limitations
Permission rules are not an operating-system sandbox. The page states that an Edit path deny can cover built-in file writers and recognized Bash writes, while a script that opens files itself can still write there. Command matching also has limits: the documented Bash(rm *) deny does not cover /bin/rm. Recognition of critical-path removals can miss commands.
acceptEdits includes operations such as removing, moving and copying files within its working-directory scope, with exceptions for protected paths and recognized critical removals. plan is also not an unconditional prohibition on edits: file-tool edits can reach the application's approval callback.
bypassPermissions does not make allowedTools restrictive. It also refuses startup as root or under sudo on Linux and macOS outside a recognized sandbox. Auto mode can fall back to default after a switch to an unsupported model; switching back to a supported model does not automatically restore auto mode.
Reasoning
The key design implication is that canUseTool is a fallback approval handler rather than a universal inspection point. Mandatory checks placed only there will miss calls approved earlier. The page directs checks on automatically approved calls to PreToolUse hooks, whose denials can still block calls in bypassPermissions.
TypeScript can emit CLAUDE_SDK_CAN_USE_TOOL_SHADOWED when bypassPermissions or bare-name allowedTools entries make the callback miss approvals. The warning changes no permissions. Scoped entries, acceptEdits and allow rules loaded from settings do not trigger that warning, so its absence does not establish complete callback coverage.
Alternatives
The page supports choosing among control strategies within the same SDK. default with canUseTool suits applications that make runtime approval decisions. dontAsk suits unattended work where prompting should become denial. acceptEdits reduces approval interruptions for specified file operations, while PreToolUse hooks support checks on calls that would skip the callback.
Operating-system enforcement is a separate option when scripts must be prevented from accessing particular files. The page links to sandbox documentation but does not explain that setup here. It provides no comparison with other agent SDKs or permission systems, so their relative suitability is unknown.
Evidence
The evidence is the complete captured page at [https://code.claude.com/docs/en/agent-sdk/permissions.md], retained as selected-page.txt. Its source revision is sha256:becebe536f1b288485a5cdab00cb0271f8db80518d3c3a5c76110387c4fd6c65.
The findings describe documented behavior rather than observed execution. No SDK examples, agent sessions, permission callbacks or isolation controls were run or tested. Linked pages and the underlying flowchart image were not independently assessed.
Access & freshness
Costs
The page supplies no prices, usage allowances or operating-cost estimates for the SDK, models, classifier or hosting. Total cost is unknown. Whether classifier review adds billable usage, and how much, is not established by this evidence; its latency overhead is also unquantified.
Rights
The supplied page contains no explicit licence or redistribution grant for its documentation, examples or illustration. Their reuse terms, along with the SDK's licensing and commercial-use terms, are unknown from this page. A documentation example does not establish permission to redistribute the documentation.
Freshness
The page was captured at 2026-11-14T19:51:49.024Z. No publication or last-updated date is supplied. Its version-specific statements extend through Claude Code v2.1.302, but that does not establish the latest available release. Changes after the capture and compatibility with any particular installed SDK version are unknown.
Actions
Before adopting a configuration, decide which calls need application approval, which may run automatically and which tools should be hidden. Select the mode explicitly, inspect loaded settings, and place checks that must cover automatic approvals in PreToolUse hooks.
Validate the intended behavior against the installed Claude Code and SDK versions, including unlisted tools, scoped rule matching, filesystem writes, subagent inheritance and any model changes. If filesystem isolation is required, assess operating-system sandbox enforcement separately. Installation details, supported auto-mode models, prices and reuse terms require additional sources.
