Skip to content

[Bug] Discord channel exec fails with gateway token mismatch #38179

@weilongMao

Description

@weilongMao

Bug type

Regression (worked before, now fails)

Summary

Discord channel exec fails with gateway token mismatch, while TUI channel works fine

Steps to reproduce

  1. Configure Discord channel with gateway auth enabled
  2. Send a message that triggers exec (e.g., !pwd)
  3. Error: gateway closed (1008): unauthorized: gateway token mismatch

Expected behavior

exec should work without requiring approval (like TUI channel)

Actual behavior

exec requires approval and fails with: gateway closed (1008): unauthorized: gateway token mismatch

OpenClaw version

0.1.7

Operating system

macOS 24.6.0 (arm64)

Install method

No response

Logs, screenshots, and evidence

Impact and severity

Affected: Discord channel users
Severity: High (blocks exec functionality)
Frequency: 100% reproducible
Consequence: Cannot execute shell commands via Discord

Additional information

Related to PR #37233 which fixed similar issue for Telegram. This is a Discord-specific issue. TUI channel works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions