Allow a command

Decide whether an agent can run a command it isn't allowed to run on its own, once or every time.

On this page

Agents run commands in a terminal, just like a developer. Safe commands, such as running tests, run freely. Anything else becomes an ask: Allow a command. The run waits until someone decides.

Why you’re being asked

Every command is checked against the workspace’s command rules, then the factory’s guardrails, then the agent’s permission mode. A command is sent to you when:

  • a rule says ask for it, for example pnpm db:migrate *;
  • no rule matches and the agent is in Ask for writes or Ask for everything mode;
  • the command needs network access (these always ask).

The ask shows the exact command, such as pnpm db:migrate --env staging-eu, and the run step it belongs to.

Allow it once

  1. Open the Allow a command ask in your Inbox.
  2. Read the command and check where it runs. The ask names the machine or sandbox, and the run’s Terminal tab shows what the agent did just before.
  3. Select Allow once, or press ⌘ ↵. The command runs this one time. The next time the agent wants it, you’re asked again.

Allow it every time

If you’ll always say yes to a command, add a rule so nobody has to be asked again. Admins manage rules in Settings → Action approvals → Command rules.

  1. Open Settings → Action approvals and select Add command rule.
  2. Enter a Command pattern. * matches anything, so pnpm test * covers every test command.
  3. Choose the action: allow, ask or deny.
  4. Save the rule. It’s added at the top of the list.

Rules are checked from top to bottom and the first match wins, so put narrow rules above broad ones. Factory guardrails can only tighten these rules, never loosen them.

Don’t allow it

If the command looks wrong, select Request changes and tell the agent what to do instead, for example “Run the migration against staging only”. To stop the work entirely, cancel the run from its menu.

What deny does

A deny rule blocks a command without asking anyone. The agent sees that the command was refused and must find another way or ask you a question. Typical deny rules are git push --force* and sudo *. Use deny for commands that should never run, whoever approves.

If something goes wrong

  • The same command keeps asking. Allow once only covers one run of it. Add an allow rule, or ask an Admin to.
  • An allowed command still asks. A rule higher in the list, or the factory’s guardrails, says ask. Move your rule up or check the factory’s Guardrails tab.

For how rules, guardrails and permission modes combine, read Permissions and approvals.

    Type to search the docs, help center and blog.