You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exec approvals: human sign-off for risky agent commands #58
openclaw's approvals subsystem pauses dangerous exec calls until the operator approves (CLI + gateway methods + events). For jsclaw this is the natural complement to sandboxMode 'off'/#42's posture flip: unsandboxed agents become defensible when bash calls matching deny-patterns wait for a thumbs-up via gateway event (webchat/TUI/channel prompt). Scope: approval policy config, runner-side gate (agent-micro tool layer + default runner), approval.requested/resolved events, openclaw-shaped methods for #46.
openclaw's approvals subsystem (from the shipped dist)
Large — most of it is channel-delivery/native-routing machinery — but the core is small:
Gate point: a before-tool-call hook intercepts every tool invocation before it runs; policy resolves to allow / deny / ask. Config carries approvalPolicy (e.g. "auto" short-circuits, no prompt).
RPC familyexec.approval.*: request, requested (event pushed to clients), get, list, resolve, resolved (event), wait. A pending approval carries a reason.
Surfaces: /approve slash command and an elevated command; approvals route to channels (reactions on Telegram, native prompts) — the same broadcast path our heartbeat alerts already use.
Decision verbs: approve / deny.
WAC 2.0 / Secure Access Conditions (webacl.org/secure-access-conditions) — the principles
WAC 2.0 adds acl:Condition (acl:ClientCondition/acl:IssuerCondition) and explicitly defines no approvals, obligations, or human-in-the-loop — it leaves exactly the seam approvals fill. Its evaluation principles are the right defaults for an approval gate:
Monotonic: conditions only ever restrict, never widen access.
Conjunctive: all conditions must pass.
This also connects to JavaScriptSolidServer/JavaScriptSolidServer#338 (secure-access-conditions deny semantics) — a jsclaw approval policy expressed in WAC-adjacent terms would let a pod-resident agent's gating speak the same vocabulary as the pod's own ACLs.
jsclaw mapping — why now
The risk is concrete and current: Scuttle runs unsandboxed (bash as the host user), reachable from Telegram + Nostr, with an MCP client that pulls in external content, and (once HEARTBEAT.md lands) acting on a timer unwatched. Prompt injection through any inbound channel reaches a real shell. Approvals are the guardrail that makes the unsandboxed/autonomous default defensible — the complement to sandboxMode (#42).
PoC scope
Policy in config: approvals: { mode: "auto"|"ask"|"deny", rules: [{ tool, match, decision }] } — fail-closed default for dangerous tools (bash matching destructive patterns, writes outside the agent folder, network to new hosts), auto for the safe majority. Monotonic: rules only restrict.
Gate at the single injection point — runContainerAgent already wraps every run (the same place skills/sessions hook), so it's runner-agnostic. A pending tool call pauses, emits an approval request.
Surface: broadcast an approval.requested event (gateway clients) and deliver to the agent's channel (reply yes/no, or /approve <id>); resolve with a timeout that denies on expiry (fail-closed).
Per-agent: trusted main agent may run mode: auto; channel/visitor agents default ask.
Dependencies / deferred
Pairs with completing heartbeat (verify a cycle fires + write HEARTBEAT.md) — an autonomous agent is the strongest argument for the gate, and the riskiest thing to run without it.
Deferred: openclaw's full channel-reaction routing, elevated/escalation levels, approval persistence across restarts, the WAC-RDF expression of policy (start with plain config; the acl: vocabulary is a later interop bridge to #338).
Power-user note
Before this ships, the interim guardrail for dogfdooding Scuttle autonomously is keeping channel allowFrom tight (operator only) — which it already is.
Activity
melvincarvalho commentedon Jun 11, 2026
Audit (2026-06-12) — two sources: openclaw's implementation + WAC 2.0's principles
openclaw's approvals subsystem (from the shipped dist)
Large — most of it is channel-delivery/native-routing machinery — but the core is small:
before-tool-callhook intercepts every tool invocation before it runs; policy resolves toallow/deny/ ask. Config carriesapprovalPolicy(e.g."auto"short-circuits, no prompt).exec.approval.*:request,requested(event pushed to clients),get,list,resolve,resolved(event),wait. A pending approval carries areason./approveslash command and anelevatedcommand; approvals route to channels (reactions on Telegram, native prompts) — the same broadcast path our heartbeat alerts already use.WAC 2.0 / Secure Access Conditions (webacl.org/secure-access-conditions) — the principles
WAC 2.0 adds
acl:Condition(acl:ClientCondition/acl:IssuerCondition) and explicitly defines no approvals, obligations, or human-in-the-loop — it leaves exactly the seam approvals fill. Its evaluation principles are the right defaults for an approval gate:This also connects to JavaScriptSolidServer/JavaScriptSolidServer#338 (secure-access-conditions deny semantics) — a jsclaw approval policy expressed in WAC-adjacent terms would let a pod-resident agent's gating speak the same vocabulary as the pod's own ACLs.
jsclaw mapping — why now
The risk is concrete and current: Scuttle runs unsandboxed (
bashas the host user), reachable from Telegram + Nostr, with an MCP client that pulls in external content, and (once HEARTBEAT.md lands) acting on a timer unwatched. Prompt injection through any inbound channel reaches a real shell. Approvals are the guardrail that makes the unsandboxed/autonomous default defensible — the complement to sandboxMode (#42).PoC scope
approvals: { mode: "auto"|"ask"|"deny", rules: [{ tool, match, decision }] }— fail-closed default for dangerous tools (bash matching destructive patterns, writes outside the agent folder, network to new hosts), auto for the safe majority. Monotonic: rules only restrict.runContainerAgentalready wraps every run (the same place skills/sessions hook), so it's runner-agnostic. A pending tool call pauses, emits an approval request.approval.requestedevent (gateway clients) and deliver to the agent's channel (replyyes/no, or/approve <id>); resolve with a timeout that denies on expiry (fail-closed).permissions_*tools deferred on Gateway as MCP server: agents and sessions as tools over Streamable HTTP #73 (exec.approval.list/resolve) so an operating host can clear approvals.mode: auto; channel/visitor agents defaultask.Dependencies / deferred
Power-user note
Before this ships, the interim guardrail for dogfdooding Scuttle autonomously is keeping channel allowFrom tight (operator only) — which it already is.