Skip to content

Feature Request: Granular Auto-Approval Rules (like Claude Code) #1631

Description

@gerardo-contijoch

What feature would you like to see?

Currently, YOLO mode (default_yolo = true or /yolo command) is all-or-nothing:

  • OFF: Ask for approval on all non-readonly tool calls
  • ON: Auto-approve ALL tool calls

I would like granular auto-approval controls similar to what Claude Code offers, where I can:

  1. Auto-approve read-only commands (ReadFile, Glob, Grep, Shell read operations) while requiring confirmation for modifications
  2. Configure approval rules based on tool paths/arguments (e.g., auto-approve writes to certain directories but not others)

Proposed configuration (Granular, like Claude Code):

[auto_approval]
default = "ask" # "ask", "allow", "deny"

[[auto_approval.rules]]
tool = "WriteFile"
path = "/tmp/**"
action = "allow" # Auto-approve writes to /tmp

[[auto_approval.rules]]
tool = "WriteFile"
path = "**/*.md"
action = "ask" # Always ask before writing .md files

[[auto_approval.rules]]
tool = "Shell"
pattern = "git *"
action = "allow" # Auto-approve git commands

[[auto_approval.rules]]
tool = "Shell"
pattern = "rm *"
action = "ask" # Always ask before rm commands

Use case: When working on large projects, I need to explore many files (reading) without constant interruptions, but I want to be asked before any file modifications - especially in sensitive areas like production config files or outside the working directory.

This would provide a safer middle ground between the current binary YOLO on/off options.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions