openclaw - ✅(Solved) Fix [Bug]: Telegram exec approvals fail for macOS node commands while gateway approvals succeed [1 pull requests, 3 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#77656Fetched 2026-05-06 06:23:19
View on GitHub
Comments
3
Participants
2
Timeline
4
Reactions
2
Timeline (top)
commented ×3cross-referenced ×1

Telegram/native exec approval appears unreliable for commands targeting a macOS node. In the same Telegram session, a gateway-hosted command approval succeeded, but multiple approvals for the same command targeting a paired macOS node were reported as denied / invoke-failed / did not run, even after the user believed they had approved or sent the suggested /approve ... allow-always command.

This makes remote node administration via Telegram hard to trust: the assistant sees approval failures while the user believes approval was granted.

Root Cause

This is confusing for users and agents:

  • The user sees/uses an approval flow but the command never runs.
  • The assistant cannot tell whether the issue is Telegram command routing, approval expiry, node/gateway approval propagation, or allowlist persistence.
  • It creates a bad loop where the assistant keeps asking for approval and the user keeps approving, but the node command remains blocked.

PR fix notes

PR #78283: Allow no-device node exec approvals across backend calls

Description (problem / solution / changelog)

Fixes #77656.

Summary

  • stop treating transient websocket connId as the approval boundary for no-device node system.run approvals
  • preserve stable device-id binding when present
  • reject device-bound callers replaying no-device approvals
  • keep node id, command/binding, expiry, and allow-once consumption enforced

Verification

  • git diff --check
  • targeted test attempt: node scripts/test-projects.mjs src/gateway/node-invoke-system-run-approval.test.ts --maxWorkers=1
    • blocked by unrelated baseline import failure: Cannot find package '@openclaw/fs-safe/config' imported from src/infra/fs-safe-defaults.ts

Security note

No-device shared-auth backend calls do not have a stable device identity and use per-call websocket connections, so connId was a fake boundary. Device-bound approvals remain device-bound, and device-bound callers cannot replay no-device approval records.

Changed files

  • src/gateway/node-invoke-system-run-approval.test.ts (modified, +48/-0)
  • src/gateway/node-invoke-system-run-approval.ts (modified, +8/-8)

Code Example

brew list --cask keka >/dev/null 2>&1 || brew install --cask keka
RAW_BUFFERClick to expand / collapse

Summary

Telegram/native exec approval appears unreliable for commands targeting a macOS node. In the same Telegram session, a gateway-hosted command approval succeeded, but multiple approvals for the same command targeting a paired macOS node were reported as denied / invoke-failed / did not run, even after the user believed they had approved or sent the suggested /approve ... allow-always command.

This makes remote node administration via Telegram hard to trust: the assistant sees approval failures while the user believes approval was granted.

Environment

  • OpenClaw host: macOS on Apple Silicon
  • Source channel: Telegram
  • Target node: macOS node, MacBook Air M5
  • Command type: exec tool with host=node, foreground approval required
  • Gateway command approval in the same conversation succeeded
  • Node command approval repeatedly failed before execution

What happened

We attempted to install Keka on a remote macOS node using Homebrew:

brew list --cask keka >/dev/null 2>&1 || brew install --cask keka

The exec approval card was generated for the node command. However, after several attempts, the async completion event reported that the command did not run because approval was denied / invoke-failed. No command output was produced.

Meanwhile, a similar approval flow for a gateway-hosted command in the same Telegram conversation completed successfully.

Expected behavior

One of these should happen reliably:

  1. Clicking/sending the approval in Telegram should approve the pending node exec command and let it run; or
  2. If Telegram cannot route /approve for node approvals, the UI should clearly show why and provide a working approval path; or
  3. allow-always should persist and apply consistently for subsequent matching node commands.

Actual behavior

  • Gateway-hosted approval succeeded.
  • Node-hosted approval repeatedly ended with “command did not run” / denied / invoke-failed.
  • The user believed approval had been granted, but the assistant received only failure completion events.
  • Re-sending new approval cards did not resolve the node command approval path.

Why this matters

This is confusing for users and agents:

  • The user sees/uses an approval flow but the command never runs.
  • The assistant cannot tell whether the issue is Telegram command routing, approval expiry, node/gateway approval propagation, or allowlist persistence.
  • It creates a bad loop where the assistant keeps asking for approval and the user keeps approving, but the node command remains blocked.

Related issues found during search

Possibly related but not identical:

  • #2402 — exec approval flow fire-and-forget / orphaned approvals
  • #44749 — concurrent approvals delayed completion / user commands blocked
  • #67440 — allow-always entries race / allowlist persistence
  • #68634 — Telegram native approvals / gateway noise
  • #30924 — allowFrom ignored / approvals still required

Suggested diagnostics / fixes

  • Confirm whether Telegram /approve commands are routed globally or only to gateway-local approvals.
  • Add explicit logging for approval target host/node and approval routing result.
  • When an approval fails because it was not received, expired, denied, or routed to the wrong session/node, surface that reason distinctly.
  • Add a command or UI to list active pending approvals with target host/node and expiry.
  • Ensure allow-always persistence is atomic and applies consistently across gateway vs node exec targets.

extent analysis

TL;DR

The issue can be mitigated by improving approval routing and logging to ensure that Telegram /approve commands are correctly routed to the target node.

Guidance

  • Investigate how Telegram /approve commands are routed, whether globally or only to gateway-local approvals, to understand why node approvals are failing.
  • Add explicit logging for approval target host/node and approval routing result to identify where the approval process is failing.
  • Surface the reason for approval failure distinctly, such as not received, expired, denied, or routed to the wrong session/node, to provide clearer feedback to users.
  • Consider adding a command or UI to list active pending approvals with target host/node and expiry to help users and assistants manage approvals.

Example

No code snippet is provided as the issue is more related to the approval flow and logging rather than a specific code fix.

Notes

The issue seems to be related to the approval flow and routing of Telegram /approve commands, and improving logging and feedback can help mitigate the problem. However, a full fix may require changes to the underlying approval system and routing logic.

Recommendation

Apply workaround: Improve approval routing and logging to ensure that Telegram /approve commands are correctly routed to the target node, and provide clearer feedback to users and assistants. This can help mitigate the issue until a full fix is available.

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

One of these should happen reliably:

  1. Clicking/sending the approval in Telegram should approve the pending node exec command and let it run; or
  2. If Telegram cannot route /approve for node approvals, the UI should clearly show why and provide a working approval path; or
  3. allow-always should persist and apply consistently for subsequent matching node commands.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Telegram exec approvals fail for macOS node commands while gateway approvals succeed [1 pull requests, 3 comments, 2 participants]