-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
[Bug] Discord WebSocket reconnect drops events (seq gap), mentions lost #29420
Copy link
Copy link
Closed
Description
Description
After a Discord WebSocket disconnection (code 1006/1005), the gateway reconnects but loses events in the sequence gap. This causes missed @mentions and messages.
Steps to Reproduce
- Gateway running with Discord channel enabled
- Discord WebSocket drops (code 1006 abnormal closure)
- Gateway auto-reconnects ~7 seconds later
- Events between old seq and new seq are lost (e.g., seq 3289 → 3293, 4 events lost)
Expected Behavior
On reconnect, gateway should request missed events from Discord (via resume with last sequence number) so no events are dropped.
Actual Behavior
Events in the gap are silently lost. User mentions during the gap are never delivered to the agent.
Logs
discord gateway: WebSocket connection closed with code 1006 (2026-02-28T04:01:34Z)
discord gateway: WebSocket connection closed with code 1005 (2026-02-28T04:01:41Z)
Client-side warning: event gap detected (expected seq 3289, got 3293); refresh recommended
Environment
- OpenClaw: latest npm
- OS: Ubuntu 24.04 (WSL2)
- Node: v22.22.0
- Connection: via Tailscale HTTPS proxy
Related
- [Bug]: The heartbeat isn't reading local HEARTBEAT.md #25925 (heartbeat steals webchat session focus — also Discord stability related)
Impact
In a multi-agent Discord setup (M1 + E3 bots in same server), missed mentions mean agents appear unresponsive even though gateway is running. User has to manually ping again in another channel.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.