Coding agent permission prompts should interrupt you when an action needs a decision. Repeatedly approving a familiar inspection command is a candidate for a saved rule. Approving every shell command because the interruptions are annoying gives away too much.
Start with narrow approvals for commands you understand, keep consequential actions subject to review, and check what each saved approval actually covers. The examples below show how to make that distinction in Claude Code, Codex, and OpenCode.
Decide Which Requests Deserve an Interruption
Use this as your starting policy, then adjust it to the repository and task. These are recommendations for your approval decisions, not descriptions of any agent's defaults.
| Proposed action | Recommended response | What to check first |
|---|---|---|
| Familiar repository inspection | Consider a narrow saved approval | Exact command, arguments, and working directory |
| A known local check | Approve once, then consider a saved rule | Script contents and expected side effects |
| An unfamiliar script or dependency operation | Review each request | What code runs and what it can change |
| A destructive operation or external write | Keep a human decision | Exact target, scope, and reason |
| An action unrelated to the task | Deny and redirect | Whether the agent misunderstood the request |
| A change to approval settings themselves | Review explicitly | Which future actions would stop asking |
Prefer one-time approval when you're uncertain. A saved rule should express a decision you'd willingly make again for every matching action.
Treat permission approval and execution restrictions as separate concerns. For enforceable boundaries, use the coding agent sandboxing guide rather than expecting approval prompts to provide isolation.
Read the Action Before Accepting the Explanation
Review the actual tool input before the agent's explanation. Use a fixed sequence so familiar wording doesn't substitute for checking the request.
- Identify the tool and full command or file operation.
- Confirm the working directory and target paths.
- Inspect arguments, redirects, and additional commands.
- Identify any external destination or shared resource.
- Read the scope of the approval option before selecting it.
For example, consider these proposed commands separately:
npm run lint
npm run lint -- --fix
npm run lint && npm run deploy
Don't approve them as equivalent because each begins with a familiar check. Before approving a project script, inspect its definition and any helper it invokes. If you haven't established what lint does in this repository, approve it once or ask the agent to show you first.
Watch the saved pattern as carefully as the pending command. In Claude Code, an exact rule such as Bash(npm run lint) matches that command, while a wildcard expands what it covers. Compound commands are checked by subcommand, so permission for one component doesn't automatically approve the rest. The permission documentation explains these matching rules.
If a request is too broad, ask for a smaller action. For example, request the named check without the follow-up operation, or ask the agent to identify the target files before proposing a deletion.
Save Narrow Rules in Your Agent
Use the configuration for the agent you already run. The examples deliberately approve little. Expand them only after you can explain what every additional match permits.
Claude Code
Claude Code has tool-specific allow, ask, and deny rules. Use them when you want an explicit approval policy for a familiar project.
Best for: Saving exact recurring commands before considering wider patterns.
For example, merge this fragment into your project settings after inspecting the repository's lint script:
{
"permissions": {
"allow": [
"Bash(npm run lint)"
],
"ask": [
"Bash(git clean *)"
]
}
}
Claude Code evaluates deny rules before ask rules, then allow rules. A matching ask rule still prompts even when an allow rule also matches. Avoid a blanket Bash allow just to suppress interruptions.
Choose the file scope deliberately. .claude/settings.local.json is for your project-local settings; .claude/settings.json is the shared project file. Start locally before proposing a team policy. Anthropic's settings documentation describes these scopes.
Codex
Codex has command-prefix rules for decisions about execution outside its sandbox. Use them when an escalation request needs a repeatable decision.
Best for: Keeping a specific command family subject to approval without approving an entire executable.
For example, a .rules file in ~/.codex/rules/ can contain:
prefix_rule(
pattern = ["git", "clean"],
decision = "prompt",
justification = "Review the cleanup target before execution",
match = ["git clean -fd"],
not_match = ["git status --short"],
)
Restart Codex after adding the file. The match and not_match examples validate prefix matching when the rules load. These rules govern requests to run outside the sandbox; don't interpret this example as a universal checkpoint for every possible execution path. OpenAI's rules documentation explains the scope and supported decisions.
OpenCode
OpenCode supports ordered permission rules that resolve to allow, ask, or deny. Use its rule syntax for the version you have installed.
Best for: Keeping shell requests reviewable while exempting a small set of familiar commands.
For example, the documented V2 format in opencode.jsonc is:
{
"permissions": [
{ "action": "shell", "resource": "*", "effect": "ask" },
{ "action": "shell", "resource": "git status *", "effect": "allow" }
]
}
The last matching rule wins. This example allows git status and its arguments while leaving other shell commands subject to approval. OpenCode's permission documentation also distinguishes this syntax from V1. Inspect any proposed saved pattern before selecting Allow always, because that choice saves a durable project approval.
Keep Consequential Decisions Visible
Write down which actions you want to review regardless of how routine the task seems. Good candidates include destructive cleanup, changes to shared services, external writes, and changes to the approval policy itself.
Use the operation's target to guide the decision. Removing a named temporary output directory and removing an unfamiliar directory deserve different reviews. If the prompt doesn't establish the target clearly, deny it and request a more specific operation.
Jackalope handles this distinction with a risk check that answers routine agent permission requests while risky ones still ask you. That fits a workflow where you want fewer interruptions without treating every request as approved. Keep a concrete list of the decisions you expect to see, then check those expectations during setup.
Don't use the absence of prompts as your success criterion. Aim for predictable interruptions at the points where you still need to decide.
Check the Policy in a Fresh Session
Before relying on saved approvals, test them in a disposable repository with harmless actions. Test both what should proceed and what should still ask.
- Start a fresh session from the intended project directory.
- Ask for the exact command you approved.
- Ask for a harmless command outside that approval, such as
git --versionwhen onlygit statusis allowed. - Confirm that the second request follows your intended policy.
- Inspect the saved rules and remove anything broader than you meant to grant.
Don't run a destructive command merely to test whether it prompts. Use matching tests where supported, or harmless commands that exercise the same approval distinction.
Keep a short record of unexpected prompts during one representative task. For each, decide whether it needs a narrow rule, a clearer task instruction, or continued manual review. Change one rule at a time so you can tell which change affected the result.
Your next step is small. Pick one recurring command, inspect it, save the narrowest useful approval, and verify it in a new session. Leave the rest unchanged until you have evidence that another rule is useful.
FAQ
Should I select Allow once or Always allow?
Choose Allow once for unfamiliar actions or anything whose safety depends on the current target. Save an approval only when you understand the proposed pattern and would accept future actions throughout its scope.
Why does Claude Code still ask after I allow a command?
A matching ask rule takes precedence over an allow rule. The proposed command may also differ from the saved pattern. Use /permissions to inspect the active rules and their sources before widening an approval.
Can project instructions replace permission settings?
No. In Claude Code, instructions shape what the agent attempts, while permission rules govern access. Keep behavioral guidance in your project instructions and configure approvals separately.
Should an agent approve changes to its own permission rules?
Keep those changes subject to your review. Ask the agent to propose the smallest configuration diff and explain which future requests it would approve. Check that scope before applying it.
Watch the app tour or see how it works.
Sign up free to try Jackalope on your own projects.