Custom Permission Rules
Fine-tune agent permissions with custom allow lists.
Custom Permission Rules
Beyond execution modes, you can create custom permission rules to fine-tune what agents can do.
How Permission Rules Work
- The execution mode sets the baseline permissions
- Custom rules can expand (allow more) or restrict (deny specific operations)
- Rules are evaluated in order — first matching rule wins
Creating Custom Rules
- Open Settings → Security
- Scroll to Permission Rules
- Click Add Rule
- Configure the rule:
- Tool — Which tool this rule applies to (e.g.,
system_shell,write_file) - Action — Allow or Deny
- Pattern — Optional pattern to match (e.g., path patterns, command patterns)
- Tool — Which tool this rule applies to (e.g.,
- Save
Example Rules
Allow npm commands in Restricted mode:
- Tool:
system_shell - Action: Allow
- Pattern:
npm *
Deny file deletion even in Open mode:
- Tool:
delete_file - Action: Deny
- Pattern:
*
Allow writing only to specific directory:
- Tool:
write_file - Action: Allow
- Pattern:
/path/to/project/*
Rule Patterns
- Use
*as a wildcard to match any characters - Patterns are matched against command arguments or file paths
- More specific patterns should come before general ones
Per-Agent Rules
Each agent can also have its own custom rules:
- Open agent → Settings (gear icon)
- Go to Permissions
- Add agent-specific rules
- These rules apply on top of global rules
Tool Reference
To see all available tools for creating rules, see the Tools Reference.
Approval Queue
When an agent wants to use a tool that requires approval:
- Allow Once — Permit this specific operation
- Always Allow — Create a rule to always allow this operation
- Deny — Block this operation
Selecting "Always Allow" will automatically create a permission rule.
Risk Indicators
Each approval request shows a risk level:
- 🟢 Safe — Low-risk operation
- 🟡 Caution — May modify files or system state
- 🔴 Dangerous — Potentially destructive operation
- ⚪ Unknown — Risk couldn't be determined