Bug type
Crash (process/app exits or hangs)
Beta release blocker
No
Summary
The gateway process crashes with an uncaught exception repeatedly (~every 90 minutes) when the internal health monitor detects a stale Discord socket and attempts to restart it. Instead of recovering gracefully, the reconnect failure propagates as an uncaught exception and kills the entire Node.js process.
Steps to reproduce
Running normally with a Discord channel connected. No special config required — happens on its own at regular intervals.
Log Sequence
- Health monitor fires:
health-monitor: restarting (reason: stale-socket)
- Uncaught exception immediately follows and process exits:
```
[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. (provider-CAlWEl41.js:3307:9)
at WebSocket.emit (node:events:508:28)
at WebSocket.emitClose (...ws/lib/websocket.js:273:10)
at TLSSocket.socketOnClose (...ws/lib/websocket.js:1346:15)
```
Expected behavior
Health monitor restarts the Discord WebSocket connection and gateway continues running.
Actual behavior
Uncaught exception kills the gateway process entirely. Crashed 4+ times today.
OpenClaw version
2026.3.24
Operating system
Windows 11 x64 (Build 26200)
Install method
npm global
Model
anthropic/claude-sonnet-4-6 (primary), ollama/qwen2.5:7b (cron jobs at time of crash)
Provider / routing chain
openclaw -> anthropic (direct, no proxy or AI gateway)
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Bug type
Crash (process/app exits or hangs)
Beta release blocker
No
Summary
The gateway process crashes with an uncaught exception repeatedly (~every 90 minutes) when the internal health monitor detects a stale Discord socket and attempts to restart it. Instead of recovering gracefully, the reconnect failure propagates as an uncaught exception and kills the entire Node.js process.
Steps to reproduce
Running normally with a Discord channel connected. No special config required — happens on its own at regular intervals.
Log Sequence
health-monitor: restarting (reason: stale-socket)```
[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. (provider-CAlWEl41.js:3307:9)
at WebSocket.emit (node:events:508:28)
at WebSocket.emitClose (...ws/lib/websocket.js:273:10)
at TLSSocket.socketOnClose (...ws/lib/websocket.js:1346:15)
```
Expected behavior
Health monitor restarts the Discord WebSocket connection and gateway continues running.
Actual behavior
Uncaught exception kills the gateway process entirely. Crashed 4+ times today.
OpenClaw version
2026.3.24
Operating system
Windows 11 x64 (Build 26200)
Install method
npm global
Model
anthropic/claude-sonnet-4-6 (primary), ollama/qwen2.5:7b (cron jobs at time of crash)
Provider / routing chain
openclaw -> anthropic (direct, no proxy or AI gateway)
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response