You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Discord SafeGatewayPlugin crashes gateway on WebSocket close (maxReconnectAttempts=0 in v2026.3.24) #55301
The Discord SafeGatewayPlugin throws an uncaught exception when the Discord WebSocket closes with code 1005, crashing the entire gateway process. This happens because maxReconnectAttempts is 0 in the compiled v2026.3.24 dist, despite the source setting it to 50.
Wait for Discord WebSocket to drop (close code 1005 — "no status received")
Gateway crashes immediately with uncaught exception
Crash occurs repeatedly — gateway survives ~30-40 minutes between crashes.
Error
[openclaw] Uncaught exception: Error: Max reconnect attempts (0) reached after code 1005
at SafeGatewayPlugin.handleReconnectionAttempt (provider-CAlWEl41.js:3318:47)
at SafeGatewayPlugin.handleClose (provider-CAlWEl41.js:3364:8)
at WebSocket.<anonymous> (provider-CAlWEl41.js:3307:9)
at WebSocket.emit (node:events:508:20)
at WebSocket.emitClose (ws/lib/websocket.js:273:10)
at TLSSocket.socketOnClose (ws/lib/websocket.js:1346:15)
Two issues
maxReconnectAttempts is 0 in dist — Source at src/discord/monitor/gateway-plugin.ts sets reconnect: { maxAttempts: 50 }, but the installed build uses 0. Either a build/bundling issue or an unintended override.
Reconnect failure kills the process — Even with maxAttempts: 0, the error should be caught and the Discord channel gracefully degraded, not thrown as an uncaught exception that crashes the gateway. A single channel failure should never take down the entire process.
Workaround
Disable Discord channel in config: channels.discord.enabled: false
Closing as fixed upstream. This crash family was addressed by upstream Discord lifecycle changes merged in #55991, and PR #55000 was closed after the upstream maintainer confirmed the fix landed there.
If you still hit the same Max reconnect attempts (0) / stale-socket gateway crash on the latest OpenClaw release, comment here with fresh logs and version details and we can reopen or spin a new issue.
Activity
Takhoffman commentedon Mar 29, 2026
Closing as fixed upstream. This crash family was addressed by upstream Discord lifecycle changes merged in #55991, and PR #55000 was closed after the upstream maintainer confirmed the fix landed there.
If you still hit the same
Max reconnect attempts (0)/ stale-socket gateway crash on the latest OpenClaw release, comment here with fresh logs and version details and we can reopen or spin a new issue.