Workflows

Test a provider endpoint with curl before wiring it into an agent

You will check whether each approval rule holds for chained commands, blocked commands, and new sessions before you depend on it. Approval behavior varies across tools, so testing first helps you avoid surprise prompts and unexpected runs.

  1. Write allow rulesKeep them narrower than Bash(*)
  2. Test chained commandNote whether a prompt appears
  3. Test a blocked commandConfirm deny rules still apply
  4. Test in a fresh sessionCheck that "always" choices persisted
  5. Re-test after updatesRepeat the checks whenever the tool changes

Why it matters

Approval settings do not always behave the way they look. Claude Code still prompts on chained Bash commands (opens external site) even when each part is on the allow list. In Roo Code, the "Always allow" checkbox resets after Approve (opens external site), so every MCP call asks again. Test each rule yourself in the version you run.

Steps

  1. Write down the allow rules you plan to use, such as Bash(git:*) and Bash(cd:*). Keep them narrower than Bash(*).
  2. Run a chained command made only of allowed parts, joined with &&, ||, ;, or a pipe. Note whether a prompt appears.
  3. Run a command your deny rule should block, such as a force push matched by Bash(git push --force *). Confirm it is refused.
  4. If you use a community hook for compound commands, test it against your deny rules. A hook that reads only allow patterns can bypass deny rules (opens external site), so repeat the deny cases after any change.
  5. In Gemini CLI, treat the -yolo flag as all-or-nothing. It skips every approval prompt for that session (opens external site), including for destructive commands, so reserve it for disposable work.
  6. Choose "always" at a prompt, then open a fresh terminal session. Gemini CLI's "always" choice applied only to the terminal session where it was made, and new sessions prompted again (opens external site).
  7. For Roo Code MCP tools, approve once with "Always allow" checked, then confirm the next prompt for the same tool does not appear. MCP server settings checkboxes write to ~/.roo/mcp.json immediately, while the chat checkbox did not update that file (opens external site), so do not assume the chat choice is saved.

Common mistakes

Checklist

0 of 8 done

Sources

  1. Claude Code asks for approval on compound Bash commands (&&, |, ;) even when each part is allowed. How to auto-approve?
  2. Gemini CLI: tool "always" approval not persisting across terminal sessions?
  3. Roo-Code: MCP 'Always allow' checkbox resets after Approve — any fix?
Was this guide useful?