Prevent destructive actions
Start with the Restrictive Block policy, verify the approval path, and adapt its safeguards to your environment.
Use Approval Mode with the Restrictive Block policy when you want known destructive actions blocked before they run and unfamiliar actions sent to you for review.
Before you begin
You need a connected agent installed in Approval Mode and a completed setup verification.
The Restrictive Block policy includes the Permissive Allow List and more than 300 destructive patterns in its Deny List. Actions left undecided by the lists and any enabled Policy Rules ask you for a decision.
Activate Restrictive Block
- Open Policy in Agent Approve.
- Open the policy selector.
- Select Restrictive Block.
- Open its Deny List and review the categories that matter to your environment.
- Confirm that Restrictive Block remains selected before starting unattended work.
The active policy applies to every connected integration using Approval Mode. It is not selected separately for each agent or profile.
Adapt the policy safely
Add Deny List entries for destructive operations that are specific to your projects, cloud tools, databases, or deployment process. Prefer a narrow Exact match or Starts with rule over a broad Contains rule.
If a safe action is repeatedly sent for review, use Remember decisions or add a narrow Allow List rule. Do not remove a broad Deny List category only to silence one false match.
For supported shell tools, Agent Approve checks the complete command and the commands it can parse from a compound sequence. A denied part blocks the whole request. See Policies and default behavior for the matching rules.
Add Policy Rules for actions beyond known command patterns
On an eligible Solo or Pro plan, add Policy Rules to the active policy. They add model evaluation after list matching, so you can describe an operation without listing every command or tool that could perform it.
- Open Settings > Policy Rules > Rule Evaluator, choose a provider, and confirm its data sharing. Agent Approve Fast is powered by Jev and uses AI credits.
- Return to Policy > Policy Rules and browse the library. Look for rules covering permanent deletion, replacing file contents, production changes, and destructive Git operations.
- Open each rule and review its definition and examples. Choose Ask for actions you want to review, or Deny for conditions you want blocked when they match.
- Add the rule. It is enabled immediately. You can edit its wording, examples, threshold, and optional text conditions.
- Review the Allow List: actions it approves are not sent to Policy Rules. Avoid broad entries that bypass a rule you depend on.
For example, a permanent-deletion rule can check a filesystem tool's arguments or a database tool's query as well as a shell command. Its result is probabilistic, so a match is not guaranteed. Check harmless representative actions and review false matches before depending on a rule.
Keep If rules cannot be checked set to Ask me to request review when the evaluator is unavailable. See Policy Rules for examples, match thresholds, oversized actions, and provider settings.
Confirm protection without risking data
Do not test with a real destructive command. Use Demo Mode to explore a simulated destructive request. For your connected agent, send a harmless action that is not already remembered and confirm that it reaches your device.
When a real request is denied by policy, its event details identify the policy decision. When Policy Rules run, the details also show matching rules and probabilities. Review the full action: neither pattern matching nor model evaluation can predict every indirect side effect, generated script, alias, or runtime behavior.
If a request does not appear or a known rule does not match, follow No approval appears and confirm that the intended policy is active.