openclaw - 💡(How to fix) Fix [Bug]: exec-approvals.json defaults not honored — per-call parameters required to bypass allowlist [3 comments, 3 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#59338Fetched 2026-04-08 02:25:45
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
0
Timeline (top)
commented ×3labeled ×2closed ×1locked ×1

exec-approvals.json has correct defaults (ask: "off", security: "full", wildcard * pattern in allowlist), but the gateway does not honor them consistently. Exec calls from one channel (Telegram) fail with "exec denied: allowlist miss" while the identical agent on another channel (webchat) can force through by explicitly passing security: "full" and ask: "off" as per-call parameters.

Error Message

  • The MEMORY.md entry claiming this fix works has been propagating the error across sessions, causing repeated gateway failures.

Root Cause

exec-approvals.json has correct defaults (ask: "off", security: "full", wildcard * pattern in allowlist), but the gateway does not honor them consistently. Exec calls from one channel (Telegram) fail with "exec denied: allowlist miss" while the identical agent on another channel (webchat) can force through by explicitly passing security: "full" and ask: "off" as per-call parameters.

Fix Action

Fix / Workaround

  • The gateway ignores exec-approvals.json defaults for Telegram sessions
  • Webchat sessions can work around it by passing per-call parameters, but this is a workaround, not correct behavior
  • The agent should NOT need to pass per-call security parameters when exec-approvals.json already specifies them

Code Example

{
  "defaults": {
    "security": "full",
    "ask": "off",
    "askFallback": "full",
    "autoAllowSkills": true
  },
  "agents": {
    "main": {
      "security": "full",
      "ask": "off",
      "askFallback": "full",
      "autoAllowSkills": true,
      "allowlist": [
        { "pattern": "*" },
        { "pattern": "/bin/sh" },
        { "pattern": "/bin/bash" },
        { "pattern": "/bin/zsh" },
        { "pattern": "/**/*" }
      ]
    },
    "*": {
      "security": "full",
      "ask": "off",
      "allowlist": [
        { "pattern": "*" },
        { "pattern": "/**/*" }
      ]
    }
  }
}

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

exec-approvals.json has correct defaults (ask: "off", security: "full", wildcard * pattern in allowlist), but the gateway does not honor them consistently. Exec calls from one channel (Telegram) fail with "exec denied: allowlist miss" while the identical agent on another channel (webchat) can force through by explicitly passing security: "full" and ask: "off" as per-call parameters.

Steps to reproduce

  1. Configure exec-approvals.json as shown above (ask: off, wildcard allowlist)
  2. From Telegram channel, have the agent call exec with just the command (no per-call security parameters)
  3. Result: exec denied: allowlist miss
  4. From webchat channel, have the same agent call exec with explicit security: "full" and ask: "off" parameters on the tool call
  5. Result: Command executes successfully

Both channels use the same gateway, same agent (agent:main), same exec-approvals.json.

Expected behavior

  • exec-approvals.json defaults should be honored regardless of channel (Telegram, webchat, Discord)
  • If ask: "off" and wildcard * are in the allowlist, ALL exec calls should pass without per-call overrides
  • Channel should have no effect on exec permission resolution

Actual behavior

  • The gateway ignores exec-approvals.json defaults for Telegram sessions
  • Webchat sessions can work around it by passing per-call parameters, but this is a workaround, not correct behavior
  • The agent should NOT need to pass per-call security parameters when exec-approvals.json already specifies them

OpenClaw version

  • OpenClaw 2026.3.13

Operating system

  • macOS (arm64)

Install method

npm global

Model

anthropic/claude-opus-4.6

Provider / routing chain

openclaw ai gateway

Additional provider/model setup details

  • Two channels: webchat and Telegram

exec-approvals.json (correct, verified)

{
  "defaults": {
    "security": "full",
    "ask": "off",
    "askFallback": "full",
    "autoAllowSkills": true
  },
  "agents": {
    "main": {
      "security": "full",
      "ask": "off",
      "askFallback": "full",
      "autoAllowSkills": true,
      "allowlist": [
        { "pattern": "*" },
        { "pattern": "/bin/sh" },
        { "pattern": "/bin/bash" },
        { "pattern": "/bin/zsh" },
        { "pattern": "/**/*" }
      ]
    },
    "*": {
      "security": "full",
      "ask": "off",
      "allowlist": [
        { "pattern": "*" },
        { "pattern": "/**/*" }
      ]
    }
  }
}

Logs, screenshots, and evidence

Impact and severity

  • Telegram sessions cannot run exec commands (scripts, health checks, cron tasks that need exec)
  • Recurring 2-7 hour debugging sessions trying to fix config that is already correct
  • False fix (exec block in openclaw.json) breaks gateway startup

Additional information

  • Previously believed a top-level exec.defaults block in openclaw.json was the fix. This is wrongexec is not a valid key in openclaw.json and causes Config invalid: Unrecognized key: "exec" on gateway restart.
  • The MEMORY.md entry claiming this fix works has been propagating the error across sessions, causing repeated gateway failures.
  • This has been a recurring issue since March 17, 2026 (7+ hours debugging), reoccurred March 31 (2 hours), and again April 1.

Related issues

  • #59224 (exec-approvals not honored in isolated cron sessions)

extent analysis

TL;DR

The gateway may not be correctly parsing or applying the exec-approvals.json defaults for Telegram sessions, suggesting a potential issue with channel-specific configuration or handling.

Guidance

  • Verify that the exec-approvals.json file is correctly formatted and loaded by the gateway for all channels, including Telegram.
  • Check for any channel-specific overrides or configurations that might be interfering with the default settings.
  • Test whether the issue persists when using a different channel, such as Discord, to isolate if the problem is specific to Telegram.
  • Consider adding logging or debugging statements to the gateway to track how it is parsing and applying the exec-approvals.json settings for each channel.

Example

No specific code example is provided due to the lack of direct code references in the issue, but ensuring the exec-approvals.json is correctly referenced and parsed in the gateway's configuration loading process is crucial.

Notes

The issue seems to be related to how the gateway handles or applies the exec-approvals.json defaults across different channels. The fact that webchat sessions can bypass the issue by explicitly passing security parameters suggests a potential inconsistency in how these defaults are applied or recognized by the gateway for different channels.

Recommendation

Apply a workaround by explicitly passing security: "full" and ask: "off" parameters for exec calls from the Telegram channel until the root cause of the inconsistent default application is identified and fixed. This ensures that exec commands can be executed from Telegram while the underlying issue is investigated.

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

  • exec-approvals.json defaults should be honored regardless of channel (Telegram, webchat, Discord)
  • If ask: "off" and wildcard * are in the allowlist, ALL exec calls should pass without per-call overrides
  • Channel should have no effect on exec permission resolution

Still need to ship something?

×6

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

Back to top recommendations

TRENDING