Documentation / Fleet

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

  1. The execution mode sets the baseline permissions
  2. Custom rules can expand (allow more) or restrict (deny specific operations)
  3. Rules are evaluated in order — first matching rule wins

Creating Custom Rules

  1. Open Settings → Security
  2. Scroll to Permission Rules
  3. Click Add Rule
  4. 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)
  5. 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:

  1. Open agent → Settings (gear icon)
  2. Go to Permissions
  3. Add agent-specific rules
  4. 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