openclaw - ✅(Solved) Fix [Bug]: exec tool always uses security=deny regardless of tools.exec.security config (v2026.4.9) [4 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#64361Fetched 2026-04-11 06:15:12
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
0
Timeline (top)
cross-referenced ×3labeled ×3referenced ×2commented ×1

Error Message

14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"} 14:46:09+00:00 warn gateway/ws {"subsystem":"gateway/ws"} unauthorized conn=bb6d6d5c-43ea-4a00-861d-87a6d9c9424f remote=127.0.0.1 client=openclaw-control-ui webchat vcontrol-ui reason=token_mismatch 14:46:09+00:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"unauthorized","handshake":"failed","durationMs":8,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"432da20b-8465-43cc-aa3f-13eee16b5724","host":"127.0.0.1:18789","origin":"http://127.0.0.1:18789","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36","authMode":"token","authProvided":"token","authReason":"token_mismatch","allowTailscale":true,"client":"openclaw-control-ui","mode":"webchat","version":"control-ui"} closed before connect conn=bb6d6d5c-43ea-4a00-861d-87a6d9c9424f remote=127.0.0.1 fwd=n/a origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 code=1008 reason=unauthorized: gateway token mismatch (open the dashboard URL and paste the token in Control UI settings) 14:46:19+00:00 warn gateway/tailscale {"subsystem":"gateway/tailscale"} serve failed: Command failed: /usr/local/bin/tailscale serve --bg --yes 18789 14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"} 14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"} 14:47:25+00:00 warn Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config) 14:47:25+00:00 warn Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config)

Root Cause

🦞 OpenClaw 2026.4.9 (0512059) One CLI to rule them all, and one more restart because you changed the port.

Fix Action

Fix / Workaround

14:46:19+00:00 info gateway {"subsystem":"gateway"} starting channels and sidecars... 14:46:19+00:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ node.list 1111ms conn=33308e6f…3b87 id=9fee01fe…746e 14:46:19+00:00 info gateway/hooks {"subsystem":"gateway/hooks"} loaded 4 internal hook handlers 14:46:19+00:00 info gateway/channels/feishu {"subsystem":"gateway/channels/feishu"} starting feishu[default] (mode: websocket) 14:46:19+00:00 info gateway/channels/feishu {"subsystem":"gateway/channels/feishu"} feishu[default]: message dedup enabled (ttl=43200000ms, max=5000) 14:46:19+00:00 info gateway/channels/feishu {"subsystem":"gateway/channels/feishu"} feishu[default]: starting WebSocket connection... 14:46:19+00:00 info gateway/channels/openclaw-weixin restoreContextTokens: restored 1 tokens for account=5591f2a7cf65-im-bot 14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] starting weixin webhook 14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} [5591f2a7cf65-im-bot] starting weixin provider (https://ilinkai.weixin.qq.com) 14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} [5591f2a7cf65-im-bot] weixin logs: /tmp/openclaw/openclaw-2026-04-10.log 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} starting wecom[default] (name: 企业微信, mode: websocket) 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] [2026.4.8] Initializing WSClient with SDK... 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Event listeners attached: message + event(template_card_event) 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [WeCom] reqid-store warmup: no-op (disk storage removed) 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Warmed up 0 reqId entries from disk 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Establishing WebSocket connection... 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Connecting to WebSocket: wss://openws.work.weixin.qq.com... 14:46:19+00:00 info gateway/channels/openclaw-weixin [compat] Host OpenClaw 2026.4.9 >= 2026.3.22, OK. 14:46:19+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully 14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] waiting for Weixin runtime... 14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] Weixin runtime acquired, channelRuntime type: object 14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} weixin monitor started (https://ilinkai.weixin.qq.com, account=5591f2a7cf65-im-bot) 14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] Monitor started: baseUrl=https://ilinkai.weixin.qq.com timeoutMs=35000 14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} [weixin] resuming from previous sync buf (104 bytes) 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] WebSocket connection established, sending auth... 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Auth frame sent 14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] WebSocket connected 14:46:19+00:00 info [info]: [ 'event-dispatch is ready' ] 14:46:19+00:00 info [info]: [ '[ws]', 'receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in:\n' + ' Developer Console(开发者后台) \n' + ' ->\n' + ' Events and Callbacks(事件与回调)\n' + ' -> \n' + ' Mode of event/callback subscription(订阅方式)\n' + ' -> \n' + ' Receive events/callbacks through persistent connection(使用 长连接 接收事件/回调)' ] 14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Authentication successful 14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Heartbeat timer started, interval: 30000ms 14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Authenticated 14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Authentication successful 14:46:20+00:00 info [info]: [ '[ws]', 'ws client ready' ] 14:46:21+00:00 info gateway/channels/openclaw-weixin [compat] Host OpenClaw 2026.4.9 >= 2026.3.22, OK. 14:46:21+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully 14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"} 14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"} 14:47:25+00:00 warn Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config) 14:47:25+00:00 warn Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config)

PR fix notes

PR #16: fix(exec): honor user's tools.exec.security config setting

Description (problem / solution / changelog)

This PR was created incorrectly. Please refer to the correct PR at: https://github.com/Jimmy-xuzimo/openclaw/pull/16

Changed files

  • src/agents/bash-tools.exec-host-gateway.ts (modified, +2/-1)
  • src/agents/bash-tools.exec.ts (modified, +2/-1)

PR #64401: fix(exec): honor user's tools.exec.security config setting

Description (problem / solution / changelog)

Thank you for the detailed review. You raise valid concerns.

To answer your question about ~/.openclaw/exec-approvals.json - I don't have access to the reporter's config file, as this issue was reported by someone else.

However, your analysis is compelling:

  1. The safety invariant (host can always tighten, never broaden) should be preserved
  2. If approvals.agent.security resolves to "deny", that's likely a misconfiguration rather than a code bug
  3. My fix bypasses minSecurity entirely, which is too aggressive

I'll close this PR and investigate the actual root cause - which may be in how the default approval config is generated, or the reporter may have a stale exec-approvals.json file.

Thank you for the thorough review.

Changed files

  • src/agents/bash-tools.exec-host-shared.ts (modified, +5/-1)

PR #64626: fix(exec): honor user's explicit "full" when approvals default matches

Description (problem / solution / changelog)

Thank you for the detailed review.

After careful consideration, I agree with the P1 comment - my fix is too aggressive. If a host administrator explicitly sets defaults.security: "deny" to enforce a restrictive policy, my fix would incorrectly bypass that.

The issue is that if a user's exec-approvals.json has stale/incorrect defaults, that's a configuration problem, not a code bug. The minSecurity() function exists precisely to ensure host-wide policies are respected.

I should not have bypassed minSecurity() when the source is defaults.security, because defaults.security can be an explicit restrictive policy set by the host admin, not just an accidental fallback.

I'll close this PR. The real fix for users experiencing this issue is to:

  1. Run openclaw doctor to inspect the effective policy
  2. Fix any stale/incorrect values in ~/.openclaw/exec-approvals.json

Thank you for the thorough review - this was a valuable learning experience about the importance of preserving security invariants.

Changed files

  • src/agents/bash-tools.exec-host-shared.ts (modified, +13/-3)

PR #2: security(exec): attribute 'exec denied' to its config source (#64361)

Description (problem / solution / changelog)

Summary

  • Problem: when the exec tool is denied, the thrown error exec denied: host=<h> security=deny tells the operator nothing about which file or key actually caused the deny. Reporter in openclaw/openclaw#64361 had tools.exec.security: "full" in openclaw.json but still got blocked because their `~/.openclaw/exec-approvals.json` resolved to `security=deny`, and the error gave no way to find that out without reading the source.
  • Why it matters: `exec-approvals.json` is intentionally authoritative — `openclaw.json:tools.exec.security` can only tighten it, never loosen it (the comment at `src/agents/bash-tools.exec-host-shared.ts:202-203` calls this out explicitly). The security design is correct; the diagnostic is the gap.
  • What changed: extract the deny-error construction into `buildExecDeniedMessage(...)` and include which source resolved to deny (using the already-populated `approvals.agentSources.security`) plus whether the caller's requested `tools.exec.security` was looser, in which case the message explains that it cannot loosen the host-file setting.
  • What did NOT change (scope boundary): no change to the deny decision itself. `minSecurity(params.security, approvals.agent.security)` still wins; the host-file still wins on deny. The stable `exec denied: host=<h> security=deny` prefix is preserved so existing log/alert matchers keep working.

Closes #64361.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #64361
  • Related #
  • This PR fixes a bug or regression

Root Cause

  • Root cause: `resolveExecHostApprovalContext` correctly computes `hostSecurity = minSecurity(caller, hostFile)` and throws when the intersection is `deny`, but the thrown `Error` carries only the host string — no source attribution. The attribution data (`approvals.agentSources.security`) is already computed by `resolveExecApprovals` for exactly this purpose (it was added for the exec-policy CLI), so plumbing it into the error is a pure diagnostic improvement.
  • Missing detection / guardrail: no test was asserting that the deny error tells operators why. Added three.
  • Contributing context: reporter in #64361 spent real debugging time (rebooting, hot-reload, killing processes) on what turned out to be a two-config-source problem the error message didn't surface.

Regression Test Plan

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: `src/agents/bash-tools.exec-host-shared.test.ts` — added regression tests in the existing `resolveExecHostApprovalContext` describe and a new `buildExecDeniedMessage` describe.
  • Scenario the test should lock in:
    • exec-approvals.json security=deny + config tools.exec.security=full → error names the exec-approvals source and explains config cannot loosen
    • agentSources missing (older callers) → fallback attribution still names exec-approvals.json
    • exec-approvals.json relaxed + caller requested deny → attribution swings to the config side
  • Why this is the smallest reliable guardrail: these three cases exercise both attribution branches and the fallback, matching the decision table in `buildExecDeniedMessage`.
  • Existing test that already covers this: none — the pre-existing tests only assert the numeric outcome (hostSecurity / hostAsk / askFallback), not the error text.
  • If no new test is added: N/A, tests added.

User-visible / Behavior Changes

  • Error text change: `exec denied: host=gateway security=deny` now looks like `exec denied: host=gateway security=deny — exec-approvals.json security=deny (agents.default.security); openclaw.json tools.exec.security=full cannot loosen this`.
  • The prefix `exec denied: host=<h> security=deny` is preserved. Anything that keyed on the exact previous full string will need to either match the prefix or accept a trailing diagnostic clause.

Diagram

```text Before: [exec call] -> [resolver: min(config, host-file)=deny] -> [throw "exec denied: host=gateway security=deny"] -> [operator has no idea which file]

After: [exec call] -> [resolver: min(config, host-file)=deny] -> [throw "exec denied: host=gateway security=deny — <attribution>"] -> [operator fixes the right file] ```

Security Impact

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? Diagnostic only — the deny decision is unchanged. No code path now allows exec that didn't allow it before.
  • Data access scope changed? No
  • If any `Yes`, explain risk + mitigation: N/A

The new error text includes the exec-approvals source key (e.g. `agents.default.security`) and the configured `tools.exec.security` value. Neither is a secret. No paths, hostnames, or user-supplied strings are echoed.

Repro + Verification

Environment

  • OS: macOS (Darwin)
  • Runtime/container: local Node 22 via pnpm 10
  • Model/provider: N/A
  • Integration/channel (if any): N/A
  • Relevant config (redacted): `openclaw.json:tools.exec.security="full"` + a default-seeded `~/.openclaw/exec-approvals.json` with `security="deny"`

Steps

  1. Set `tools.exec.security: "full"` in openclaw.json
  2. Have `~/.openclaw/exec-approvals.json` resolve `agent.security` to `"deny"` (e.g. default-seeded)
  3. Trigger an exec via the gateway
  4. Before this PR, the error said `exec denied: host=gateway security=deny` and stopped there.

Expected

``` exec denied: host=gateway security=deny — exec-approvals.json security=deny (agents.default.security); openclaw.json tools.exec.security=full cannot loosen this ```

Actual

Matches Expected after this PR. Verified via the three new unit tests.

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

``` $ pnpm test src/agents/bash-tools.exec-host-shared.test.ts Test Files 1 passed (1) Tests 16 passed (16)

$ pnpm check Import cycle check: 0 Madge import cycle check: 0 tsgo: clean oxlint: 0 warnings, 0 errors ```

Human Verification

  • Verified scenarios:
    • reporter's scenario (openclaw.json says full, exec-approvals.json says deny) — error now names the source
    • opposite direction (openclaw.json says deny, exec-approvals.json relaxed) — attribution swings to the config
    • agentSources missing on the resolver result — attribution falls back cleanly
    • stable prefix preserved
  • Edge cases checked:
    • no `agentSources` field present → no `(...)` parenthetical, but the main clause is still emitted
    • `requestedSecurity === "deny"` path → "openclaw.json tools.exec.security=deny" branch
  • What I did not verify:
    • live gateway restart path with a real exec-approvals.json on disk — the fix is mechanical and fully covered by unit tests against the existing resolver contract, so a live repro wasn't necessary to validate the change.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes — the error's stable prefix is preserved; the trailing diagnostic is additive.
  • Config/env changes? No
  • Migration needed? No
  • If yes, exact upgrade steps: N/A

Risks and Mitigations

  • Risk: consumers that match the exact old error string fail.
    • Mitigation: the `exec denied: host=<h> security=deny` prefix is preserved and is what existing log matchers in the tree key on. I grepped for the old exact string and the hits are all either this file itself or docs/CHANGELOG.
  • Risk: the attribution could leak a user-defined agent id via `agents.<agentKey>.security`.
    • Mitigation: agent ids are config-provided identifiers already visible in `openclaw status` and logs; they aren't secret. The source string is a path-like key into the user's own `exec-approvals.json`, not any value.

Changed files

  • src/agents/bash-tools.exec-host-shared.test.ts (modified, +125/-1)
  • src/agents/bash-tools.exec-host-shared.ts (modified, +48/-1)

Code Example

$ openclaw config get tools.exec
{
 "security": "full"
}

### Expected behavior

配置值确认为 "full",但 exec 工具仍然使用 deny。

尝试过的修复
修改 tools.exec.security: "full" 后热重载(SIGUSR1完全重启 gateway 进程
重启电脑
杀掉其他 OpenClaw 相关进程,只保留 gateway
均无效。

### Actual behavior

tools.exec.security: "full" 应该允许 exec 工具在 gateway host 上执行任意命令。

### OpenClaw version

2026.4.9

### Operating system

maxOS 15.7.3

### Install method

npm全局

### Model

MiniMax-M2.5-highspeed

### Provider / routing chain

minimax

### Additional provider/model setup details

minimax

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

问题描述

exec 工具无论配置如何都返回 security=deny

即使 tools.exec.security 已设置为 "full",exec 调用仍然报错: exec denied: host=gateway security=deny

环境

  • OpenClaw 版本:2026.4.9 (0512059)
  • 操作系统:macOS Darwin 24.6.0 (arm64)
  • Gateway 进程:openclaw-gateway (PID 734)
  • 配置文件:~/.openclaw/openclaw.json

复现步骤

  1. 在 openclaw.json 中设置 tools.exec.security: "full"
  2. 重启 gateway:pkill -f "openclaw-gateway" && openclaw gateway start
  3. 通过 webchat 调用任何 exec 命令

实际结果

exec 返回错误:

Steps to reproduce

exec denied: host=gateway security=deny

日志证据

14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"}

配置确认

$ openclaw config get tools.exec
{
 "security": "full"
}

### Expected behavior

配置值确认为 "full",但 exec 工具仍然使用 deny。

尝试过的修复
修改 tools.exec.security: "full" 后热重载(SIGUSR1)
完全重启 gateway 进程
重启电脑
杀掉其他 OpenClaw 相关进程,只保留 gateway
均无效。

### Actual behavior

tools.exec.security: "full" 应该允许 exec 工具在 gateway host 上执行任意命令。

### OpenClaw version

2026.4.9

### Operating system

maxOS 15.7.3

### Install method

npm全局

### Model

MiniMax-M2.5-highspeed

### Provider / routing chain

minimax

### Additional provider/model setup details

minimax

### Logs, screenshots, and evidence

```shell
Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config)

🦞 OpenClaw 2026.4.9 (0512059)
One CLI to rule them all, and one more restart because you changed the port.

◇ Config warnings ────────────────────────────────────────────────────────╮
│ │
│ - plugins.entries.weixin: plugin not found: weixin (stale config entry │
│ ignored; remove it from plugins config)│ │
├──────────────────────────────────────────────────────────────────────────╯
Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config)
Log file: /tmp/openclaw/openclaw-2026-04-10.log
14:46:09+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully
14:46:09+00:00 info gateway/channels/openclaw-weixin [compat] Host OpenClaw 2026.4.9 >= 2026.3.22, OK.
14:46:09+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully
14:46:09+00:00 info gateway/channels/openclaw-weixin [compat] Host OpenClaw 2026.4.9 >= 2026.3.22, OK.
14:46:09+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully
14:46:09+00:00 warn gateway/ws {"subsystem":"gateway/ws"} unauthorized conn=bb6d6d5c-43ea-4a00-861d-87a6d9c9424f remote=127.0.0.1 client=openclaw-control-ui webchat vcontrol-ui reason=token_mismatch
14:46:09+00:00 warn gateway/ws {"subsystem":"gateway/ws"} {"cause":"unauthorized","handshake":"failed","durationMs":8,"lastFrameType":"req","lastFrameMethod":"connect","lastFrameId":"432da20b-8465-43cc-aa3f-13eee16b5724","host":"127.0.0.1:18789","origin":"http://127.0.0.1:18789","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36","authMode":"token","authProvided":"token","authReason":"token_mismatch","allowTailscale":true,"client":"openclaw-control-ui","mode":"webchat","version":"control-ui"} closed before connect conn=bb6d6d5c-43ea-4a00-861d-87a6d9c9424f remote=127.0.0.1 fwd=n/a origin=http://127.0.0.1:18789 host=127.0.0.1:18789 ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 code=1008 reason=unauthorized: gateway token mismatch (open the dashboard URL and paste the token in Control UI settings)
14:46:16+00:00 info gateway/ws {"subsystem":"gateway/ws"} webchat connected conn=33308e6f-3650-448d-8526-e65025683b87 remote=127.0.0.1 client=openclaw-control-ui webchat vcontrol-ui
14:46:19+00:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ models.list 2714ms conn=33308e6f…3b87 id=f10d71e6…39df
14:46:19+00:00 warn gateway/tailscale {"subsystem":"gateway/tailscale"} serve failed: Command failed: /usr/local/bin/tailscale serve --bg --yes 18789

14:46:19+00:00 info gateway {"subsystem":"gateway"} starting channels and sidecars...
14:46:19+00:00 info gateway/ws {"subsystem":"gateway/ws"} ⇄ res ✓ node.list 1111ms conn=33308e6f…3b87 id=9fee01fe…746e
14:46:19+00:00 info gateway/hooks {"subsystem":"gateway/hooks"} loaded 4 internal hook handlers
14:46:19+00:00 info gateway/channels/feishu {"subsystem":"gateway/channels/feishu"} starting feishu[default] (mode: websocket)
14:46:19+00:00 info gateway/channels/feishu {"subsystem":"gateway/channels/feishu"} feishu[default]: message dedup enabled (ttl=43200000ms, max=5000)
14:46:19+00:00 info gateway/channels/feishu {"subsystem":"gateway/channels/feishu"} feishu[default]: starting WebSocket connection...
14:46:19+00:00 info gateway/channels/openclaw-weixin restoreContextTokens: restored 1 tokens for account=5591f2a7cf65-im-bot
14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] starting weixin webhook
14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} [5591f2a7cf65-im-bot] starting weixin provider (https://ilinkai.weixin.qq.com)
14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} [5591f2a7cf65-im-bot] weixin logs: /tmp/openclaw/openclaw-2026-04-10.log
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} starting wecom[default] (name: 企业微信, mode: websocket)
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] [2026.4.8] Initializing WSClient with SDK...
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Event listeners attached: message + event(template_card_event)
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [WeCom] reqid-store warmup: no-op (disk storage removed)
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Warmed up 0 reqId entries from disk
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Establishing WebSocket connection...
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Connecting to WebSocket: wss://openws.work.weixin.qq.com...
14:46:19+00:00 info gateway/channels/openclaw-weixin [compat] Host OpenClaw 2026.4.9 >= 2026.3.22, OK.
14:46:19+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully
14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] waiting for Weixin runtime...
14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] Weixin runtime acquired, channelRuntime type: object
14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} weixin monitor started (https://ilinkai.weixin.qq.com, account=5591f2a7cf65-im-bot)
14:46:19+00:00 info gateway/channels/openclaw-weixin/5591f2a7cf65-im-bot [5591f2a7cf65-im-bot] Monitor started: baseUrl=https://ilinkai.weixin.qq.com timeoutMs=35000
14:46:19+00:00 info gateway/channels/openclaw-weixin {"subsystem":"gateway/channels/openclaw-weixin"} [weixin] resuming from previous sync buf (104 bytes)
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] WebSocket connection established, sending auth...
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Auth frame sent
14:46:19+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] WebSocket connected
14:46:19+00:00 info [info]: [ 'event-dispatch is ready' ]
14:46:19+00:00 info [info]: [
'[ws]',
'receive events or callbacks through persistent connection only available in self-build & Feishu app, Configured in:\n' +
' Developer Console(开发者后台) \n' +
' ->\n' +
' Events and Callbacks(事件与回调)\n' +
' -> \n' +
' Mode of event/callback subscription(订阅方式)\n' +
' -> \n' +
' Receive events/callbacks through persistent connection(使用 长连接 接收事件/回调)'
]
14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Authentication successful
14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Heartbeat timer started, interval: 30000ms
14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Authenticated
14:46:20+00:00 info gateway/channels/wecom {"subsystem":"gateway/channels/wecom"} [default] Authentication successful
14:46:20+00:00 info [info]: [ '[ws]', 'ws client ready' ]
14:46:21+00:00 info gateway/channels/openclaw-weixin [compat] Host OpenClaw 2026.4.9 >= 2026.3.22, OK.
14:46:21+00:00 info gateway/channels/openclaw-weixin [runtime] setWeixinRuntime called, runtime set successfully
14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"}
14:46:26+00:00 error [tools] exec failed: exec denied: host=gateway security=deny raw_params={"command":"echo "test" && whoami"}
14:47:25+00:00 warn Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config)
14:47:25+00:00 warn Config warnings:\n- plugins.entries.weixin: plugin not found: weixin (stale config entry ignored; remove it from plugins config)

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The exec tool returns security=deny despite tools.exec.security being set to "full", suggesting a potential configuration or permission issue.

Guidance

  • Verify that the tools.exec.security configuration is correctly set to "full" in the openclaw.json file and that the file is being read correctly by the application.
  • Check the logs for any other error messages or warnings that may indicate a configuration or permission issue.
  • Try setting the tools.exec.security configuration to "full" using the openclaw config set command to ensure that the configuration is being set correctly.
  • Investigate the plugins.entries.weixin warning in the logs, as it may be related to the issue.

Example

No code example is provided as the issue seems to be related to configuration or permissions.

Notes

The issue may be related to a configuration or permission issue, and further investigation is needed to determine the root cause. The plugins.entries.weixin warning in the logs may be a red herring, but it's worth investigating to ensure that it's not related to the issue.

Recommendation

Apply a workaround by trying to set the tools.exec.security configuration to "full" using the openclaw config set command and then restarting the gateway process. If the issue persists, further investigation is needed to determine the root cause.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

配置值确认为 "full",但 exec 工具仍然使用 deny。

尝试过的修复 修改 tools.exec.security: "full" 后热重载(SIGUSR1) 完全重启 gateway 进程 重启电脑 杀掉其他 OpenClaw 相关进程,只保留 gateway 均无效。

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING