Skip to content
Agentic Control Plane

The OpenClaw control model, explained

OpenClaw is a personal-assistant gateway. It sits in front of messaging channels and runs tools on a host that is usually unattended. That makes it different from the coding CLIs on our comparison. It has controls they lack (per-sender policy, pairing, an audit command), and its default setting trusts more than any of them.

This page covers OpenClaw’s own controls. For wiring ACP into OpenClaw, see the install guide.

The exec gate, and its default

Execution control is two settings in ~/.openclaw/openclaw.json:

{ "tools": { "exec": { "security": "full", "ask": "off" } } }

security is full (host exec), allowlist (patterns like "git *", "npm *"), or deny. ask is always or off.

The default is full with off. Every command runs on the host and nothing prompts. The docs say this is intentional single-operator UX: “guardrails for operator intent, not hostile multi-tenant isolation.” Read that literally. Most other harnesses call this configuration their escape hatch, and here it is the default. The hardened baseline the docs recommend is security: "deny" (or allowlist) with ask: "always". If anyone but you can reach your OpenClaw, start there.

Allowlist mode’s approval binding

OpenClaw has put the most work into making an approval mean what it said:

  • Approvals bind the exact request context. The gateway stores a canonical run plan and rejects post-approval edits to the command or cwd.
  • Approved interpreter scripts (bun/deno run operands) are bound to on-disk snapshots. If the script changes after approval, the run is denied.
  • strictInlineEval forces approval for interpreter inline forms (python -c, node -e, and so on). Any heredoc always requires approval. An interpreter command that can’t be resolved to exactly one local file is denied.
  • Approval prompts detect invisible-Unicode obfuscation in what they display. The string you read and the string the shell runs can differ by characters you can’t see.
  • Approval timeouts fail closed. This was part of a 2026 hardening wave that also moved transcript, sandbox, and MCP paths to fail-closed.

The approval choices are allow-once, allow-always, and deny. Allow-always builds up standing grants in local config, and nothing reviews what they have turned into.

Tool policy by agent and by sender

Because OpenClaw fronts messaging channels, it has a policy axis the coding CLIs don’t need: who is asking. The settings are global and per-agent tools.allow/tools.deny, tool profiles (messaging, minimal), tools.toolsBySender, and an elevated exec gate with its own allow-from list.

One rule is hard-coded: non-owner senders never get the cron or gateway tools. Scheduling and self-reconfiguration are the dangerous verbs, a point we argued from the policy side. Unknown DMs go through explicit pairing approval. This is identity-aware policy, but it is scoped to message senders. Tool calls themselves aren’t attributed to an identity the way a workspace ledger would.

The sandbox

The sandbox exists and is off by default. The setting is agents.defaults.sandbox.mode: "off" | "all", with per-agent or per-session scope and workspaceAccess: "none" | "ro" | "rw" (default none). Docker bind mounts are checked against a denylist, and a dangerouslyAllowExternalBindSources override exists for exceptions. Sandbox network defaults to none. Elevated exec bypasses sandboxing, and host=sandbox fails closed when no runtime exists. You can force subagents into the sandbox with sessions_spawn sandbox: "require" (default inherit).

The hook surface

There are two systems, easy to confuse, and only one can control tools.

  • Plugin hooks are in-process TypeScript registered from a plugin entry. They include before_tool_call and after_tool_call plus agent, message, and gateway lifecycle events. before_tool_call can return { block: true }, which is terminal and stops lower-priority handlers. It can also return a requireApproval result whose resolutions are the typed union allow-once | allow-always | deny | timeout | cancelled. That drives OpenClaw’s native approval flow.
  • Internal hooks are operator shell scripts. They see command and gateway lifecycle only, with no tool events (the request for tool:before/tool:after is an open issue). If someone says they “added a hook” to control OpenClaw tools, ask which system they mean.

Two catches from the changelog. Only the typed hook runner dispatches these events, and the legacy registerHook path silently doesn’t. Also, before_tool_call existed for a while before it was wired into the execution pipeline. After an upgrade, check that your hook fires with a test call instead of trusting the docs.

Plugin installation is itself gated (plugins.allow, security.installPolicy).

The audit command

openclaw security audit (with --deep and --fix) runs named checks against your live config. It flags the permissive defaults above (tools.exec.security_full_configured) and unauthenticated gateway binds, among others. It audits the configuration, not the history. Session transcripts (JSONL per agent, with always-on redaction) are the run’s own account of what happened, and nothing records decisions off the machine.

Where the native model ends

OpenClaw’s controls are broad, and its approval binding and sender-axis policy go further than the coding CLIs. The gaps are the usual ones, and they matter more because OpenClaw’s job is to run unattended:

  • The default and the deployment point opposite ways. An always-on agent that anyone can message is the empty-chair case, and the default config asks nothing and denies nothing.
  • Policy is one host’s JSON. Everything above lives in openclaw.json on that machine. There is no fleet view and no reconciliation, and whatever can write files there can change it.
  • The record is self-written. There are transcripts and a config auditor, but no independent per-decision ledger. Standing allow-always grants pile up outside any review.

The pairing that works is to adopt the hardened baseline, keep the approval binding, and put workspace policy and decision recording in a layer off the host. Our plugin rides before_tool_call. Workspace rules return block or requireApproval through OpenClaw’s own typed flow, and every decision lands in a ledger off the host.

Frequently asked questions

How do permissions work in OpenClaw?
Exec gating is two settings in ~/.openclaw/openclaw.json: tools.exec.security (full allowlist deny) and tools.exec.ask (always off). The default is security full with ask off: host execution with no approval prompts, documented as intentional single-operator UX. The hardened baseline flips both: security deny (or allowlist) with ask always. Layered on top are per-agent and global tool allow/deny lists, tool profiles, per-sender tool policy, and an elevated-exec gate.
Is OpenClaw safe by default?

Its own docs say the default (exec security full, ask off) is guardrails for operator intent, not hostile isolation. The assumption is a single trusted operator on their own machine. If other people can message your OpenClaw, or it handles untrusted content, compare against the documented hardened baseline (deny/allowlist + ask always, sandbox on, workspace-only file access), not the default.

What did OpenClaw's approval binding fix?

A class of time-of-check problems. Approvals bind the exact request context, the gateway stores a canonical run plan and rejects post-approval edits to the command or working directory, approved interpreter scripts are bound to on-disk snapshots so a rewrite after approval is denied, and inline interpreter forms (python -c, heredocs) force approval in allowlist mode. Approval timeouts now fail closed.

Can a plugin intercept OpenClaw tool calls?

Yes. In-process plugin hooks fire before_tool_call and after_tool_call for registered handlers, and before_tool_call can block outright or return requireApproval, with typed resolutions (allow-once, allow-always, deny, timeout, cancelled). Two catches: only the typed hook runner dispatches these events (the legacy registration path silently doesn’t), and the separate operator shell-hook system gets no tool events at all.

Running OpenClaw? One command adds a hook. Each tool call it sees is recorded, and a force-push, destructive SQL or curl | sh is blocked until you approve it on the console or from the email.

macOS · Linux · WSL
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

What the installer writes  ·  OpenClaw guide  ·  free up to 5 agents