-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Discord WebSocket: resume loop needs circuit breaker #13180
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingchannel: discordChannel integration: discordChannel integration: discord
Description
Bug
The Discord bot's WebSocket connection can enter an unrecoverable resume loop. Observed on Feb 9, 2026 starting ~9:53 AM PST.
Behavior
- Connection closes with codes 1005/1006
- Client attempts resume with escalating backoff (1s → 2s → 4s → 8s → 16s)
- Resume immediately gets closed again
- Backoff resets to 1s and cycles indefinitely — hundreds of times over 12+ hours
- Bot appears online but is deaf to all messages
Errors observed during the loop
connection stalled: no HELLO received within 30000msAggregateError- DNS failure:
getaddrinfo ENOTFOUND gateway-us-east1-d.discord.gg
What didn't fix it
openclaw gateway restart(SIGUSR1) — temporarily fixed it but loop resumed within minutes- Two automated restart attempts had the same result
What fixed it
openclaw gateway --force(full process kill + fresh start) — resolved it permanently
Likely root cause
A transient DNS/network issue caused the initial disconnect. The session became stale but the client kept trying to resume it forever instead of falling back to a fresh connection.
Suggested fix
Add a circuit breaker: after N consecutive failed resumes, abandon the session and do a full reconnect with a new identify handshake.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingchannel: discordChannel integration: discordChannel integration: discord
Type
Fields
Give feedbackNo fields configured for issues without a type.