Actions
Every permission rule resolves to one of three actions:| Action | Behavior |
|---|---|
allow | Tool executes immediately without prompting |
deny | Tool call is rejected automatically |
ask | User is prompted to approve or reject the call |
Rule structure
A rule consists of three fields:- permission — the permission name (e.g.,
read,edit,bash) - pattern — a glob pattern matched against the tool’s target (e.g., file path, command)
- action —
allow,deny, orask
ask.
Permission names
| Permission | Applies to | Description |
|---|---|---|
read | read tool | File read operations |
edit | edit, write, apply_patch, multiedit | File write and edit operations |
search | search tool | File search (content grep and file glob) |
search_remote | search_remote, websearch, webfetch, codesearch | Web search and URL fetch |
bash | bash tool | Shell command execution |
task | task tool | Subtask creation / agent delegation |
external_directory | external-directory tool | Access to directories outside the project |
todowrite | todowrite tool | Writing TODO items |
todoread | (internal) | Reading TODO items |
question | question tool | Asking the user interactive questions |
lsp | lsp tool | Language Server Protocol operations |
doom_loop | (internal) | Doom loop detection (repeated failing tool calls) |
skill | skill tool | Skill execution |
EDIT_TOOLS mapping
The toolsedit, write, apply_patch, and multiedit all map to a single edit permission.
Configuring edit: deny denies all four tools.
Config syntax
Permission rules can be specified in two forms:Flat action
A single action applied to all patterns:Glob object
An object mapping glob patterns to actions:~/ and $HOME/ expansion.
Default permissions
The default ruleset applied to native agents (builder, planner):tools_allowed
are explicitly allowed, and the agent’s permission field is layered on top.
Agent-level overrides
Each agent can define its own permission rules that override the defaults:Ask/reply flow
When a tool call resolves toask:
- A permission request is created and the tool call blocks.
- The user sees the request in the TUI and can respond with:
- Allow once — resolves this single request
- Allow always — adds a permanent
allowrule for this permission and pattern, and auto-resolves any other pending requests now covered - Reject — rejects this request and all other pending requests for the session
permission.ask hook to auto-allow or auto-deny.
Error types
| Error | When | Effect |
|---|---|---|
DeniedError | Rule evaluates to deny | Tool call rejected, includes the relevant ruleset |
RejectedError | User rejects without feedback | Halts the current tool execution |
CorrectedError | User rejects with a feedback message | Continues with user guidance |
Inline override
UseZEROXZERO_PERMISSION to inject permission rules via environment variable: