Auto-Approval Rules
Last updated
Which calls skip the confirmation prompt, and how
allow_tool and trust_skill entries are written and matched.These rules decide which calls ask under
safe (and under auto when the working directory does not qualify). A tool that carries a mode is gated by it: list / read / search are treated as read-only and skip confirmation, while mode=remove (write_file, write_skill, write_tool, write_hook) always confirms even on an otherwise auto-approved tool. The same holds for restore_file, which since v1.3.11 replaces edit_file's restore mode (Removed in v1.3.11): an allow rule never skips it. remove_file, which replaced the remove mode in v1.3.11, was merged back into write_file; use write_file with mode=remove (Removed in v1.5.0). edit_skill and edit_tool were renamed; use write_skill and write_tool (Removed in v1.5.0). Since v1.5.0 write_skill, write_tool, write_hook, test_tool and test_hook are no longer registered AlwaysAllow: they ask under safe like any other non-read-only tool and pass under auto or allow this turn.Beyond that, a call skips the prompt when its tool is registered
AlwaysAllow, an http_request uses GET, or a run_command / background_command argv matches the read-only list (an argv token that touches a sensitive path stops the match); open_file on a URL and read_files on a sensitive file always ask, and so does a command call with sandbox: false (v1.3.0) or an argv starting with sudo (v1.3.2), which needs the system password even under auto or a matching allow rule; since v1.3.22 a trusted Skill skips the sandbox: false prompt, but not sudo. Every other call is checked against the allow list (internal/agents/exec/allow):| Item | Detail |
|---|---|
| Files | ~/.config/agenvoy/allow_tool, one entry per line, # starts a comment. The project list <workDir>/.agenvoy/allow_list is no longer read, so a cloned repository cannot pre-approve its own calls; use the global allow_tool (Removed in v1.5.0). The TUI /tool command and POST /v1/tool/allow toggle a script tool's entry, except a tool that sets always_allow in its tool.json |
| Entry | name approves every call of that tool; name(argGlob) approves only calls whose subject matches. The subject is the space-joined argv for run_command and background_command (run_command_background was renamed, Removed in v1.3.2), the absolute path for write_file, METHOD URL for http_request (method defaulting to GET), otherwise the path (made absolute against the work directory), url or target argument, else the raw JSON arguments. Since v1.3.0 relative paths are resolved before matching, and an empty argv, write_file path or http_request URL never matches a rule and cannot be remembered |
| Glob | Used for both the name and argGlob, anchored to the whole string: * matches within one / segment, ** crosses / (since v1.3.0 **/ also matches zero directories, so src/**/*.go covers src/main.go), ? matches one non-/ character, and \*, \?, \\ are literal |
| Remember | Approving a prompt with remember writes name(<subject>) to the global allow_tool, escaping *, ? and \ in the subject so the entry matches only that exact call |
| MCP | /mcp → server → tools, or POST /v1/allowlist with {tool: {prefix, entries}}, replaces every global entry under mcp__<server>__ with the given set; each entry must start with that prefix, and including prefix* collapses the set to a whole-server grant |
| Skills | ~/.config/agenvoy/trust_skill lists trusted Skill names; a run that executes a listed Skill is trusted (see the mode table in Permission Modes). The project list <workDir>/.agenvoy/trust_skill is no longer read; use the global trust_skill (Removed in v1.5.0). Since v1.5.0, when write_skill writes, patches or copies into a trusted Skill (matched by its directory name and its SKILL.md name; files under its .doc/ excepted), the write goes through but the Skill is dropped from trust_skill, and the result tells the user to trust it again in /skill → permission or the Web UI Skills tab. A legacy allow_skill file is renamed to trust_skill on first read; allow_skill was Removed in v1.3.22, and before it a listed Skill only ran with the auto rules |
In v1.3.20, rename saved
edit_file rules to write_file to retain the approval; likewise, since v1.5.0, rename saved edit_skill / edit_tool rules to write_skill / write_tool and move any project allow_list entries into the global allow_tool.