openclaw - 💡(How to fix) Fix [Bug]: Telegram polling enters repeated stall/restart loop on macOS in 2026.3.13 despite healthy direct Telegram connectivity [8 comments, 4 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#50999Fetched 2026-04-08 01:05:44
View on GitHub
Comments
8
Participants
4
Timeline
26
Reactions
0
Timeline (top)
subscribed ×9commented ×8mentioned ×7labeled ×2

Telegram polling repeatedly stalls and restarts on OpenClaw 2026.3.13 on macOS, causing intermittent response gaps even though direct Telegram API requests from the same host succeed.

Root Cause

Telegram polling repeatedly stalls and restarts on OpenClaw 2026.3.13 on macOS, causing intermittent response gaps even though direct Telegram API requests from the same host succeed.

Code Example

Observed in ~/.openclaw/logs/gateway.err.log on March 20, 2026:

2026-03-20T04:51:06.440-04:00 [telegram] Polling stall detected (no getUpdates for 97.48s); forcing restart.
2026-03-20T04:51:21.451-04:00 [telegram] Polling runner stop timed out after 15s; forcing restart cycle.
The same pattern repeated again at 04:59, 05:07, 05:16, 05:24, 05:32, 05:41, 05:49, 05:57, 06:06, and 06:14 EDT.

Direct connectivity evidence from the same host during the inspection:

HTTPS requests to the Telegram Bot API returned HTTP 200 consistently.
Total request time was about 0.36s.

Installed source evidence from the tested build:

Telegram polling stall threshold is 90s in dist/reply-Bm8VrLQh.js.
Poll stop grace is 15s in the same file.
Telegram runner fetch timeout is 30s in the same file.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Telegram polling repeatedly stalls and restarts on OpenClaw 2026.3.13 on macOS, causing intermittent response gaps even though direct Telegram API requests from the same host succeed.

Steps to reproduce

  1. Start OpenClaw 2026.3.13 on macOS with Telegram enabled in polling mode.
  2. Leave the gateway running.
  3. Observe ~/.openclaw/logs/gateway.err.log over time.
  4. Confirm repeated log entries of Polling stall detected (no getUpdates for 97.48s) followed by Polling runner stop timed out after 15s.

Expected behavior

Under the same configuration on the same host, Telegram sometimes replies normally; the polling session should continue running and processing updates instead of entering a repeated stall/restart cycle.

Actual behavior

Telegram polling repeatedly stalls and restarts. In ~/.openclaw/logs/gateway.err.log on March 20, 2026, the log repeatedly shows Polling stall detected (no getUpdates for 97.48s) and then Polling runner stop timed out after 15s, with repeated cycles roughly every 8 minutes. User-visible effect was delayed or missing Telegram responses.

OpenClaw version

2026.3.13 (61d171a)

Operating system

Mac OS 26.3.1

Install method

npm global

Model

ollama/qwen3.5:9b

Provider / routing chain

local Ollama at 127.0.0.1:11434

Additional provider/model setup details

Main agent was using local Ollama on the same Mac. Remote agents were also configured in this environment, but the Telegram polling stall evidence was observed in the main gateway logs independently of remote-agent routing. Relevant config was in ~/.openclaw/openclaw.json under channels.telegram and models.providers.ollama.

Logs, screenshots, and evidence

Observed in ~/.openclaw/logs/gateway.err.log on March 20, 2026:

2026-03-20T04:51:06.440-04:00 [telegram] Polling stall detected (no getUpdates for 97.48s); forcing restart.
2026-03-20T04:51:21.451-04:00 [telegram] Polling runner stop timed out after 15s; forcing restart cycle.
The same pattern repeated again at 04:59, 05:07, 05:16, 05:24, 05:32, 05:41, 05:49, 05:57, 06:06, and 06:14 EDT.

Direct connectivity evidence from the same host during the inspection:

HTTPS requests to the Telegram Bot API returned HTTP 200 consistently.
Total request time was about 0.36s.

Installed source evidence from the tested build:

Telegram polling stall threshold is 90s in dist/reply-Bm8VrLQh.js.
Poll stop grace is 15s in the same file.
Telegram runner fetch timeout is 30s in the same file.

Impact and severity

Affected: Telegram users interacting with the main OpenClaw agent on this macOS system Severity: High Frequency: Intermittent but repeated; observed recurring roughly every 8 minutes in logs during the inspection window Consequence: Delayed or missing Telegram replies; if operators add external recovery automation, the repeated poll stalls can also trigger extra gateway restarts

Additional information

Direct Telegram API connectivity from the same host remained healthy while the polling stall loop was present. During the same inspection I also found separate local configuration issues affecting agent-to-agent messaging, but those were fixed locally and were distinct from the Telegram polling stall evidence.

extent analysis

Fix Plan

To address the Telegram polling stall issue, we need to adjust the polling stall threshold and timeout settings.

  • Increase the polling stall threshold to a value higher than 97s to prevent premature restarts.
  • Adjust the poll stop grace period and Telegram runner fetch timeout to ensure they are aligned with the new threshold.

Example code changes in dist/reply-Bm8VrLQh.js:

// Increase polling stall threshold to 120s
const pollingStallThreshold = 120000; // 2 minutes

// Adjust poll stop grace period to 30s
const pollStopGrace = 30000; // 30 seconds

// Adjust Telegram runner fetch timeout to 60s
const telegramRunnerFetchTimeout = 60000; // 1 minute

Verification

To verify the fix, restart the OpenClaw gateway and monitor the ~/.openclaw/logs/gateway.err.log file for the polling stall detected and poll stop timed out messages. The frequency of these messages should decrease or disappear after applying the changes.

Extra Tips

  • Monitor the gateway logs to ensure the changes are effective and adjust the threshold and timeout values as needed.
  • Consider implementing additional logging or metrics to track polling performance and detect potential issues before they cause stalls.
  • Review the local configuration and agent-to-agent messaging setup to ensure they are not contributing to the polling stall issue.

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

Under the same configuration on the same host, Telegram sometimes replies normally; the polling session should continue running and processing updates instead of entering a repeated stall/restart cycle.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING