Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:crashProcess/app exits unexpectedly or hangsProcess/app exits unexpectedly or hangsclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Bug type
Crash (process/app exits or hangs)
Beta release blocker
No
Summary
Every ~15-16 minutes, Telegram polling stalls and triggers a restart. At the exact same timestamp, all 3 Discord bots
drop with websocket close code 1006. This happens consistently — the timing is not coincidental.
Steps to reproduce
Outage on multiple applications for communication
Expected behavior
Per the 2026.5.28 release notes, channels should poll independently. Telegram stalls should not affect Discord
connections.
Actual behavior
Discord websockets close (1006) at the precise moment Telegram stall is detected and restarts.
OpenClaw version
2026.5.28
Operating system
macOS 26.5 (arm64)
Install method
npm global
Model
claude sonnet 4.6
Provider / routing chain
openclaw->openrouter->anthropic claude sonnet 4.6
Additional provider/model setup details
Config: 2 Telegram bots, 3 Discord bots, all on the same gateway instance.
Logs, screenshots, and evidence
- 11:16:29 MDT — Telegram stall detected (getUpdates stuck 981s)
- 11:16:29 MDT — discord gateway: Gateway websocket closed: 1006 (×3 accounts)
- 11:23:57 MDT — Telegram stall detected (getUpdates stuck 415s)
- 11:23:57 MDT — discord gateway: Gateway websocket closed: 1006 (×3 accounts)Impact and severity
No response
Additional information
No response
Reacted by clawsweeper
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingbug:crashProcess/app exits unexpectedly or hangsProcess/app exits unexpectedly or hangsclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon May 31, 2026
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.
Close as duplicate/superseded. Current main has Telegram worker-thread ingress and per-account channel restart scoping, while the remaining code-owned gap is Discord gateway/heartbeat ingress still running on the main event loop, which is already tracked by #83591.
Canonical path: Use #83591 as the canonical design and fix path for Discord ingress/heartbeat isolation, while leaving Telegram restart-policy work to its existing merged and follow-up trackers.
So I’m closing this here and keeping the remaining discussion on #83591.
Review details
Best possible solution:
Use #83591 as the canonical design and fix path for Discord ingress/heartbeat isolation, while leaving Telegram restart-policy work to its existing merged and follow-up trackers.
Do we have a high-confidence way to reproduce the issue?
No high-confidence live reproduction was run. The source and production timestamps support a plausible main-loop coupling, but the exact synchronized Telegram/Discord outage has not been reproduced on current main in this read-only review.
Is this the best way to solve the issue?
No as a standalone tracker. The maintainable solution is to land a maintainer-approved Discord ingress/heartbeat isolation design in the canonical Discord issue, while keeping this issue’s timing logs as supporting evidence.
Security review:
Security review: No patch is under review, and this issue is not itself security-sensitive.
AGENTS.md: found and applied where relevant.
What I checked:
AGENTS.md:1, b3f315461ba7)VISION.md:21, b3f315461ba7)extensions/telegram/src/telegram-ingress-worker.ts:87, b3f315461ba7)extensions/telegram/src/polling-session.ts:934, b3f315461ba7)src/gateway/channel-health-monitor.ts:97, b3f315461ba7)Likely related people:
extensions/discord/src/monitor/provider.lifecycle.ts)extensions/telegram/src/polling-session.ts,extensions/telegram/src/telegram-ingress-worker.ts,extensions/telegram/src/telegram-ingress-worker.runtime.ts)extensions/discord/src/monitor/message-handler.ts,extensions/discord/src/monitor/inbound-dedupe.ts,extensions/discord/src/monitor/inbound-job.ts)extensions/telegram/src/polling-session.ts,extensions/telegram/src/polling-session.test.ts)Codex review notes: model internal, reasoning high; reviewed against b3f315461ba7.
abhinas90 commentedon May 31, 2026
I've diagnosed this exact failure mode on a multi-channel OpenClaw gateway. The simultaneous Discord 1006 + Telegram stall at the same second isn't coincidence — it's a single-threaded event loop starvation.
Root cause: The Telegram
getUpdateslong-poll (~30s timeout) and Discord gateway WebSocket heartbeat share the same Node.js event loop. When Telegram polling stalls (stuck HTTP request), it blocks the tick that Discord's WebSocket needs to send its heartbeat ACK. Discord interprets the missed heartbeat as a dead connection → close code 1006. The restart cascades because the gateway'sonClosehandler for both channels fires in the same microtask queue.Diagnostic matrix:
Isolation verification — Check if the 2026.5.28 release actually spawned separate child processes for channel polling, or just separate async contexts in the same process. Run:
ps aux | grep openclaw— if you see only one process, isolation is async-only, not process-level.Telegram timeout tuning — The 981s / 415s stall durations suggest the Telegram
getUpdatestimeout is being extended by something (network blip, upstream Telegram API slowdown). Try settingTELEGRAM_POLL_TIMEOUT=10in the gateway env — shorter timeouts fail faster and let the event loop breathe.Heartbeat gap — Discord requires a heartbeat every
heartbeat_intervalms (typically 41250). If the event loop is blocked for >41s, you'll 1006. The fix is to run Discord connections in a worker thread (worker_threads) or separate process, not on the main gateway thread.Quick mitigation — Drop to 2 Discord bots + 1 Telegram bot on one gateway. Each additional bot adds a WebSocket that needs heartbeat servicing. The math here is:
num_bots * heartbeat_interval < max_event_loop_stall. With 3 Discord + 2 Telegram = 5 connections, a single stall can cascade.This is a regression from the pre-5.28 behavior where channels were more isolated. If you can pin to 2026.5.27 until a fix lands, that's your safest path. The
clawsweeper:needs-maintainer-reviewlabel suggests the team is aware — adding detailed timing logs (heartbeat send/receive timestamps) will help them pinpoint the exact event loop starvation point.openclaw-barnacle commentedon Jun 15, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.