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 stale-socket recovery can crash entire gateway on 2026.3.24 #54667
On OpenClaw 2026.3.24, the Discord provider can crash the entire gateway during a stale-socket recovery path.
What happens
The gateway health monitor detects a Discord stale socket, tries to restart the Discord provider, and then the whole gateway process exits with an uncaught exception instead of isolating the Discord failure.
Observed errors
From journalctl --user -u openclaw-gateway.service:
[health-monitor] [discord:default] health-monitor: restarting (reason: stale-socket)
[openclaw] Uncaught exception: Error: Max reconnect attempts (0) reached after code 1005
Related Discord gateway logs seen around the same failures:
[discord] gateway was not ready after 15000ms; forcing a fresh reconnect
[discord] gateway: WebSocket connection closed with code 1005
[discord] gateway: Reconnecting with backoff: 1000ms after code 1005
[discord] gateway: WebSocket connection closed with code 1006
[discord] gateway error: Error: WebSocket was closed before the connection was established
[discord] gateway error: Error: Unexpected server response: 520
Then systemd reports the gateway process dying and restarting:
openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
openclaw-gateway.service: Failed with result 'exit-code'.
openclaw-gateway.service: Scheduled restart job, restart counter is at 2.
Repro-ish timeline
This happened repeatedly on the same host on 2026.3.24:
2026-03-25 19:13:51 UTC
2026-03-25 19:49:00 UTC
Both times the sequence was essentially:
Discord stale socket detected
reconnect path hits Max reconnect attempts (0) reached after code 1005
uncaught exception escapes
entire gateway exits
systemd restarts the gateway
Expected behavior
A Discord provider failure should not crash the entire OpenClaw gateway. The provider should degrade/restart in isolation, or at minimum fail closed without bringing down Telegram / other channels.
Environment
OpenClaw 2026.3.24
systemd user service
Linux x64
Discord configured but rarely used; Telegram is primary
Impact
Even when Discord is only enabled as a backup channel, it can introduce gateway instability and restart the main assistant.
I am running into this same issue. Crashes started after the .24 update.
2026-03-25T15:51:06.446-04:00 [health-monitor] [discord:default] health-monitor: restarting (reason: stale-socket)
2026-03-25T15:51:06.687-04:00 [openclaw] Uncaught exception: Error: Max reconnect attempts (0) reached after code 1005
at SafeGatewayPlugin.handleReconnectionAttempt (file:///app/node_modules/@buape/carbon/src/plugins/gateway/GatewayPlugin.ts:400:5)
at SafeGatewayPlugin.handleClose (file:///app/node_modules/@buape/carbon/src/plugins/gateway/GatewayPlugin.ts:484:8)
at WebSocket.<anonymous> (file:///app/node_modules/@buape/carbon/src/plugins/gateway/GatewayPlugin.ts:376:9)
at WebSocket.emit (node:events:508:28)
at WebSocket.emitClose (/app/node_modules/@buape/carbon/node_modules/ws/lib/websocket.js:273:10)
at TLSSocket.socketOnClose (/app/node_modules/@buape/carbon/node_modules/ws/lib/websocket.js:1346:15)
at TLSSocket.emit (node:events:520:35)
at node:net:346:12
at TCP.done (node:internal/tls/wrap:667:7)
Activity
davidrobertson commentedon Mar 25, 2026
I am running into this same issue. Crashes started after the .24 update.
ForceConstant commentedon Mar 25, 2026
Discord is having API issues today, but it shouldn't cause openclaw to crash.
steipete commentedon Mar 26, 2026
Closing as a duplicate of #54894.
This is the same Discord stale-socket or abort crash family also confirmed in #54931 and fixed by #55000:
Max reconnect attempts (0)errorKeeping canonical tracking on #54894 and the fix discussion on #55000.