-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: WhatsApp text /approve cannot resolve exec approvals, while Telegram resolves the same ID #84456
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Approval routing / channel command handling bug
Summary
In OpenClaw
2026.5.18, WhatsApp can trigger an exec approval and receive the approval prompt, but a manually typed WhatsApp/approve <id> allow-oncefails with:The same pending approval ID can then be approved successfully from Telegram, and the original command resumes and completes. This suggests the approval object is still valid and globally pending, but the WhatsApp text-command approval path cannot see or resolve it.
Environment
2026.5.18mainapprovals.exec.mode = "both"Reproduction
WhatsApp receives an exec approval prompt. In this repro, WhatsApp delivered the same prompt twice.
Approve from WhatsApp using the short approval slug:
WhatsApp still fails with the same
unknown or expired approval iderror.Approve the same pending ID from Telegram.
Telegram succeeds, and the exec command resumes and completes.
Expected behavior
A WhatsApp
/approve <id> allow-oncecommand from an authorized operator should resolve a pending exec approval created by a WhatsApp-originated turn, just as Telegram approval does.Actual behavior
WhatsApp receives the approval prompt but cannot resolve the pending approval ID. Telegram can resolve the same ID afterward, proving the ID was not expired or consumed.
Sanitized log evidence
Relevant sequence from gateway logs, sanitized:
No
unauthorizedorIgnoring /approve from unauthorized sendermessage was observed in this repro.Additional observations
The forwarded WhatsApp approval prompt renders a broken generic instruction line:
The approval ID is shown elsewhere in the prompt, but the
Reply with:line omits it. This looks like a separate rendering bug and may confuse manual approval, but it does not explain this repro because both short ID and full UUID were manually typed and still failed.The duplicate WhatsApp prompt is also likely a separate delivery/dedup issue with
mode = "both", where the originating WhatsApp session route and an explicit WhatsApp target are both delivered because their route tuples are not byte-identical.Source-inspection hypothesis
Inspection of the source suggests the failure may be a visibility/client-path mismatch rather than parsing or authorization.
The generic text
/approvepath appears to be:src/auto-reply/reply/commands-approve.tsparseApproveCommand(...)parses/approve d8f84298 allow-oncehandleApproveCommand(...)callsexec.approval.resolvethrough plaincallGatewayparsed.idBy contrast, Telegram inline approval appears to use an operator approval-runtime client path:
extensions/telegram/src/exec-approval-resolver.tsresolveApprovalOverGateway(...)approvalRuntimeToken/ approval-runtime client visibilityGateway approval visibility appears to check admin/operator approval-runtime visibility first, then falls back to record-specific device/connection/client identity. A generic WhatsApp text-command
callGatewayconnection may pass sender authorization but still be unable to see a pending approval bound to another device/connection/client identity, causing the resolver to returnunknown or expired approval id.This would explain why:
unknown or expired approval id.Suggested fix direction
After the existing sender authorization checks pass in
handleApproveCommand, generic text/approveresolution may need to use the same approval-runtime resolver path as Telegram inline approval, for exampleresolveApprovalOverGateway(...), instead of plaincallGateway.The important security constraint is that the approval-runtime resolver should only be used after the existing human/channel authorization checks have passed. The proposed change should be a transport/visibility fix, not an auth bypass.
Impact
WhatsApp can be used to trigger commands and receive approval prompts, but manual WhatsApp approval is not reliable. Operators must use Telegram as a workaround for approval resolution.
Not included
No phone numbers, chat IDs, group IDs, raw session JSONL, tokens, hostnames, or private runtime logs are included in this report.