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
When the Discord health-monitor detects a stale socket and attempts reconnection, the gateway crashes with an uncaught exception because maxReconnectAttempts is 0. This is a fatal crash that brings down the entire gateway, not just the Discord channel.
Reproduction
Observed on v2026.3.24 stable. Happens whenever the Discord WebSocket goes stale.
[health-monitor] [discord:default] health-monitor: restarting (reason: stale-socket)
[openclaw] Uncaught exception: Error: Max reconnect attempts (0) reached after code 1005
at SafeGatewayPlugin.handleReconnectionAttempt (file:///...dist/provider-CAlWEl41.js:3318:47)
Gateway systemd service restarts, but this triggers delivery-recovery batch flush (#55231) and disrupts all channels — not just Discord.
Expected behavior
maxReconnectAttempts=0 should either be treated as "unlimited" or use a sensible default (e.g. 5)
A single channel's reconnect failure should never crash the entire gateway — isolate the failure to that channel
If reconnection truly fails, log an error and disable the channel gracefully
Environment
OpenClaw v2026.3.24 stable
Ubuntu, systemd service
Discord channel configured with default settings (no explicit maxReconnectAttempts set)
Update: This is NOT a regression in v2026.3.24 — confirmed happening on v2026.3.23 as well.
The Discord stale-socket → crash cycle has been running approximately every 35 minutes since at least Mar 25 afternoon (pre-upgrade). Sample from journalctl:
Mar 25 17:43:52 — Max reconnect attempts (0) reached after code 1005
Mar 25 18:18:59 — stale-socket → crash
Mar 25 18:54:06 — stale-socket → crash
Mar 25 19:29:13 — stale-socket → crash
Mar 25 20:04:20 — stale-socket → crash
Mar 25 20:54:27 — stale-socket → crash
Mar 25 21:29:34 — stale-socket → crash
Mar 25 22:04:41 — stale-socket → crash (pre-upgrade, v2026.3.23)
~35 minute interval = health-monitor check interval. Every check finds a stale socket, tries to reconnect, and crashes the gateway because maxReconnectAttempts=0.
systemd restart counter was at 39 as of this morning — this bug is the primary source of gateway restarts.
Activity
coolmanns commentedon Mar 26, 2026
Update: This is NOT a regression in v2026.3.24 — confirmed happening on v2026.3.23 as well.
The Discord stale-socket → crash cycle has been running approximately every 35 minutes since at least Mar 25 afternoon (pre-upgrade). Sample from journalctl:
~35 minute interval = health-monitor check interval. Every check finds a stale socket, tries to reconnect, and crashes the gateway because maxReconnectAttempts=0.
systemd restart counter was at 39 as of this morning — this bug is the primary source of gateway restarts.
coolmanns commentedon Mar 26, 2026
Duplicate of #54729 — same bug, same stack trace, confirmed pre-existing on v2026.3.23. Adding our data as a comment on that issue.
coolmanns commentedon Mar 26, 2026
Closing as duplicate of #54729