Skip to content

[Bug]: Telegram DM exec requires approval despite allowlist + ask:off — works in webchat, not in Telegram #88773

Closed

Description

@ppmuzyk

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

In OpenClaw 2026.5.28, Telegram DM requires exec approval for allowlisted binaries (gog tasks add) despite tools.exec.ask: off, security: allowlist, and the binary in ~/.openclaw/exec-approvals.json allowlist — the same commands from webchat execute without approval.

Steps to reproduce

  1. Set tools.exec.security: allowlist, tools.exec.ask: off in config
  2. Add /usr/local/bin/gog to host allowlist: openclaw approvals allowlist add /usr/local/bin/gog
  3. Set host approvals defaults: security: allowlist, ask: off, askFallback: allowlist
  4. Restart gateway
  5. From webchat: run gog tasks add "" --title "test" → executes without approval ✅
  6. From Telegram DM (same user, main session): send "todo test" → agent runs gog tasks add → approval prompt appears ❌

Expected behavior

Telegram DM exec should respect the same policy as webchat. With security: allowlist, ask: off and gog allowlisted, gog tasks add from Telegram should execute without approval — consistent with webchat behavior and with earlier OpenClaw versions where this setup worked.

Actual behavior

Telegram DM always generates exec.approval.waitDecision for gog invocations. The approval prompt appears in webchat Control UI, not on Telegram. Gateway log shows: [exec] ignoring unprofiled safeBins entries (gog) followed by [ws] ⇄ res ✓ exec.approval.waitDecision for every Telegram-triggered exec.

OpenClaw version

2026.5.28 (e932160)

Operating system

RHEL EL10, kernel 6.12.0-211.18.1.el10_2.x86_64

Install method

npm global

Model

deepseek/deepseek-v4-pro

Provider / routing chain

openclaw → deepseek

Additional provider/model setup details

Default model is deepseek-v4-pro via deepseek API key (env: DEEPSEEK_API_KEY). No routing middleware, no gateway proxy. Config: models.providers.deepseek.apiKey: env:DEEPSEEK_API_KEY.

Logs, screenshots, and evidence

# Gateway log during Telegram exec:
[exec] ignoring unprofiled safeBins entries (gog); use allowlist or define tools.exec.safeBinProfiles.<bin>
[ws] ⇄ res ✓ exec.approval.waitDecision 3410ms conn=fb8a2892…2e17 id=28cf1c1d…e342

# Effective exec policy (shown by openclaw exec-policy show):
security=allowlist, ask=off

# Webchat gog tasks add — works:
$ gog tasks add "MTE4ODI2MDk1MDI4NDA5Njg1NTY6MDow" --title "TEST" --json
{"task":{"id":"Nno0UWdrS3Bkb3ctRUJKcQ","title":"TEST",...}}

# Telegram same command — requires approval, shows in webchat UI as:
"Exec approval needed — expires in 29m"

Impact and severity

  • Affected: Telegram DM user (single-owner bot setup)
  • Severity: High — blocks routine tasks (Google Tasks add/update) from Telegram
  • Frequency: 100% — every Telegram-triggered exec requires approval
  • Consequence: User must be at webchat Control UI to approve each command; "roaming assistant" workflow broken

Additional information

This setup worked in earlier OpenClaw versions (pre-2026.3.x) where Telegram DM exec honored allowlist + ask:off. Possibly related to #45464 (Telegram DM exec parity broken, 2026.3.12) and #68739 (execApprovals.enabled=false ignored, 2026.4.15). channels.telegram.execApprovals.enabled was set to false with no change in behavior.

Activity

  1. clawsweeper commented on May 31, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed May 31, 2026, 4:22 PM ET / 20:22 UTC.

    Summary
    Keep open. The report describes a current-release Telegram regression against documented exec approval semantics, and current main does not show a post-release fix for the Telegram/exec approval path.

    Reproducibility: no. high-confidence current-main reproduction was established in this read-only pass. The issue provides concrete v2026.5.28 steps and logs, and source inspection identifies the path where an allowlisted ask=off command should avoid exec.approval.waitDecision.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    A focused repair lane can investigate the Telegram-origin exec path and add regression coverage, but it must reproduce the policy mismatch before changing behavior.

    Review details

    Best possible solution:

    Restore channel-neutral exec policy evaluation so Telegram DM uses the same effective tools.exec and host allowlist decision as webchat, with no new config knob.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence current-main reproduction was established in this read-only pass. The issue provides concrete v2026.5.28 steps and logs, and source inspection identifies the path where an allowlisted ask=off command should avoid exec.approval.waitDecision.

    Is this the best way to solve the issue?

    Unclear until the Telegram-origin path is reproduced. The best repair should keep the existing policy model and fix the mismatch rather than adding a Telegram-specific config override.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The exact root cause is not isolated yet; the mismatch could be in Telegram-origin session/agent policy selection, allowlist path resolution, or approval delivery suppression.
    • Related closed Telegram exec approval reports show this area has had several overlapping fixes, so a repair should prove it does not regress native approval delivery or same-chat approval behavior.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against b0679d1f13da.

    Label changes

    Label changes:

    • add P1: A latest-release regression blocks a real Telegram DM agent workflow and forces approval from another UI surface.
    • add impact:security: The report concerns exec approval policy and allowlist enforcement, which is OpenClaw's host execution guardrail.
    • add impact:message-loss: The approval prompt is reported as surfacing in Control UI instead of the active Telegram DM workflow, leaving the channel user without the expected decision surface.
    • add issue-rating: 🦐 gold shrimp: Current issue advisory state selects this label.
    • add clawsweeper:needs-info: Current issue advisory state selects this label.

    Label justifications:

    • P1: A latest-release regression blocks a real Telegram DM agent workflow and forces approval from another UI surface.
    • impact:security: The report concerns exec approval policy and allowlist enforcement, which is OpenClaw's host execution guardrail.
    • impact:message-loss: The approval prompt is reported as surfacing in Control UI instead of the active Telegram DM workflow, leaving the channel user without the expected decision surface.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/agents/bash-tools.exec-host-gateway.test.ts
    • node scripts/run-vitest.mjs src/agents/agent-tools-agent-config.exec.test.ts
    • node scripts/run-vitest.mjs extensions/telegram/src/exec-approvals.test.ts
    • Run or attach live Telegram DM proof for an allowlisted ask=off exec path before handoff.

    What I checked:

    • Issue evidence: The reporter is on v2026.5.28 and gives a concrete differential repro: the same gog tasks add command runs from webchat but a Telegram DM turn emits exec.approval.waitDecision despite security=allowlist, ask=off, and an allowlisted /usr/local/bin/gog.
    • Documented exec policy contract: Docs state the effective policy is the stricter merge of tools.exec.* and host approvals, and exec.ask: off means never prompt while allowlist mode runs allowlisted commands. Public docs: docs/tools/exec-approvals.md. (docs/tools/exec-approvals.md:22, b0679d1f13da)
    • Gateway exec policy path: Current main computes exec security/ask from configured policy plus the host approvals file before gateway allowlist handling; this is the central path that should be channel-neutral. (src/agents/bash-tools.exec.ts:1436, b0679d1f13da)
    • Approval request trigger path: processGatewayAllowlist evaluates the host allowlist and only registers an approval request when requiresAsk is true, so a plain allowlisted command with effective ask=off should not reach exec.approval.waitDecision. (src/agents/bash-tools.exec-host-gateway.ts:339, b0679d1f13da)
    • Telegram approval boundary: Telegram approval code builds a channel-native approval profile and request handling, while docs say host exec policy still decides whether an approval is required and channel config controls delivery. (extensions/telegram/src/exec-approvals.ts:188, b0679d1f13da)
    • Main-vs-release check: No relevant Telegram exec approval or exec-policy fix appears between latest release v2026.5.28 and current main; the post-release changes in the searched surfaces are unrelated channel queue/auth/test work. (b0679d1f13da)

    Likely related people:

    • seonang: Authored the prior Telegram exec approval delivery and auto-resume fallback fix touching the same gateway exec approval follow-up path. (role: recent related fix author; confidence: medium; commits: 4207ca2eb881; files: src/agents/bash-tools.exec-host-gateway.ts, src/agents/bash-tools.exec-approval-followup.ts)
    • Harold Hunt: Authored the Telegram exec approvals integration work that connected Telegram approval delivery with the exec approval flow. (role: feature history contributor; confidence: medium; commits: de49a8b72c12; files: extensions/telegram/src/channel.ts, src/agents/bash-tools.exec-host-gateway.ts, src/infra/exec-approval-forwarder.ts)
    • Josh Lehman: Authored the Telegram topic routing fix for exec completions, which is adjacent to Telegram-origin exec follow-up behavior. (role: adjacent Telegram exec contributor; confidence: medium; commits: 29142a9d4764; files: src/agents/bash-tools.exec.ts, src/agents/bash-tools.exec-runtime.ts)
    • Tak Hoffman: Authored the local exec-policy CLI and related docs/tests that define how requested policy and host approvals are inspected. (role: exec policy tooling contributor; confidence: medium; commits: 4bf94aa0d669; files: src/cli/exec-policy-cli.ts, src/infra/exec-approvals-effective.ts, docs/tools/exec-approvals.md)
    • Peter Steinberger: Authored early fixes for default exec approvals agent resolution and honoring tools.exec.safeBins, both relevant to the report's policy and safe-bin evidence. (role: exec approvals default and safeBins history contributor; confidence: medium; commits: 2d583e877b60, 9450873c1b6a, a48694078171; files: src/infra/exec-approvals.ts, src/agents/pi-tools.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    on May 31, 2026
  3. added a commit that references this issue on Jun 3, 2026
    60dcaa3
  4. added a commit that references this issue on Jun 4, 2026
    0422e43
  5. locked as resolved and limited conversation to collaborators on Jun 6, 2026
  6. added a commit that references this issue on Jun 10, 2026
    b8c8680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions