openclaw - ✅(Solved) Fix [Bug]: Telegram polling stalls intermittently causing delayed/missed message delivery and heartbeat failures [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#63516Fetched 2026-04-10 03:42:56
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2cross-referenced ×1

Environment:

  • OpenClaw 2026.4.5
  • macOS arm64 (Mac mini)
  • Two Telegram bot accounts configured
  • Node 24.14.1

Problem: The Telegram polling runner intermittently stalls with Network request for 'getUpdates' failed! errors. This causes:

  • Delayed inbound message delivery (minutes to hours)
  • Missed heartbeats and cron job delivery failures
  • Group chat messages never received (both bot accounts affected)

Error Message

[diag] polling cycle finished reason=polling stall detected durationMs=30004 error=Network request for 'getUpdates' failed!

Root Cause

Environment:

  • OpenClaw 2026.4.5
  • macOS arm64 (Mac mini)
  • Two Telegram bot accounts configured
  • Node 24.14.1

Problem: The Telegram polling runner intermittently stalls with Network request for 'getUpdates' failed! errors. This causes:

  • Delayed inbound message delivery (minutes to hours)
  • Missed heartbeats and cron job delivery failures
  • Group chat messages never received (both bot accounts affected)

Fix Action

Fixed

PR fix notes

PR #63780: fix(telegram): suppress recoverable uncaught network failures

Description (problem / solution / changelog)

Summary

  • add uncaught-exception handler registration alongside unhandled rejection handlers
  • suppress recoverable transient network uncaught exceptions in the top-level entrypoints
  • let the Telegram monitor reuse its polling restart path when recoverable network failures surface as uncaught exceptions
  • add regression coverage for the Telegram restart path and CLI uncaught ENETUNREACH suppression

Fixes #60515.

Validation

  • node scripts/run-vitest.mjs run --config vitest.extension-telegram.config.ts extensions/telegram/src/monitor.test.ts
  • node scripts/run-vitest.mjs run --config vitest.cli.config.ts src/cli/run-main.exit.test.ts
  • NODE_OPTIONS=--max-old-space-size=8192 pnpm exec tsc -p tsconfig.json --noEmit --pretty false --incremental false

Changed files

  • extensions/telegram/src/monitor.test.ts (modified, +86/-19)
  • extensions/telegram/src/monitor.ts (modified, +21/-11)
  • src/cli/run-main.exit.test.ts (modified, +41/-0)
  • src/cli/run-main.ts (modified, +28/-6)
  • src/index.ts (modified, +20/-1)
  • src/infra/unhandled-rejections.ts (modified, +25/-0)
  • src/plugin-sdk/runtime-env.ts (modified, +4/-1)
  • src/plugin-sdk/runtime.ts (modified, +4/-1)

Code Example

Telegram polling runner stopped (polling stall detected); restarting in 30s
[diag] polling cycle finished reason=polling stall detected durationMs=30004 error=Network request for 'getUpdates' failed!
Polling runner stop timed out after 15s; forcing restart cycle
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Environment:

  • OpenClaw 2026.4.5
  • macOS arm64 (Mac mini)
  • Two Telegram bot accounts configured
  • Node 24.14.1

Problem: The Telegram polling runner intermittently stalls with Network request for 'getUpdates' failed! errors. This causes:

  • Delayed inbound message delivery (minutes to hours)
  • Missed heartbeats and cron job delivery failures
  • Group chat messages never received (both bot accounts affected)

Steps to reproduce

  1. Install OpenClaw 2026.4.5 on macOS arm64 with two Telegram bot accounts configured.
  2. Run openclaw gateway start — both bots begin polling.
  3. Wait approximately 30–90 minutes (or overnight).
  4. Observe: polling stalls with "Network request for 'getUpdates' failed!" errors begin occurring on both accounts simultaneously.
  5. Send a Telegram DM or group message to the bot — no response received during stall.
  6. Run openclaw gateway restart — polling recovers temporarily, then stalls again within minutes to hours.
  7. Note: curl https://api.telegram.org/bot<token>/getMe succeeds from the same machine throughout, confirming the network itself is not the issue.

Expected behavior

Rapid response in Telegram

Actual behavior

Telegram polling runner stalls intermittently with "Network request for 'getUpdates' failed!" errors. During stalls (lasting minutes to hours), inbound messages are not received and the agent is unresponsive. Gateway logs show repeated cycles of: stall detected → forced restart → rebuild transport → stall again. Group chat messages are never delivered regardless of polling state. A gateway restart temporarily resolves DM delivery but the stall recurs.

OpenClaw version

2026.4.5

Operating system

macOS arm64 (Mac mini)

Install method

Change to npm global install (sudo npm install -g openclaw)

Model

Change to anthropic/claude-sonnet-4-6

Provider / routing chain

Change to anthropic/claude-sonnet-4-6

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Telegram polling runner stopped (polling stall detected); restarting in 30s
[diag] polling cycle finished reason=polling stall detected durationMs=30004 error=Network request for 'getUpdates' failed!
Polling runner stop timed out after 15s; forcing restart cycle

Impact and severity

No response

Additional information

• curl https://api.telegram.org/bot.../getMe works fine from the same machine — network is not the issue • Stalls affect both bot accounts simultaneously • A gateway restart temporarily clears the stall, but it recurs • DM delivery works when polling is healthy; group messages never work regardless • Problem persisted across update from 2026.4.2 → 2026.4.5 • Config has autoSelectFamily: false and dnsResultOrder: ipv4first (suggest this may be related)

Suspected cause: Something in the HTTP client used for long-polling getUpdates is losing its connection silently and not recovering properly. May be related to dual bot account setup or a macOS-specific networking quirk.

extent analysis

TL;DR

  • Investigate and adjust the HTTP client configuration for the Telegram polling runner to prevent silent connection loss and improve recovery.

Guidance

  • Verify the HTTP client library version used by OpenClaw and check for any known issues related to connection persistence and recovery.
  • Review the autoSelectFamily and dnsResultOrder configuration settings to ensure they are not contributing to the connection loss issue.
  • Test the Telegram polling runner with a single bot account to determine if the issue is related to the dual bot account setup.
  • Consider implementing a custom retry mechanism or adjusting the existing retry policy to improve the recovery of the polling runner after a stall is detected.

Example

  • No specific code example is provided due to the lack of information about the underlying HTTP client library and its configuration.

Notes

  • The issue may be related to a macOS-specific networking quirk or a problem with the HTTP client library used by OpenClaw.
  • Further investigation is needed to determine the root cause of the issue and to develop a comprehensive solution.

Recommendation

  • Apply workaround: Implement a custom retry mechanism or adjust the existing retry policy to improve the recovery of the polling runner after a stall is detected, as the root cause of the issue is not yet fully understood and a direct fix may not be available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Rapid response in Telegram

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING