This document describes how to configure OpenClaw to automatically approve all exec commands without manual intervention.
OpenClaw has two layers of exec approval controls:
- Tool policy (
openclaw.json→tools.exec) - Exec approvals (
exec-approvals.json)
Both must be configured for full auto-approve.
Set the exec tool to allow all commands without prompting:
openclaw config set tools.exec.security full
openclaw config set tools.exec.ask offopenclaw config get tools.execExpected output:
{
"security": "full",
"ask": "off"
}Edit ~/.openclaw/exec-approvals.json to include:
{
"version": 1,
"socket": {
"path": "/Users/nic/.openclaw/exec-approvals.sock",
"token": "<your-token>"
},
"defaults": {
"security": "full",
"ask": "off",
"askFallback": "full"
},
"agents": {
"*": {
"security": "full",
"ask": "off",
"askFallback": "full",
"allowlist": [
{ "pattern": "**" }
]
},
"main": {
"security": "full",
"ask": "off",
"askFallback": "full",
"allowlist": [
{ "pattern": "**" }
]
}
}
}openclaw approvals allowlist add --agent "*" "**"
openclaw approvals allowlist add --agent "main" "**"openclaw approvals getExpected output should show:
Defaults: security=full, ask=off, askFallback=full- Allowlist entries for
*andmainagents
The gateway must be restarted to pick up config changes:
openclaw gateway --forceopenclaw gateway healthopenclaw agent --agent main --message "run: echo 'auto-approve test'" --timeout 30Expected: Command executes immediately without showing an approval ID prompt.
| Value | Description |
|---|---|
deny |
Block all exec requests |
allowlist |
Allow only allowlisted commands |
full |
Allow everything (no restrictions) |
| Value | Description |
|---|---|
off |
Never prompt for approval |
on-miss |
Prompt only when allowlist doesn't match |
always |
Prompt on every command |
| Value | Description |
|---|---|
deny |
Block if UI unavailable |
allowlist |
Allow only if allowlist matches |
full |
Allow anyway |
| File | Purpose |
|---|---|
~/.openclaw/openclaw.json |
Main config (tools.exec settings) |
~/.openclaw/exec-approvals.json |
Exec approval policy and allowlists |
- Ensure both
tools.execANDexec-approvals.jsonare configured - Restart gateway:
openclaw gateway --force - Check config:
openclaw approvals get --gateway
openclaw config get tools.exec
openclaw approvals getGenerated: 2026-02-04