Skip to content

Commit a9df494

Browse files
committed
Align exec approval fallback default docs
1 parent 4bcc989 commit a9df494

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

docs/cli/approvals.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Precedence is intentional:
8383
```bash
8484
openclaw approvals set --file ./exec-approvals.json
8585
openclaw approvals set --stdin <<'EOF'
86-
{ version: 1, defaults: { security: "full", ask: "off" } }
86+
{ version: 1, defaults: { security: "full", ask: "off", askFallback: "full" } }
8787
EOF
8888
openclaw approvals set --node <id|name|ip> --file ./exec-approvals.json
8989
openclaw approvals set --gateway --file ./exec-approvals.json
@@ -137,7 +137,8 @@ Why `tools.exec.host=gateway` in this example:
137137
- YOLO is about approvals, not routing.
138138
- If you want host exec even when a sandbox is configured, make the host choice explicit with `gateway` or `/exec host=gateway`.
139139

140-
This matches the current host-default YOLO behavior. Tighten it if you want approvals.
140+
Omitted `askFallback` defaults to `deny`. Set `askFallback: "full"`
141+
explicitly when upgrading a no-UI host that should keep never-prompt behavior.
141142

142143
Local shortcut:
143144

docs/tools/exec-approvals.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ when set at the narrower session or agent scope.
159159
### `askFallback`
160160

161161
<ParamField path="askFallback" type='"deny" | "allowlist" | "full"'>
162-
Resolution when a prompt is required but no UI is reachable.
162+
Resolution when a prompt is required but no UI is reachable. If this
163+
field is omitted, OpenClaw defaults to `deny`.
163164

164165
- `deny` - block.
165166
- `allowlist` - allow only if allowlist matches.
@@ -211,7 +212,9 @@ If you want host exec to run without approval prompts, you must open
211212
(`tools.exec.*`) **and** host-local approvals policy in
212213
`~/.openclaw/exec-approvals.json`.
213214

214-
YOLO is the default host behavior unless you tighten it explicitly:
215+
OpenClaw defaults omitted `askFallback` to `deny`. Set host
216+
`askFallback` to `full` explicitly when a no-UI approval prompt should
217+
fall back to allow.
215218

216219
| Layer | YOLO setting |
217220
| --------------------- | -------------------------- |
@@ -278,7 +281,8 @@ openclaw exec-policy preset yolo
278281
That local shortcut updates both:
279282

280283
- Local `tools.exec.host/security/ask`.
281-
- Local `~/.openclaw/exec-approvals.json` defaults.
284+
- Local `~/.openclaw/exec-approvals.json` defaults, including
285+
`askFallback: "full"`.
282286

283287
It is intentionally local-only. To change gateway-host or node-host
284288
approvals remotely, use `openclaw approvals set --gateway` or

src/cli/exec-approvals-cli.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ describe("exec approvals CLI", () => {
500500
requireRecord(toolsScope.askFallback, "tools.exec askFallback"),
501501
"tools.exec askFallback",
502502
{
503-
effective: "full",
504-
source: "OpenClaw default (full)",
503+
effective: "deny",
504+
source: "OpenClaw default (deny)",
505505
},
506506
);
507507

@@ -517,8 +517,8 @@ describe("exec approvals CLI", () => {
517517
effective: "always",
518518
});
519519
expectFields(requireRecord(agentScope.askFallback, "agent askFallback"), "agent askFallback", {
520-
effective: "allowlist",
521-
source: "OpenClaw default (full)",
520+
effective: "deny",
521+
source: "OpenClaw default (deny)",
522522
});
523523
});
524524

0 commit comments

Comments
 (0)