Policies and default behavior
Choose what Agent Approve allows, denies, or sends to you for a decision.
A policy combines a default behavior with an Allow List and a Deny List. One policy is active at a time.
Built-in policies
Agent Approve includes policies for common starting points. You can use one as shipped or duplicate it before making changes.
| Policy | Rules included | What happens when no rule matches |
|---|---|---|
| Default | Empty Allow List and Deny List | Asks you |
| Permissive | Common low-risk commands in its Allow List | Asks you |
| Restrictive | The Permissive Allow List plus more than 300 destructive patterns in its Deny List | Asks you |
| Allow All | No lists are checked | Approves automatically |
| Deny All | No lists are checked | Denies automatically |
| Allow All Except Deny List | Deny List | Approves automatically |
| Deny All Except Allow List | Allow List | Denies automatically |
Allow All turns off list checks for that policy. Use Allow All Except Deny List when you want unmatched work to continue while keeping specific blocks in place.
Default behavior
| Option | What happens to a command that does not match a list | Lists used |
|---|---|---|
| Ask User | Agent Approve sends the request to you. | Allow List and Deny List |
| Allow by Default | Agent Approve approves the request automatically. | Deny List |
| Deny by Default | Agent Approve denies the request automatically. | Allow List |
Allow by Default can reduce manual approvals, but anything missing from its Deny List is allowed. Review the Deny List before activating it. Deny by Default is safer for a narrow workflow, but an incomplete Allow List can stop expected work.
Create a policy
- Open Policy.
- Open the policy selector.
- Tap the plus button.
- Enter a name and optional description.
- Choose Ask User, Allow by Default, or Deny by Default.
- Tap Create, then select the policy to activate it.
The default behavior is chosen when a policy is created or duplicated. To change that behavior later, duplicate the policy and choose a different option.
Policy page actions
Open the more menu on the Policy page for actions that apply to the policy collection.
| Action | What it does |
|---|---|
| Create New Policy | Opens the policy editor so you can choose a name, description, and default behavior. |
| Reset All to Defaults | Removes custom policies, restores the system policies, and clears customized Allow Lists and Deny Lists after confirmation. This cannot be undone. |
Record any custom rules you need before resetting, then review the active policy afterward.
Duplicate Restrictive and allow ordinary work
The built-in Restrictive policy starts with more than 300 deny patterns and asks you about unmatched commands. To keep its Deny List while allowing unmatched commands:
- Open Policy, then open the policy selector.
- Press and hold Restrictive.
- Tap Duplicate.
- Give the copy a recognizable name.
- Choose Allow by Default.
- Tap Duplicate, then select the new policy.
- Review the Deny List before relying on it for unattended work.
This setup approves unmatched commands automatically while keeping the copied Deny List active. Anything the Deny List does not cover will be allowed, so review the copy before using it unattended.
Edit lists
Open the active policy, choose a tool, then open the relevant list.
- Use the plus button to add a pattern.
- Swipe an entry to remove it.
- Choose Exact match, Starts with, or Contains when adding a pattern.
- Use tool-wide allow or deny controls only when every action from that tool should receive the same decision.
- Open the more menu and choose Expand all or Collapse all to change every group at once.
Matching ignores capitalization and collapses repeated spaces or tabs. Exact match checks the whole command, Starts with checks its beginning, and Contains checks for the text anywhere in the command. Test a new rule with a harmless command before leaving the agent unattended.
Native tools, MCP servers, and Global
The list browser groups observed tools by source:
- Native tools are built into the coding agent, such as shell, read, write, or edit tools.
- MCP tools belong to an MCP server. The server and tool identities are kept together so two servers can expose tools with similar names without sharing a rule accidentally.
- Global is a cross-tool pattern bucket. Global patterns can be checked against command text and the textual or JSON representation of structured tool input. Deny checks also inspect supported MCP server and tool identity. Use Global sparingly because input formatting differs between agents and tools.
Tap the plus button to select an observed tool, search the catalog, choose Global, or add a custom tool identity. For an MCP tool, open the server group and then the tool. You can create a broad server rule or add patterns to an individual tool.
Broad rules and conflicts
A native tool shows Allow All Inputs or Deny All Inputs. A server-scoped MCP entry shows Allow All Tools or Deny All Tools. When the broad switch is on, individual patterns in that entry are not needed.
Agent Approve prevents a broad allow rule when conflicting deny rules already exist for the same scope, and prevents the inverse conflict as well. Remove or narrow the opposite rule first. Adding an individual pattern to a broadly enabled entry turns off the broad switch so the pattern can control matching.
This guard prevents an Allow List and Deny List from both claiming the same whole tool or server. Narrow patterns can still overlap; when they do, a deny match takes precedence.
Decision order
For an Ask User policy, Agent Approve evaluates a normal command in this order:
- A Deny List match denies the request.
- If no deny rule matches, an Allow List match approves it.
- If neither list matches, Agent Approve asks you.
This means a deny rule takes precedence when the same command matches both lists. Allow by Default checks the Deny List and approves anything else. Deny by Default checks the Allow List and denies anything else. Allow All and Deny All do not check either list.
How compound shell commands are checked
For supported shell tools, Agent Approve checks the complete command and each command it can parse from a shell sequence.
- A Deny List match in any part denies the whole request.
- Every part must match the Allow List before the whole request can be approved automatically.
- If some parts remain unmatched under Ask User, the request is sent to you.
This prevents an allowed command at the beginning of a sequence from hiding a denied command later in the same request. Dynamic scripts can still behave differently at runtime, so review the full command before approving unfamiliar work.
Manage policies
Press and hold a policy to see the actions available for that policy. A policy that uses Ask User can be renamed and its description can be edited. Policies with another fixed default behavior can be duplicated so you can choose a new behavior. The active policy and system policies cannot be removed.