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
Gateway crashes on WebSocket reconnection (Discord/Slack) instead of retrying #55109
When WebSocket connections (Discord or Slack) encounter errors, the gateway crashes with an uncaught exception instead of reconnecting gracefully.
Error
[openclaw] Uncaught exception: Error: Max reconnect attempts (0) reached after code 1005
at SafeGatewayPlugin.handleReconnectionAttempt (file:///opt/homebrew/lib/node_modules/openclaw/dist/provider-CAlWEl41.js:3318:47)
at SafeGatewayPlugin.handleClose (file:///opt/homebrew/lib/node_modules/openclaw/dist/provider-CAlWEl41.js:3364:8)
The health monitor detects a stale socket and triggers a restart, but the WebSocket handler immediately fails with maxReconnectAttempts=0.
Impact
236 Discord stale-socket restarts observed
253 gateway restarts in a single day (2026-03-24)
Intermittent service disruption
Cron jobs fail during crashes
Root Cause
SafeGatewayPlugin.handleReconnectionAttempt has maxReconnectAttempts set to 0, meaning it fails immediately on WebSocket close instead of retrying with backoff.
Proposed Fix
Add config options for WebSocket reconnection behavior, with sensible defaults:
changed the title [-]Slack Socket Mode: gateway crashes on WebSocket errors instead of reconnecting[/-][+]Gateway crashes on WebSocket reconnection (Discord/Slack) instead of retrying[/+]on Mar 26, 2026
Activity
[-]Slack Socket Mode: gateway crashes on WebSocket errors instead of reconnecting[/-][+]Gateway crashes on WebSocket reconnection (Discord/Slack) instead of retrying[/+]