How It Works · node9 documentation
How It Works
Node9 evaluates commands from top to bottom. The first match wins.
Phase 1: Local Fast Path
These checks run synchronously from your merged local config (defaults + global + project). If any fast-path check resolves the call, the pipeline stops here, the cloud is never contacted.
policy.ignoredTools, the call is approved instantly with no further checks. Use this for read-only tools (list_*, read_*, grep) that you unconditionally trust.~/.node9/trust.json with an expiry time.- smartRules: evaluated first, directly on the raw JSON args (no tokenization needed). Includes built-in rules (force push, SQL without WHERE, curl-pipe-shell) plus any active Shield rules and your custom rules. Verdict can be
allow,review, orblock. First matching rule wins. - toolInspection: if the tool maps to a parameter key (e.g.
bash → "command"), extract the command string for deeper analysis. - sandboxPaths: if all path tokens in the call are inside a sandboxed directory, allow immediately.
- dangerousWords: if the command contains a keyword from this list, flag for review.
~/.node9/decisions.json. Overrides the policy result.What if the AI tries to run rm -rf src/?
No smart rule explicitly allows it, and src/ is not in any sandbox path. Node9 flags it for review and asks for your approval inline, in the agent itself, on Claude Code and GitHub Copilot CLI; elsewhere it shows its own OS dialog.
rm -rf node_modules/- 1. Ignored Tools: Is
bashin the ignored list?
↳ No. (Move to next step) - 2. Smart Rules: Does any rule match this command?
↳ Yes! The built-inallow-rm-safe-pathsrule allowsrmon common build/cache dirs like**/node_modules/**.
🏁 EVALUATION STOPS HERE. Command is APPROVED. 3. Dangerous Words: Check if "rm" is a dangerous word.
↳ Skipped. The smart rule already approved it.
Phase 2: The Multi-Channel Race
Only reached if Phase 1 produced a review verdict and approvers.cloud is true with a valid API key. The local config is not re-evaluated here, cloud policy is enforced by the backend independently.
- If the backend immediately approves or denies: done. Pipeline ends.
- If the backend marks it as pending: a Slack message is sent and the proxy waits.
- If the backend is unreachable: falls back to local approvers with a warning.
- cloud: polls Mission Control for an admin decision (Slack button or dashboard)
- native: shows an OS dialog on the developer's machine
- terminal: interactive
y/nprompt in the CLI
remoteApprovalOnly is set by the backend (governance lock), local approvers are suppressed, only a cloud admin can approve.~/.node9/audit.log and (when cloud is enabled) recorded in Mission Control.If a command reaches the end of the waterfall and is flagged as dangerous, Node9 pauses the AI and races multiple approval channels simultaneously.
settings.reviewChannel: "approver" or pass --no-ask to the hook to get node9's OS dialog instead, with "Allow", "Block" or "Always Allow".[y/N] prompt appears directly in your terminal.Whichever channel you approve/deny through first wins. Node9 immediately cancels the others and passes your decision back to the waiting AI agent.