OpenClaw security.preset Removed: Set Sandbox, Exec and Messaging Controls Directly
Published 2026-11-02 · Updated 2026-11-01 · By The Is My Agent Safe team
Short answer
OpenClaw removed the unreleased security.preset field. Its doctor docs say configs containing personal or corporate must remove that field before startup, that openclaw doctor --fix removes it, and that doctor does not expand the removed preset. If you relied on it, set the controls directly: agents.defaults.sandbox for where tools run, tools.exec.mode and tools.elevated for host commands, dmPolicy and groupPolicy for who can reach the agent, and tools.message.crossContext for where it can send messages.
- Remove security.preset; openclaw doctor --fix does it with a backup, but it doesn't add the old restrictions back.
- Sandbox: agents.defaults.sandbox.mode is off by default; set non-main or all, and pick scope and workspaceAccess.
- Host exec: no-approval host exec is the default; set tools.exec.mode, and keep tools.elevated off unless you need it.
- Channels: DMs default to pairing and groups to allowlist; keep them there.
- Messaging: agents can send across conversations and providers by default; tools.message.crossContext can confine that.
Run the free check: after the changes below, run openclaw security audit --deep and paste the output into our free check (Limits of the check).
Who this is for
Anyone whose OpenClaw config had security.preset set to personal or corporate, and anyone who wants those kinds of limits without a preset. That includes small businesses and the agencies that set them up.
What changed
OpenClaw's config migration docs, under "Removed security presets", say:
So removing the field doesn't put the old limits back. The steps below set them one at a time.
Step 1: Remove the field
Run openclaw doctor --fix, or delete security.preset from the config yourself. Then start the Gateway.
Step 2: Turn the sandbox on
The sandboxing docs say sandboxing "is off by default and controlled by agents.defaults.sandbox (global), agents.entries.*.sandbox (per-agent), or a required creator-role sandbox policy". The Gateway process stays on the host. Only tool execution moves into the sandbox. The docs also say: "This is not a perfect security boundary, but it materially limits filesystem and process access when the model does something dumb."
Three settings decide how it works. From the modes, scope and backend docs:
| Setting | Key | Values | Default |
|---|---|---|---|
| Mode | agents.defaults.sandbox.mode | off, non-main, all | off |
| Scope | agents.defaults.sandbox.scope | agent, session, shared | agent |
| Backend | agents.defaults.sandbox.backend | docker, podman, ssh, openshell, crabbox | docker |
non-mainsandboxes every session except the agent's main session. The docs say group and channel sessions "always count as non-main and get sandboxed".allsandboxes every session, your own included.sessionscope gives each session its own container.shareduses one container for all sandboxed sessions.
Then decide what the sandbox can see of the agent workspace. The workspace access docs list agents.defaults.sandbox.workspaceAccess:
none(default): tools use an isolated sandbox workspace, and the agent workspace isn't exposed.ro: the agent workspace is mounted read-only at/agent, andwrite,editandapply_patchare disabled.rw: the agent workspace is mounted read/write at/workspace.
The Docker backend docs give its defaults: "network: "none" (no egress), readOnlyRoot: true, capDrop: ["ALL"], image openclaw-sandbox:trixie-slim." Adapted from their example:
{
agents: {
defaults: {
sandbox: {
mode: "all",
backend: "docker",
scope: "session",
workspaceAccess: "ro",
},
},
},
}
Two cautions from the docs. First, docker.binds "pierces the sandbox filesystem", and binds default to read-write if you omit the mode (sandbox vs tool policy vs elevated). Second, "Do not mount the host Docker socket into agent sandbox containers" (Docker backend).
Step 3: Set host exec and elevated mode
The sandbox decides where tools run. Commands that run on the host follow a separate policy. The exec tool docs say: "No-approval host exec is the default for gateway and node (mode=full)". To change that, set tools.exec.mode. The same page lists the modes:
deny: exec is denied.allowlist: only allowlisted commands run, and nothing else is asked.ask: allowlist matches run directly, and everything else asks a human.auto: allowlist matches run directly, and other eligible commands get anallow,denyoraskverdict from the native reviewer.full: no ordinary policy prompts.
{ tools: { exec: { mode: "ask" } } }
The exec approvals docs say the effective policy is "the stricter of tools.exec.* and approvals defaults", and the host approvals file can only tighten it. If a prompt is needed and no approval UI is reachable, the ask fallback defaults to deny. Our guide to tools.exec.security_full_configured covers the openclaw exec-policy commands that set both.
Elevated mode is the other way out of the sandbox. The elevated mode docs say it "lets the agent break out of ordinary agent-configured sandboxing and run commands outside the sandbox". It needs tools.elevated.enabled to be true and the sender to be on tools.elevated.allowFrom. If no one needs it, leave it off:
{ tools: { elevated: { enabled: false } } }
The same page notes that disabling elevated also locks out ! shell commands in chat.
Step 4: Keep channel access narrow
The shared channel policy docs list the DM and group policies for every channel:
- DM policy:
pairing(default),allowlist,open,disabled.pairingmeans unknown senders get a one-time pairing code and the owner must approve. - Group policy:
allowlist(default),open,disabled.
The groups docs add that, by default, "Replies require a mention unless you disable mention gating for a group." For Telegram, the access control docs set these with channels.telegram.dmPolicy and channels.telegram.groupPolicy, and they recommend that one-owner bots use dmPolicy: "allowlist" with explicit numeric allowFrom IDs. Avoid open unless the bot is meant to be public. If you already have an open policy, see our guide to dm.open.
Step 5: Limit where the agent can send messages
This one is easy to miss. OpenClaw's security docs say: "Agents with message-tool access can send across conversations and channel providers by default." The tool permissions docs say tools.message.crossContext.allowAcrossProviders and allowWithinProvider both default to true. To confine guarded message actions to the current conversation, set both to false:
{
tools: {
message: {
crossContext: {
allowWithinProvider: false,
allowAcrossProviders: false,
},
},
},
}
The docs say these settings guard sends, replies, edits, deletes and thread creation. They don't restrict every channel action, and they don't replace filesystem, shell or sandbox limits. To set this for one agent, put the same message block under agents.entries.<agentId>.tools.
Step 6: One trust boundary per gateway
No setting above turns one gateway into a wall between people who don't trust each other. OpenClaw's security docs assume "one trusted boundary per gateway: a single operator, or a team whose members trust each other." For mixed-trust use, they say to split: "separate gateway + credentials, ideally separate OS users or hosts." See Running OpenClaw for multiple clients.
Step 7: Check the result
Run openclaw sandbox explain. The sandbox vs tool policy vs elevated docs say it prints the effective sandbox mode, scope and workspace access, whether the session is sandboxed, the effective sandbox tool allow and deny lists, and "elevated gates and fix-it key paths".
Then run openclaw security audit --deep. The audit docs say it reports policy drift, such as "sandbox Docker settings configured but sandbox mode off", and runtime drift, such as "setting tools.exec.host="sandbox" while sandbox mode is off".
What our free check covers
We built a free paste check. Paste your openclaw security audit --deep output and openclaw --version. It puts the most important finding first, in plain English, with how to fix that one when we have steps for it. It also looks for risky settings, such as API keys handed to skills, and checks the version against published OpenClaw security advisories. Nothing is installed into the agent you're checking.
We check the text you paste. Your browser hides many common key and token formats before sending, but not all of them, so remove any other secrets first. Green means no issues found in the checks we ran. See Limits of the check.
The check is free, and a full report is $29. One-off $29, not a subscription. Refunded automatically if the check can't finish, or in full if you ask within 14 days. The full report explains every finding and lists the fixes in order. We don't review the code inside skills or MCP servers ourselves, beyond what OpenClaw's own audit reports.
Setting this up for clients? See Is My Agent Safe for agencies.
Is My Agent Safe is independent and isn't affiliated with or endorsed by OpenClaw or its maintainers.
Written with AI assistance by the Is My Agent Safe team at Your Evenings Ltd.
Where next
- tools.exec.security_full_configured: what it means
- OpenClaw security checklist for client deployments
- Running OpenClaw for multiple clients
Frequently asked questions
Why won't OpenClaw start with security.preset in my config?
OpenClaw's config migration docs say the unreleased security.preset field has been removed, and configs containing personal or corporate must remove that field before startup. openclaw doctor --fix removes it through its unknown-key repair and backup flow.
Does doctor --fix keep the corporate preset's restrictions?
No. The docs say doctor does not expand the removed preset. Explicit execution, sandbox, file, steering and messaging settings are kept, so set any restrictions you relied on directly.
Is the OpenClaw sandbox on by default?
No. OpenClaw's sandboxing docs say sandboxing is off by default and controlled by agents.defaults.sandbox, per-agent sandbox settings or a required creator-role policy.
How do I see what OpenClaw is actually doing?
Run openclaw sandbox explain. Per OpenClaw's docs it prints the effective sandbox mode, scope and workspace access, the effective sandbox tool allow and deny lists, and elevated gates with fix-it key paths. Then run openclaw security audit --deep.
Sources
- OpenClaw docs: config and migration repairs (Removed security presets)
- OpenClaw docs: sandboxing
- OpenClaw docs: sandbox modes, scope and backend
- OpenClaw docs: sandbox workspace access
- OpenClaw docs: Docker sandbox backend
- OpenClaw docs: what gets sandboxed
- OpenClaw docs: sandbox vs tool policy vs elevated
- OpenClaw docs: exec tool
- OpenClaw docs: exec approvals
- OpenClaw docs: elevated mode
- OpenClaw docs: shared channel policies
- OpenClaw docs: Telegram access control
- OpenClaw docs: groups
- OpenClaw docs: tool and agent permissions (cross-provider messaging)
- OpenClaw docs: security (one trust boundary per gateway)
- OpenClaw docs: running the security audit
Get the plain-English agent security brief
Agents & AI Security, explained: a short, plain-English email when we have something useful. Free. Unsubscribe any time.
We'll only use your email to send the newsletter. The newsletter is sent by beehiiv, which records opens and link clicks. Privacy policy.