* refactor: remove stale file-backed shims * fix: harden sqlite state ci boundaries * refactor: store matrix idb snapshots in sqlite * fix: satisfy rebased CI guardrails * refactor: store current conversation bindings in sqlite table * refactor: store tui last sessions in sqlite table * refactor: reset sqlite schema history * refactor: drop unshipped sqlite table migration * refactor: remove plugin index file rollback * refactor: drop unshipped sqlite sidecar migrations * refactor: remove runtime commitments kv migration * refactor: preserve kysely sync result types * refactor: drop unshipped sqlite schema migration table * test: keep session usage coverage sqlite-backed * refactor: keep sqlite migration doctor-only * refactor: isolate device legacy imports * refactor: isolate push voicewake legacy imports * refactor: isolate remaining runtime legacy imports * refactor: tighten sqlite migration guardrails * test: cover sqlite persisted enum parsing * refactor: isolate legacy update and tui imports * refactor: tighten sqlite state ownership * refactor: move legacy imports behind doctor * refactor: remove legacy session row lookup * refactor: canonicalize memory transcript locators * refactor: drop transcript path scope fallbacks * refactor: drop runtime legacy session delivery pruning * refactor: store tts prefs only in sqlite * refactor: remove cron store path runtime * refactor: use cron sqlite store keys * refactor: rename telegram message cache scope * refactor: read memory dreaming status from sqlite * refactor: rename cron status store key * refactor: stop remembering transcript file paths * test: use sqlite locators in agent fixtures * refactor: remove file-shaped commitments and cron store surfaces * refactor: keep compaction transcript handles out of session rows * refactor: derive transcript handles from session identity * refactor: derive runtime transcript handles * refactor: remove gateway session locator reads * refactor: remove transcript locator from session rows * refactor: store raw stream diagnostics in sqlite * refactor: remove file-shaped transcript rotation * refactor: hide legacy trajectory paths from runtime * refactor: remove runtime transcript file bridges * refactor: repair database-first rebase fallout * refactor: align tests with database-first state * refactor: remove transcript file handoffs * refactor: sync post-compaction memory by transcript scope * refactor: run codex app-server sessions by id * refactor: bind codex runtime state by session id * refactor: pass memory transcripts by sqlite scope * refactor: remove transcript locator cleanup leftovers * test: remove stale transcript file fixtures * refactor: remove transcript locator test helper * test: make cron sqlite keys explicit * test: remove cron runtime store paths * test: remove stale session file fixtures * test: use sqlite cron keys in diagnostics * refactor: remove runtime delivery queue backfill * test: drop fake export session file mocks * refactor: rename acp session read failure flag * refactor: rename acp row session key * refactor: remove session store test seams * refactor: move legacy session parser tests to doctor * refactor: reindex managed memory in place * refactor: drop stale session store wording * refactor: rename session row helpers * refactor: rename sqlite session entry modules * refactor: remove transcript locator leftovers * refactor: trim file-era audit wording * refactor: clean managed media through sqlite * fix: prefer explicit agent for exports * fix: use prepared agent for session resets * fix: canonicalize legacy codex binding import * test: rename state cleanup helper * docs: align backup docs with sqlite state * refactor: drop legacy Pi usage auth fallback * refactor: move legacy auth profile imports to doctor * refactor: keep Pi model discovery auth in memory * refactor: remove MSTeams legacy learning key fallback * refactor: store model catalog config in sqlite * refactor: use sqlite model catalog at runtime * refactor: remove model json compatibility aliases * refactor: store auth profiles in sqlite * refactor: seed copied auth profiles in sqlite * refactor: make auth profile runtime sqlite-addressed * refactor: migrate hermes secrets into sqlite auth store * refactor: move plugin install config migration to doctor * refactor: rename plugin index audit checks * test: drop auth file assumptions * test: remove legacy transcript file assertions * refactor: drop legacy cli session aliases * refactor: store skill uploads in sqlite * refactor: keep subagent attachments in sqlite vfs * refactor: drop subagent attachment cleanup state * refactor: move legacy session aliases to doctor * refactor: require node 24 for sqlite state runtime * refactor: move provider caches into sqlite state * fix: harden virtual agent filesystem * refactor: enforce database-first runtime state * refactor: rename compaction transcript rotation setting * test: clean sqlite refactor test types * refactor: consolidate sqlite runtime state * refactor: model session conversations in sqlite * refactor: stop deriving cron delivery from session keys * refactor: stop classifying sessions from key shape * refactor: hydrate announce targets from typed delivery * refactor: route heartbeat delivery from typed sqlite context * refactor: tighten typed sqlite session routing * refactor: remove session origin routing shadow * refactor: drop session origin shadow fixtures * perf: query sqlite vfs paths by prefix * refactor: use typed conversation metadata for sessions * refactor: prefer typed session routing metadata * refactor: require typed session routing metadata * refactor: resolve group tool policy from typed sessions * refactor: delete dead session thread info bridge * Show Codex subscription reset times in channel errors (#80456) * feat(plugin-sdk): consolidate session workflow APIs * fix(agents): allow read-only agent mount reads * [codex] refresh plugin regression fixtures * fix(agents): restore compaction gateway logs * test: tighten gateway startup assertions * Redact persisted secret-shaped payloads [AI] (#79006) * test: tighten device pair notify assertions * test: tighten hermes secret assertions * test: assert matrix client error shapes * test: assert config compat warnings * fix(heartbeat): remap cron-run exec events to session keys (#80214) * fix(codex): route btw through native side threads * fix(auth): accept friendly OpenAI order for Codex profiles * fix(codex): rotate auth profiles inside harness * fix: keep browser status page probe within timeout * test: assert agents add outputs * test: pin cron read status * fix(agents): avoid Pi resource discovery stalls Co-authored-by: dataCenter430 <titan032000@gmail.com> * fix: retire timed-out codex app-server clients * test: tighten qa lab runtime assertions * test: check security fix outputs * test: verify extension runtime messages * feat(wake): expose typed sessionKey on wake protocol + system event CLI * fix(gateway): await session_end during shutdown drain and track channel + compaction lifecycle paths (#57790) * test: guard talk consult call helper * fix(codex): scale context engine projection (#80761) * fix(codex): scale context engine projection * fix: document Codex context projection scaling * fix: document Codex context projection scaling * fix: document Codex context projection scaling * fix: document Codex context projection scaling * chore: align Codex projection changelog * chore: realign Codex projection changelog * fix: isolate Codex projection patch --------- Co-authored-by: Eva (agent) <eva+agent-78055@100yen.org> Co-authored-by: Josh Lehman <josh@martian.engineering> * refactor: move agent runtime state toward piless * refactor: remove cron session reaper * refactor: move session management to sqlite * refactor: finish database-first state migration * chore: refresh generated sqlite db types * refactor: remove stale file-backed shims * test: harden kysely type coverage # Conflicts: # .agents/skills/kysely-database-access/SKILL.md # src/infra/kysely-sync.types.test.ts # src/proxy-capture/store.sqlite.test.ts # src/state/openclaw-agent-db.test.ts # src/state/openclaw-state-db.test.ts * refactor: remove cron store path runtime * refactor: keep compaction transcript handles out of session rows * refactor: derive embedded transcripts from sqlite identity * refactor: remove embedded transcript locator handoff * refactor: remove runtime transcript file bridges * refactor: remove transcript file handoffs * refactor: remove MSTeams legacy learning key fallback * refactor: store model catalog config in sqlite * refactor: use sqlite model catalog at runtime # Conflicts: # docs/cli/secrets.md # docs/gateway/authentication.md # docs/gateway/secrets.md * fix: keep oauth sibling sync sqlite-local # Conflicts: # src/commands/onboard-auth.test.ts * refactor: remove task session store maintenance # Conflicts: # src/commands/tasks.ts * refactor: keep diagnostics in state sqlite * refactor: enforce database-first runtime state * refactor: consolidate sqlite runtime state * Show Codex subscription reset times in channel errors (#80456) * fix(codex): refresh subscription limit resets * fix(codex): format reset times for channels * Update CHANGELOG with latest changes and fixes Updated CHANGELOG with recent fixes and improvements. * fix(codex): keep command load failures on codex surface * fix(codex): format account rate limits as rows * fix(codex): summarize account limits as usage status * fix(codex): simplify account limit status * test: tighten subagent announce queue assertion * test: tighten session delete lifecycle assertions * test: tighten cron ops assertions * fix: track cron execution milestones * test: tighten hermes secret assertions * test: assert matrix sync store payloads * test: assert config compat warnings * fix(codex): align btw side thread semantics * fix(codex): honor codex fallback blocking * fix(agents): avoid Pi resource discovery stalls * test: tighten codex event assertions * test: tighten cron assertions * Fix Codex app-server OAuth harness auth * refactor: move agent runtime state toward piless * refactor: move device and push state to sqlite * refactor: move runtime json state imports to doctor * refactor: finish database-first state migration * chore: refresh generated sqlite db types * refactor: clarify cron sqlite store keys * refactor: remove stale file-backed shims * refactor: bind codex runtime state by session id * test: expect sqlite trajectory branch export * refactor: rename session row helpers * fix: keep legacy device identity import in doctor * refactor: enforce database-first runtime state * refactor: consolidate sqlite runtime state * build: align pi contract wrappers * chore: repair database-first rebase * refactor: remove session file test contracts * test: update gateway session expectations * refactor: stop routing from session compatibility shadows * refactor: stop persisting session route shadows * refactor: use typed delivery context in clients * refactor: stop echoing session route shadows * refactor: repair embedded runner rebase imports # Conflicts: # src/agents/pi-embedded-runner/run/attempt.tool-call-argument-repair.ts * refactor: align pi contract imports * refactor: satisfy kysely sync helper guard * refactor: remove file transcript bridge remnants * refactor: remove session locator compatibility * refactor: remove session file test contracts * refactor: keep rebase database-first clean * refactor: remove session file assumptions from e2e * docs: clarify database-first goal state * test: remove legacy store markers from sqlite runtime tests * refactor: remove legacy store assumptions from runtime seams * refactor: align sqlite runtime helper seams * test: update memory recall sqlite audit mock * refactor: align database-first runtime type seams * test: clarify doctor cron legacy store names * fix: preserve sqlite session route projections * test: fix copilot token cache test syntax * docs: update database-first proof status * test: align database-first test fixtures * docs: update database-first proof status * refactor: clean extension database-first drift * test: align agent session route proof * test: clarify doctor legacy path fixtures * chore: clean database-first changed checks * chore: repair database-first rebase markers * build: allow baileys git subdependency * chore: repair exp-vfs rebase drift * chore: finish exp-vfs rebase cleanup * chore: satisfy rebase lint drift * chore: fix qqbot rebase type seam * chore: fix rebase drift leftovers * fix: keep auth profile oauth secrets out of sqlite * fix: repair rebase drift tests * test: stabilize pairing request ordering * test: use source manifests in plugin contract checks * fix: restore gateway session metadata after rebase * fix: repair database-first rebase drift * fix: clean up database-first rebase fallout * test: stabilize line quick reply receipt time * fix: repair extension rebase drift * test: keep transcript redaction tests sqlite-backed * fix: carry injected transcript redaction through sqlite * chore: clean database branch rebase residue * fix: repair database branch CI drift * fix: repair database branch CI guard drift * fix: stabilize oauth tls preflight test * test: align database branch fast guards * test: repair build artifact boundary guards * chore: clean changelog rebase markers --------- Co-authored-by: pashpashpash <nik@vault77.ai> Co-authored-by: Eva <eva@100yen.org> Co-authored-by: stainlu <stainlu@newtype-ai.org> Co-authored-by: Jason Zhou <jason.zhou.design@gmail.com> Co-authored-by: Ruben Cuevas <hi@rubencu.com> Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com> Co-authored-by: Shakker <shakkerdroid@gmail.com> Co-authored-by: Kaspre <36520309+Kaspre@users.noreply.github.com> Co-authored-by: dataCenter430 <titan032000@gmail.com> Co-authored-by: Kaspre <kaspre@gmail.com> Co-authored-by: pandadev66 <nova.full.stack@outlook.com> Co-authored-by: Eva <admin@100yen.org> Co-authored-by: Eva (agent) <eva+agent-78055@100yen.org> Co-authored-by: Josh Lehman <josh@martian.engineering> Co-authored-by: jeffjhunter <support@aipersonamethod.com>
18 KiB
summary, read_when, title, sidebarTitle
| summary | read_when | title | sidebarTitle | |||
|---|---|---|---|---|---|---|
| Host exec approvals: policy knobs, allowlists, and the YOLO/strict workflow |
|
Exec approvals | Exec approvals |
Exec approvals are the companion app / node host guardrail for letting
a sandboxed agent run commands on a real host (gateway or node). A
safety interlock: commands are allowed only when policy + allowlist +
(optional) user approval all agree. Exec approvals stack on top of
tool policy and elevated gating (unless elevated is set to full, which
skips approvals).
Inspecting the effective policy
| Command | What it shows |
|---|---|
openclaw approvals get / --gateway / --node <id|name|ip> |
Requested policy, host policy sources, and the effective result. |
openclaw exec-policy show |
Local-machine merged view. |
openclaw exec-policy set / preset |
Synchronize the local requested policy with local host approvals state in one step. |
When a local scope requests host=node, exec-policy show reports that
scope as node-managed at runtime instead of pretending the local
approvals state is the source of truth.
If the companion app UI is not available, any request that would
normally prompt is resolved by the ask fallback (default: deny).
Where it applies
Exec approvals are enforced locally on the execution host:
- Gateway host →
openclawprocess on the gateway machine. - Node host → node runner (macOS companion app or headless node host).
Trust model
- Gateway-authenticated callers are trusted operators for that Gateway.
- Paired nodes extend that trusted operator capability onto the node host.
- Exec approvals reduce accidental execution risk, but are not a per-user auth boundary or filesystem read-only policy.
- Once approved, a command can mutate files according to the selected host or sandbox filesystem permissions.
- Approved node-host runs bind canonical execution context: canonical cwd, exact argv, env binding when present, and pinned executable path when applicable.
- For shell scripts and direct interpreter/runtime file invocations, OpenClaw also tries to bind one concrete local file operand. If that bound file changes after approval but before execution, the run is denied instead of executing drifted content.
- File binding is intentionally best-effort, not a complete semantic model of every interpreter/runtime loader path. If approval mode cannot identify exactly one concrete local file to bind, it refuses to mint an approval-backed run instead of pretending full coverage.
macOS split
- The node host service forwards
system.runto the macOS app over local IPC. - The macOS app enforces approvals and executes the command in UI context.
Settings and storage
Approvals live in the local SQLite state database on the execution host:
~/.openclaw/state/openclaw.sqlite
Legacy ~/.openclaw/exec-approvals.json files are migration inputs for
openclaw doctor --fix. The logical record keeps the same JSON shape:
{
"version": 1,
"socket": {
"path": "~/.openclaw/exec-approvals.sock",
"token": "base64url-token"
},
"defaults": {
"security": "deny",
"ask": "on-miss",
"askFallback": "deny",
"autoAllowSkills": false
},
"agents": {
"main": {
"security": "allowlist",
"ask": "on-miss",
"askFallback": "deny",
"autoAllowSkills": true,
"allowlist": [
{
"id": "B0C8C0B3-2C2D-4F8A-9A3C-5A4B3C2D1E0F",
"pattern": "~/Projects/**/bin/rg",
"source": "allow-always",
"commandText": "rg -n TODO",
"lastUsedAt": 1737150000000,
"lastUsedCommand": "rg -n TODO",
"lastResolvedPath": "/Users/user/Projects/.../bin/rg"
}
]
}
}
}
Policy knobs
exec.security
- `deny` - block all host exec requests.
- `allowlist` - allow only allowlisted commands.
- `full` - allow everything (equivalent to elevated).
exec.ask
- `off` - never prompt.
- `on-miss` - prompt only when the allowlist does not match.
- `always` - prompt on every command. `allow-always` durable trust does **not** suppress prompts when effective ask mode is `always`.
askFallback
Resolution when a prompt is required but no UI is reachable.
deny- block.allowlist- allow only if allowlist matches.full- allow.
tools.exec.strictInlineEval
When `true`, OpenClaw treats inline code-eval forms as approval-only
even if the interpreter binary itself is allowlisted. Defense-in-depth
for interpreter loaders that do not map cleanly to one stable file
operand.
Examples that strict mode catches:
python -cnode -e,node --eval,node -pruby -eperl -e,perl -Ephp -rlua -eosascript -e
In strict mode these commands still need explicit approval, and
allow-always does not persist new allowlist entries for them
automatically.
tools.exec.commandHighlighting
Controls only presentation in exec approval prompts. When enabled,
OpenClaw may attach parser-derived command spans so Web approval
prompts can highlight command tokens. Set it to `true` to enable
command text highlighting.
This setting does not change security, ask, allowlist matching,
strict inline-eval behavior, approval forwarding, or command execution.
It can be set globally under tools.exec.commandHighlighting or per
agent under agents.list[].tools.exec.commandHighlighting.
YOLO mode (no-approval)
If you want host exec to run without approval prompts, you must open
both policy layers - requested exec policy in OpenClaw config
(tools.exec.*) and host-local approvals policy in SQLite.
YOLO is the default host behavior unless you tighten it explicitly:
| Layer | YOLO setting |
|---|---|
tools.exec.security |
full on gateway/node |
tools.exec.ask |
off |
Host askFallback |
full |
tools.exec.host=autochooses where exec runs: sandbox when available, otherwise gateway.- YOLO chooses how host exec is approved:
security=fullplusask=off. - In YOLO mode, OpenClaw does not add a separate heuristic command-obfuscation approval gate or script-preflight rejection layer on top of the configured host exec policy.
autodoes not make gateway routing a free override from a sandboxed session. A per-callhost=noderequest is allowed fromauto;host=gatewayis only allowed fromautowhen no sandbox runtime is active. For a stable non-auto default, settools.exec.hostor use/exec host=...explicitly.
CLI-backed providers that expose their own noninteractive permission mode
can follow this policy. Claude CLI adds
--permission-mode bypassPermissions when OpenClaw's requested exec
policy is YOLO. Override that backend behavior with explicit Claude args
under agents.defaults.cliBackends.claude-cli.args / resumeArgs -
for example --permission-mode default, acceptEdits, or
bypassPermissions.
If you want a more conservative setup, tighten either layer back to
allowlist / on-miss or deny.
Persistent gateway-host "never prompt" setup
```bash openclaw config set tools.exec.host gateway openclaw config set tools.exec.security full openclaw config set tools.exec.ask off openclaw gateway restart ``` ```bash openclaw approvals set --stdin <<'EOF' { version: 1, defaults: { security: "full", ask: "off", askFallback: "full" } } EOF ```Local shortcut
openclaw exec-policy preset yolo
That local shortcut updates both:
- Local
tools.exec.host/security/ask. - Local approvals defaults.
It is intentionally local-only. To change gateway-host or node-host
approvals remotely, use openclaw approvals set --gateway or
openclaw approvals set --node <id|name|ip>.
Node host
For a node host, apply the same approvals state on that node instead:
openclaw approvals set --node <id|name|ip> --stdin <<'EOF'
{
version: 1,
defaults: {
security: "full",
ask: "off",
askFallback: "full"
}
}
EOF
openclaw exec-policydoes not synchronize node approvals.openclaw exec-policy set --host nodeis rejected.- Node exec approvals are fetched from the node at runtime, so node-targeted updates must use
openclaw approvals --node ....
Session-only shortcut
/exec security=full ask=offchanges only the current session./elevated fullis a break-glass shortcut that also skips exec approvals for that session.
If the host approvals state stays stricter than config, the stricter host policy still wins.
Allowlist (per agent)
Allowlists are per agent. If multiple agents exist, switch which agent you are editing in the macOS app. Patterns are glob matches.
Patterns can be resolved binary path globs or bare command-name globs.
Bare names match only commands invoked through PATH, so rg can match
/opt/homebrew/bin/rg when the command is rg, but not ./rg or
/tmp/rg. Use a path glob when you want to trust one specific binary
location.
Legacy agents.default entries are migrated to agents.main on load.
Shell chains such as echo ok && pwd still need every top-level segment
to satisfy allowlist rules.
Examples:
rg~/Projects/**/bin/peekaboo~/.local/bin/*/opt/homebrew/bin/rg
Restricting arguments with argPattern
Add argPattern when an allowlist entry should match a binary and a
specific argument shape. OpenClaw evaluates the regular expression
against the parsed command arguments, excluding the executable token
(argv[0]). For hand-authored entries, arguments are joined with a
single space, so anchor the pattern when you need an exact match.
{
"version": 1,
"agents": {
"main": {
"allowlist": [
{
"pattern": "python3",
"argPattern": "^safe\\.py$"
}
]
}
}
}
That entry allows python3 safe.py; python3 other.py is an allowlist
miss. If a path-only entry for the same binary is also present, unmatched
arguments can still fall back to that path-only entry. Omit the path-only
entry when the goal is to restrict the binary to the declared arguments.
Entries saved by approval flows can use an internal separator format for
exact argv matching. Prefer the UI or approval flow to regenerate those
entries instead of hand-editing the encoded value. If OpenClaw cannot
parse argv for a command segment, entries with argPattern do not match.
Each allowlist entry supports:
| Field | Meaning |
|---|---|
pattern |
Resolved binary path glob or bare command-name glob |
argPattern |
Optional argv regex; omitted entries are path-only |
id |
Stable UUID used for UI identity |
source |
Entry source, such as allow-always |
commandText |
Command text captured when an approval flow created the entry |
lastUsedAt |
Last-used timestamp |
lastUsedCommand |
Last command that matched |
lastResolvedPath |
Last resolved binary path |
Auto-allow skill CLIs
When Auto-allow skill CLIs is enabled, executables referenced by
known skills are treated as allowlisted on nodes (macOS node or headless
node host). This uses skills.bins over the Gateway RPC to fetch the
skill bin list. Disable this if you want strict manual allowlists.
Safe bins and approval forwarding
For safe bins (the stdin-only fast-path), interpreter binding details, and how to forward approval prompts to Slack/Discord/Telegram (or run them as native approval clients), see Exec approvals - advanced.
Control UI editing
Use the Control UI → Nodes → Exec approvals card to edit defaults, per-agent overrides, and allowlists. Pick a scope (Defaults or an agent), tweak the policy, add/remove allowlist patterns, then Save. The UI shows last-used metadata per pattern so you can keep the list tidy.
The target selector chooses Gateway (local approvals) or a Node.
Nodes must advertise system.execApprovals.get/set (macOS app or
headless node host). If a node does not advertise exec approvals yet,
upgrade the node host and use openclaw approvals set --node ....
CLI: openclaw approvals supports gateway or node editing - see
Approvals CLI.
Approval flow
When a prompt is required, the gateway broadcasts
exec.approval.requested to operator clients. The Control UI and macOS
app resolve it via exec.approval.resolve, then the gateway forwards the
approved request to the node host.
For host=node, approval requests include a canonical systemRunPlan
payload. The gateway uses that plan as the authoritative
command/cwd/session context when forwarding approved system.run
requests.
That matters for async approval latency:
- The node exec path prepares one canonical plan up front.
- The approval record stores that plan and its binding metadata.
- Once approved, the final forwarded
system.runcall reuses the stored plan instead of trusting later caller edits. - If the caller changes
command,rawCommand,cwd,agentId, orsessionKeyafter the approval request was created, the gateway rejects the forwarded run as an approval mismatch.
System events
Exec lifecycle is surfaced as system messages:
Exec running(only if the command exceeds the running notice threshold).Exec finished.Exec denied.
These are posted to the agent's session after the node reports the event.
Gateway-host exec approvals emit the same lifecycle events when the
command finishes (and optionally when running longer than the threshold).
Approval-gated execs reuse the approval id as the runId in these
messages for easy correlation.
Denied approval behavior
When an async exec approval is denied, OpenClaw prevents the agent from reusing output from any earlier run of the same command in the session. The denial reason is passed with explicit guidance that no command output is available, which stops the agent from claiming there is new output or repeating the denied command with stale results from a prior successful run.
Implications
fullis powerful; prefer allowlists when possible.askkeeps you in the loop while still allowing fast approvals.- Per-agent allowlists prevent one agent's approvals from leaking into others.
- Approvals only apply to host exec requests from authorized senders. Unauthorized senders cannot issue
/exec. /exec security=fullis a session-level convenience for authorized operators and skips approvals by design. To hard-block host exec, set approvals security todenyor deny theexectool via tool policy.