Evaluation order: Deny → Allow → Ask. Deny patterns are checked first. If no deny matches, allow patterns are checked. Anything else requires user confirmation by default.
Configuration
Permissions are set at the top level of the config file and apply globally to all agents:Fields
Tool name patterns that are auto-approved without user confirmation. Glob patterns and argument matching are supported.
Tool name patterns that are always rejected. Deny takes priority over allow — denied tools cannot be overridden even with
--yolo.Tool name patterns that always require user confirmation, even for tools that would normally be auto-approved (e.g., read-only tools).
Pattern syntax
Permissions use glob-style patterns with optional argument matching.Simple patterns
| Pattern | Matches |
|---|---|
shell | Exact match for the shell tool |
read_* | Any tool starting with read_ |
mcp:github:* | Any GitHub MCP tool |
* | All tools |
Argument matching
Match tools based on the value of a specific argument usingtool:arg=pattern syntax:
Multiple argument conditions
Chain conditions with colons. All conditions must match:Glob pattern rules
*matches any sequence of characters (including spaces)?matches any single character[abc]matches any character in the set[a-z]matches any character in a range- Matching is case-insensitive
Decision types
| Decision | Behavior |
|---|---|
| Allow | Tool executes immediately without user confirmation |
| Ask | User must confirm before the tool executes (default) |
| Deny | Tool is blocked and returns an error to the agent |
Examples
Read-only agent
Allow all read operations, block all writes and shell access:Safe shell agent
Allow specific safe commands, block dangerous ones:MCP tool permissions
Control MCP tools by their qualified names:Interaction with hooks
Permissions and hooks work together. The full evaluation order for a tool call is:- Check deny patterns — if matched, tool is blocked immediately
- Check allow patterns — if matched, tool is auto-approved
- Run pre_tool_use hooks — hooks can allow, deny, or ask
- If no decision reached, ask user for confirmation