Environment
- OpenClaw: 2026.3.13 (61d171a)
- OS: Debian 12 (bookworm), Linux 6.12.18 x86_64
- Node: 22.16.0
- Discord plugin: bundled, installed via
openclaw plugins install discord
Symptoms
- REST API works perfectly (fetch-application-id, deploy-commands, fetch-bot-identity all succeed)
gateway-debug: WebSocket connection opened appears in logs
- But
gatewayConnected stays false forever — no Identify (op 2) is sent after receiving Hello (op 10)
- Bot never comes online in Discord, no READY event
- Eventually WSS closes with code 1006
Verified NOT the issue
- Network: Direct
ws test with same token on same machine: HELLO → IDENTIFY → READY works perfectly in <2s
- Token: Valid, all 3 Privileged Intents enabled (Presence, Server Members, Message Content)
- Proxy/TUN: Tested with mihomo TUN mode (transparent proxy). REST + raw WSS both work.
- Config: Same config structure as a working Mac Mini instance (same OpenClaw version)
Reproduction
- Fresh
npm install -g openclaw on Linux (no openclaw onboard)
- Configure Discord channel with valid bot token
openclaw plugins install discord
- Start gateway
- Observe: WSS opens but gatewayConnected stays false
Relevant logs
[discord] [default] starting provider (@老林云客服)
[discord] startup [default] fetch-application-id:done 975ms applicationId=... gateway=missing
[discord] startup [default] deploy-rest:put:done 1988ms
[discord] startup [default] gateway-debug 1977ms WebSocket connection opened
[discord] startup [default] fetch-bot-identity:done 2288ms gatewayConnected=false reconnectAttempts=0
[discord] logged in to discord as ... (老林云客服)
# No further gateway logs. No READY, no close, no error.
# After ~4 minutes:
[discord] gateway: WebSocket connection closed with code 1006
[discord] gateway: Attempting resume with backoff: 1000ms after code 1006
Workaround test (confirms token/network are fine)
const ws = require('ws');
const c = new ws.WebSocket('wss://gateway.discord.gg/?v=10&encoding=json');
c.on('message', (d) => {
const msg = JSON.parse(d.toString());
if (msg.op === 10) {
c.send(JSON.stringify({ op: 2, d: { token: TOKEN, intents: 33281, properties: { os: 'linux', browser: 'openclaw', device: 'openclaw' } } }));
}
if (msg.t === 'READY') console.log('READY!', msg.d.user.username); // Works!
});
Environment
openclaw plugins install discordSymptoms
gateway-debug: WebSocket connection openedappears in logsgatewayConnectedstaysfalseforever — no Identify (op 2) is sent after receiving Hello (op 10)Verified NOT the issue
wstest with same token on same machine: HELLO → IDENTIFY → READY works perfectly in <2sReproduction
npm install -g openclawon Linux (noopenclaw onboard)openclaw plugins install discordRelevant logs
Workaround test (confirms token/network are fine)