Skip to content

[Bug]: Discord Integration Issues - MESSAGE_CONTENT_LIMITED + Gateway Token Instability #39016

@BSubot

Description

@BSubot

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Two issues on v2026.3.2/macOS: (1) Discord bot does not receive any messages despite MESSAGE_CONTENT intent being enabled; (2) gateway.remote.token is repeatedly cleared to "" causing auth failures.

Steps to reproduce

Issue 1: Discord MESSAGE_CONTENT_LIMITED

  1. Create a new Discord application in the Developer Portal

    1. Enable "Message Content Intent" under Bot → Privileged Gateway Intents
    1. Generate OAuth URL with bot + applications.commands scopes
    1. Select all relevant Bot Permissions (View Channels, Send Messages, Read Message History, Embed Links, Attach Files, etc.)
    1. Invite bot to a single server (well under 100-server threshold)
    1. Confirm bot shows as online and logs in successfully: logged in to discord as [ID] (Smithers)
    1. Observe: zero message events received in OpenClaw logs; bot does not respond to any messages or @mentions
      Issue 2: Gateway Token Instability
  2. Open ~/.openclaw/openclaw.json

    1. Set gateway.remote.token to match gateway.auth.token
    1. Confirm gateway works correctly
    1. Run the OpenClaw wizard or make any config changes
    1. Observe: gateway.remote.token is reset to "" (empty string)
    1. All channels break with error: unauthorized: gateway token mismatch (set gateway.remote.token to match gateway.auth.token)
    1. Must manually re-set gateway.remote.token to fix — issue recurs

Expected behavior

Issue 1: Discord bot with MESSAGE_CONTENT intent enabled should receive all messages (regular and @mentions) in its joined server. Bots in fewer than 100 servers should not require verification and should receive message content freely.

Issue 2: gateway.remote.token should persist across wizard runs and config changes. In local/loopback gateway mode, remote.token should ideally not need to be manually managed at all, or the wizard should automatically keep it in sync with gateway.auth.token.

Actual behavior

Issue 1: OpenClaw logs show Discord Message Content Intent is limited; bots under 100 servers can use it without verification. Bot does not receive ANY messages — zero message events in logs, no response to regular messages or @mentions, despite being in only 1 server and having the intent enabled in the Developer Portal.

Issue 2: After running the wizard or making config changes, gateway.remote.token is silently reset to "" (empty string). This causes all channels to fail with: unauthorized: gateway token mismatch (set gateway.remote.token to match gateway.auth.token). Must be manually fixed each time.

OpenClaw version

2026.3.2

Operating system

macOS 26.3.1 (arm64), Node v25.8.0

Install method

npm global

Logs, screenshots, and evidence

**Issue 1 — OpenClaw log output:**

Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
logged in to discord as [ID] (Smithers)

(No further message events appear in logs despite messages being sent in the server.)

**Issue 2 — Config state when broken:**

"gateway": {
  "auth": {
    "token": "abc123..."
  },
  "remote": {
    "token": ""  // ← Gets blanked after wizard/config changes
  }
}

**Issue 2 — Error message when token is blank:**

unauthorized: gateway token mismatch (set gateway.remote.token to match gateway.auth.token)


Full logs available upon request.

Impact and severity

Issue 1 — Discord MESSAGE_CONTENT_LIMITED:
Affected: All users setting up a Discord channel on OpenClaw v2026.3.2
Severity: Critical — bot is completely non-functional (receives zero messages)
Frequency: 100% reproducible with a fresh bot setup
Consequence: Discord channel integration is entirely unusable; new users cannot onboard via Discord

Issue 2 — Gateway Token Instability:
Affected: All users using local/loopback gateway mode who run the wizard or change config
Severity: High — causes complete auth failure across all channels
Frequency: Consistent; occurs every time the wizard runs or config is changed
Consequence: All channels break silently until the user manually edits JSON config; difficult to diagnose without knowing the cause

Additional information

Gateway mode: local (loopback)

Questions / Requests:

  • Is there a known workaround for MESSAGE_CONTENT_LIMITED on small/new bots? Documentation suggests bots under 100 servers should auto-qualify, but this isn't happening.
    • What is causing gateway.remote.token to be cleared? Is this a wizard bug? Should remote.token even be necessary for local gateway mode?
      • Updated docs for Discord channel setup would be appreciated — current docs don't cover the MESSAGE_CONTENT_LIMITED scenario.
        Issue 2 workaround (temporary): Manually set gateway.remote.token to match gateway.auth.token in ~/.openclaw/openclaw.json after each wizard run or config change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    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