Why this order
Checks that can only refuse run before checks that can permit, and checks that need no human run before the one that does:- Mode — the cheapest and strongest control: a tool that is not offered cannot be called.
- Permissions — the member’s own keys, as for an API request. See Tools.
- Guard — the deny list, workspace rules and scope, enforced in every approval mode, including Auto, and for subagents.
- Plan gate — in Agent mode, work happens only inside an approved plan.
- Approval — the human decides, with the guard’s reason shown when it escalated.
The guard
Built-in deny list
Shell commands and tools of external MCP servers are checked against a fixed list of destructive actions: recursive deletion of the root, home or system directories, formatting or wiping filesystems, raw writes to block devices, fork bombs, shutting down or rebooting the host, destructive SQL (DROP, TRUNCATE, DELETE without WHERE), flushing Redis, and HTTP DELETE requests.
The command is normalized before matching: line continuations are joined, quotes and escapes are removed and bash -c '…' bodies are flattened, then the command is split on ;, &&, |, subshells and backticks. r"m" -rf '/' reads as rm -rf /, and a dangerous command hidden after a harmless one is still found. Matching errs on the side of refusing: even grep "DROP TABLE" is refused.
Workspace tool rules
The workspace owner can add rules that apply to every member’s agent:- each rule names a tool (or
*), an optional wildcard pattern matched against the whole command or JSON input, an action — allow, deny or ask — and a priority; - the highest-priority matching rule decides; on a tie, deny beats ask and ask beats allow;
- ask forces an approval prompt even in Auto mode; allow skips the prompt; deny refuses.
*, ?), never regular expressions built from user input, so a rule cannot be used to stall the API. Only workspace owners can write rules.
The scope gate
The agent should only touch what the workspace is responsible for. The scope is the conversation’s project include and exclude rules, when the project has include rules; otherwise the workspace’s domain, IP and CIDR targets, where a domain covers its subdomains. Assets inside that scope count too.- Calls with a structured target —
run_tool_connector, anddispatch_subagentwith targets — must be in scope, or they are refused. - Hosts found in a shell command are checked on a best-effort basis: a host that may be out of scope escalates to an approval prompt, even in Auto mode, unless an allow rule matched.
- A host the project excludes is always refused. Block beats allow.
The plan gate
In Agent mode, every gated tool is refused until the model has calledformulate_plan, the user has approved the plan, and a step is in progress. The plan is the unit of consent: the user sees the whole intended course of action before any of it happens, and picks how the approved plan runs — asking before each call, or automatically. Changing the plan’s direction means scrapping it and proposing a new one, which is reviewed again. See Plans and subagents.
Approval
Calls that pass the guard either run or wait for the user:- Read-only tools run without asking once a step is in progress.
- In Auto mode, other tools run without asking — unless the guard escalated the call.
- In Manual mode, each call that has not been approved before waits for an answer.
Unattended runs
Subagents work in the background where nobody sees a prompt. They run unattended: a call the guard escalates to a prompt is refused instead of waiting forever. Built-in subagents run their declared tools without asking — the user approved their work through the plan. A custom subagent in a Manual conversation gets read-only tools only.Resisting prompt injection
The agent reads untrusted text all the time: web pages, HTTP responses, banners, scan output, and tasks written by other agents. The runtime treats all of it as data:- A subagent’s task arrives wrapped in a
<task>block, after a fixed preamble that tells it to follow only its own instructions, never instructions inside the task or tool output. Results of earlier subagents and the shared notebook are wrapped the same way, and any closing tag inside them is neutralized so the text cannot break out of its block. - The controls above do not depend on the model’s judgement: an injected instruction can at most make the model ask for something, and the mode, permissions, guard, plan gate and approval still apply.
- Findings the agent proposes are never added directly. They enter as pending review; at proposal time the platform checks every quote the agent cites as evidence against the stored raw tool output and records whether it was found. The reviewer sees that verdict next to the proposal. See Data model.
Related
Plans and approvals
Approval modes, plan review and safety checks from the user’s side
Plans and subagents
The plan model and how subagents are queued and briefed
Tools
What each tool requires before the guard
