Repository navigation
Description
Bug type
Crash (process/app exits or hangs)
Beta release blocker
No
Summary
A transient DNS failure (Discord) or Telegram polling stall causes an abnormal WebSocket closure that throws an uncaught exception and kills the entire gateway process. Reproduced repeatedly across both channels on the same day.
Steps to reproduce
Run OpenClaw 2026.3.24 on Windows with Discord channel enabled
Experience any brief DNS failure or network blip affecting gateway.discord.gg
The health monitor detects a stale socket and tries to restart the Discord channel
Gateway crashes with uncaught exception — same crash repeats every 5 min (health monitor loop)
Separately: with Telegram enabled and a long-running agent task active, Telegram polling stalls 180s+, gateway then crashes with 1006 abnormal closure
Expected behavior
Channel-level WebSocket failures should be isolated to the channel plugin. The gateway process should stay running with the channel in a degraded/reconnecting state.
Actual behavior
Gateway process dies hard. Observed 7+ crashes in 2 hours from a single DNS blip (Discord). Telegram polling stall produced 3 additional crashes in ~1 hour
OpenClaw version
2026.3.24
Operating system
Windows 10 19045 (x64)
Install method
npm global
Model
anthropic/claude-sonnet-4-6
Provider / routing chain
openclaw -> anthropic
Additional provider/model setup details
No response
Logs, screenshots, and evidence
# Discord crash
discord gateway error: Error: getaddrinfo ENOTFOUND gateway.discord.gg
discord gateway: WebSocket connection closed with code 1006
discord gateway: Reconnecting with backoff: 2000ms after code 1006
discord gateway error: getaddrinfo ENOTFOUND gateway.discord.gg
Uncaught exception: Error: Max reconnect attempts (0) reached after code 1006
at SafeGatewayPlugin.handleReconnectionAttempt (provider-CAlWEl41.js:3318:47)
at SafeGatewayPlugin.handleClose (provider-CAlWEl41.js:3364:8)
# Health monitor making it worse (repeating every 5 min)
gateway/health-monitor: [discord:default] health-monitor: restarting (reason: stale-socket)
[same crash repeats]
# Telegram crash
error: Telegram polling stall detected (no getUpdates for 183.69s); forcing restart.
error: Telegram polling runner stopped (polling stall detected); restarting in 2.49s.
[~20 min later]
Error: gateway closed (1006 abnormal closure (no close frame)): no close reasonImpact and severity
Affected: All users running Discord or Telegram channels on Windows
Severity: High — any DNS blip or network hiccup takes down the entire assistant, not just the affected channel
Frequency: Always when triggered — 10+ crashes observed in one session
Consequence: Gateway goes offline, all channels (webchat, Telegram, etc.) become unavailable until manual restart or schtasks recovery
Additional information
Workaround: disable Discord (channels.discord.enabled: false). No clean workaround for Telegram. Both require a Windows Scheduled Task to auto-restart the gateway. The Discord config hot-reload also triggers the crash (disabling Discord via openclaw config set causes the same uncaught exception as the DNS failure).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
steipete commentedon Apr 25, 2026
Closing this as implemented after Codex review.
Current main already contains the requested crash isolation for Discord/Telegram channel failures, and the relevant implementation appears to have shipped in v2026.4.22.
What I checked:
extensions/discord/src/monitor/gateway-supervisor.ts:156, 7130e56f872a)extensions/discord/src/monitor/provider.lifecycle.ts:457, 7130e56f872a)extensions/discord/src/monitor/gateway-supervisor.test.ts:59, 7130e56f872a)extensions/telegram/src/polling-session.ts:318, 7130e56f872a)src/gateway/channel-health-monitor.ts:160, 7130e56f872a)CHANGELOG.md:403, 00bd2cf7a376)So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review notes: reviewed against 7130e56f872a; fix evidence: release v2026.4.22, commit 00bd2cf7a376.