Six coding tools for approving an agent’s shell commands

Compare one-time prompts, saved command rules, and deny behavior for shell calls made by coding agents.

Use Unstoppable Code’s Ask mode when you want to supervise commands from the worktree chat. You can make a one-time decision on a test run and use project rules for repeat commands. If your team needs to enforce a hard block on a specific command, verify rule precedence in the agent and execution environment it actually uses.

Check the policy before handing over the test run

Use a disposable local copy of the checkout-fix worktree from the test comparison. You want the agent to inspect the patch before you decide whether to let it run the web suite. Use an already configured local agent and a checkout with at least one commit. Review the active mode and your saved approvals. Check managed settings, too.

Ask for these three shell calls in separate turns. Tell the agent to use the exact command and report if approval prevents it from running. Separate calls make it easier to see which decision each rule produced.

CommandTarget behavior for the trial
git status --shortRuns automatically after a narrow exception.
git diff --statPauses so you can inspect the call and approve it once.
git log -1Is blocked before execution on tools with a configurable command deny. This harmless command stands in for a hard block.

Once you understand those outcomes, ask for npm --prefix apps/web test as a fourth call. Confirm the worktree and read the test script before approving the call. A saved rule for the command text can outlive a change to the script that npm runs.

Configure the trial in the local agent you use

  1. Unstoppable Code desktop. In the worktree chat composer, select Ask. Open Settings → Approvals, select the project under Project rules, and add an Allow rule of kind Command for the status call and a Deny rule for the log call. Check the saved patterns before running the trial. Approve the diff once. The docs say a matching deny wins over an allow. They also say that changing a chat’s mode sets the default for new chats of that kind, so review the worktree default after the trial. Unstoppable Code approval modes

  2. OpenCode V2. In the trial project’s opencode.jsonc, add three ordered permissions entries with action set to shell. Put the catch-all prompt first. Set resource to * and effect to ask. The next rule should allow git status --short. The last should deny git log -1. Run the trial in a local session. Choose Allow once for the diff. The last matching rule wins, so a catch-all at the end would undo the earlier exceptions. Saved approvals cannot override configured denials. Check your version first because V1 uses permission and bash. OpenCode configuration · OpenCode permissions

  3. Zed. Use the built-in Zed Agent on a version that supports agent.tool_permissions. In settings, set agent.tool_permissions.tools.terminal.default to confirm. Add ^git status --short$ under always_allow and ^git log -1$ under always_deny, each in an object with a pattern field. Run the trial and answer the diff confirmation. Deny and explicit confirm rules outrank allow patterns. Check the selected agent before using the result to make a team policy, since external agents can have their own permission controls. Zed tool permissions

  4. Claude Code. In the disposable project’s .claude/settings.local.json, set permissions.allow to include Bash(git status --short). Add Bash(git diff --stat) and Bash(npm --prefix apps/web test) under permissions.ask. Deny Bash(git log -1) explicitly. Start a local session in Manual mode and use /permissions to review the rules before sending the commands. The explicit diff rule matters because Claude Code can automatically approve read-only Git commands. Rule evaluation gives deny precedence over ask and allow. Claude Code permissions

  5. Kilo Code CLI. In the project’s .kilo/kilo.jsonc, set permission.bash to an ordered pattern map. Put * with ask first. Then allow git status --short and deny git log -1. Start a fresh interactive CLI session because Kilo caches project config for a loaded workspace. Run the trial and approve the diff once. If you later save a rule from the prompt, check whether the offered pattern covers the specific command or a wider set of arguments. Kilo approval configuration · Kilo CLI documentation

  6. VS Code Copilot. Use a local Copilot Agent Host session with Manual permissions. In User settings, add /^git status --short$/ as true and /^git diff --stat$/ and /^npm --prefix apps\/web test$/ as false under chat.tools.terminal.autoApprove. Here false requests confirmation when the call reaches the rule check. Check the prompt for the diff and test. Leave the hard-denial row unscored with this setting. The runtime can approve some commands before the rule check, and a remote agent host has its own approvals. VS Code approvals documentation

OpenCode V2 and Kilo use ordered overrides. Zed and Claude Code give deny rules priority. VS Code Copilot’s local terminal rule controls when it asks for confirmation. Check the tool’s sandbox settings when the requirement is to restrict which files or network destinations a command can reach.

Cookie preferences

Optional cookies measure ads and feature usage, and improve the site with session recordings. Change anytime. Privacy policy