openclaw - 💡(How to fix) Fix [Bug]: Telegram channel: fetch-timeout 10000ms on sendChatAction/sendMessage (undici, Windows, Node 24) [2 comments, 3 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#76013Fetched 2026-05-03 04:43:19
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
3
Author
Timeline (top)
commented ×2labeled ×2closed ×1unsubscribed ×1

On Windows with Node.js 24, the OpenClaw Telegram channel fails to deliver agent replies because undici HTTP requests to api.telegram.org exceed the hardcoded 10000ms fetch timeout, even though the Telegram API itself responds in <200ms when called via native https.

Error Message

"message":"connect error: scope upgrade pending approval

Root Cause

On Windows with Node.js 24, the OpenClaw Telegram channel fails to deliver agent replies because undici HTTP requests to api.telegram.org exceed the hardcoded 10000ms fetch timeout, even though the Telegram API itself responds in <200ms when called via native https.

Fix Action

Fix / Workaround

Affected: ALL Windows users using Telegram channel with local Ollama provider. Severity: CRITICAL — Telegram channel completely non-functional on Windows. Frequency: Always (100% reproducible). Consequence: Agent generates reply but sendMessage/sendChatAction never delivered. Typing indicator appears in Telegram but no reply arrives. Workaround: None within OpenClaw. Requires external bot implementation.

Code Example

Key log lines from C:\tmp\openclaw\openclaw-2026-05-02.log:

{"subsystem":"fetch-timeout","timeoutMs":10000,"elapsedMs":21675,
 "operation":"fetchWithTimeout",
 "url":"https://api.telegram.org/bot.../getMe",
 "message":"fetch timeout reached; aborting operation"}

{"subsystem":"telegram/api",
 "message":"telegram sendChatAction failed: Network request for 'sendChatAction' failed!"}

{"subsystem":"agent/embedded","message":"[trace:embedded-run] prep stages:
 totalMs=50284 stages=core-plugin-tools:21825ms,system-prompt:11549ms,stream-setup:12066ms"}

DIAGNOSTIC: Native Node.js https.request to api.telegram.org = 118ms.
undici (used by OpenClaw) = 21675ms on same endpoint.
Bug is isolated to undici fetch layer, not network or Telegram API.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

On Windows with Node.js 24, the OpenClaw Telegram channel fails to deliver agent replies because undici HTTP requests to api.telegram.org exceed the hardcoded 10000ms fetch timeout, even though the Telegram API itself responds in <200ms when called via native https.

Steps to reproduce

  1. Run OpenClaw 2026.4.29 gateway on Windows 11 with Telegram channel configured
  2. Send any message to the bot from Telegram
  3. Agent processes message (typing indicator appears) but reply never arrives
  4. In logs observe: {"subsystem":"fetch-timeout","timeoutMs":10000,"elapsedMs":21675, "url":"https://api.telegram.org/bot.../getMe"} {"subsystem":"telegram/api","message":"telegram sendChatAction failed: Network request for 'sendChatAction' failed!"}

Expected behavior

Agent reply is delivered to Telegram after model generates response.

Actual behavior

fetch-timeout fires at 10000ms. elapsedMs=21675. sendMessage/sendChatAction fail silently. No reply delivered. Native https.request to same URL: 118ms. Only undici is affected.

OpenClaw version

OpenClaw: 2026.4.29

Operating system

Windows 11

Install method

npm global

Model

ollama/qwen3:4b (primary) / ollama/phi4-reasoning:plus (fallback)

Provider / routing chain

openclaw -> ollama (local, 127.0.0.1:11434) -> qwen3:4b

Additional provider/model setup details

Local Ollama instance on Windows 11. No cloud provider. Config: ~/.openclaw-sentinel/openclaw.json models.providers.ollama.baseUrl = http://127.0.0.1:11434 models.providers.ollama.api = ollama models.providers.ollama.timeoutSeconds = 300 GPU: AMD Radeon 8060S (Strix Halo) — 64GB UMA VRAM Model runs 100% GPU. Generation is not the bottleneck.

Logs, screenshots, and evidence

Key log lines from C:\tmp\openclaw\openclaw-2026-05-02.log:

{"subsystem":"fetch-timeout","timeoutMs":10000,"elapsedMs":21675,
 "operation":"fetchWithTimeout",
 "url":"https://api.telegram.org/bot.../getMe",
 "message":"fetch timeout reached; aborting operation"}

{"subsystem":"telegram/api",
 "message":"telegram sendChatAction failed: Network request for 'sendChatAction' failed!"}

{"subsystem":"agent/embedded","message":"[trace:embedded-run] prep stages:
 totalMs=50284 stages=core-plugin-tools:21825ms,system-prompt:11549ms,stream-setup:12066ms"}

DIAGNOSTIC: Native Node.js https.request to api.telegram.org = 118ms.
undici (used by OpenClaw) = 21675ms on same endpoint.
Bug is isolated to undici fetch layer, not network or Telegram API.

Impact and severity

Affected: ALL Windows users using Telegram channel with local Ollama provider. Severity: CRITICAL — Telegram channel completely non-functional on Windows. Frequency: Always (100% reproducible). Consequence: Agent generates reply but sendMessage/sendChatAction never delivered. Typing indicator appears in Telegram but no reply arrives. Workaround: None within OpenClaw. Requires external bot implementation.

Additional information

Root cause hypothesis

undici 8.1.0 (bundled with OpenClaw 2026.4.29) appears to hang on HTTPS connections to api.telegram.org on Windows / Node.js 24.15.0.

Native Node.js https.request to the same URL: 118ms ✅ undici fetch to the same URL: 21675ms (timeout) ❌

Possible causes:

  1. undici attempting HTTP/2 (ALPN negotiation) which Telegram API rejects, causing fallback delay > 10s hardcoded timeout
  2. undici connection pool deadlock on Windows with Node 24 + undici 8.1.0
  3. TLS session resumption failure specific to api.telegram.org on Windows

What was tried

  • NODE_OPTIONS=--dns-result-order=ipv4first → no effect
  • UNDICI_NO_ORIGIN=1 → no effect
  • DNS resolves correctly in 73ms (IPv4: 149.154.166.110)
  • Telegram API token is valid (PowerShell Invoke-RestMethod: 200ms)

Secondary issue: scope upgrade loop

On every gateway restart, telegram/native-approvals subsystem generates a new device pairing request (new UUID each time). Gateway cannot self-approve, causing PAIRING_REQUIRED loop that eventually kills the process.

Log evidence: {"subsystem":"telegram/native-approvals", "message":"connect error: scope upgrade pending approval (requestId: b7aef8f7-9b26-4171-8290-105298f9b4cf)"} {"message":"gateway closed (1008): pairing required: device is asking for more scopes than currently approved"}

System specs

  • CPU: AMD Ryzen AI Max+ 395 (Strix Halo)
  • GPU: AMD Radeon 8060S — 64GB UMA VRAM
  • RAM: 128GB LPDDR5X 8000 MT/s
  • OS: Windows 11
  • Node.js: 24.15.0
  • OpenClaw: 2026.4.29 (a448042)
  • undici: 8.1.0
  • grammy: 1.42.0

Suggested fix

Increase fetch timeout for Telegram API calls from 10000ms to ≥ 60000ms, or use native Node.js https instead of undici for Telegram channel requests.

extent analysis

TL;DR

Increase the fetch timeout for Telegram API calls or use native Node.js https instead of undici to resolve the issue.

Guidance

  • Verify that the issue is indeed caused by the undici fetch timeout by checking the logs for the "fetch-timeout" subsystem and the elapsedMs value.
  • Consider increasing the fetch timeout for Telegram API calls to a higher value, such as 60000ms, to allow for slower responses.
  • Alternatively, use native Node.js https instead of undici for Telegram channel requests to avoid the timeout issue.
  • Be aware that the root cause of the issue may be related to undici's behavior on Windows with Node.js 24, and further investigation may be needed to resolve the underlying problem.

Example

No code example is provided as the issue is related to the configuration and behavior of the undici library.

Notes

The suggested fix may not address the underlying cause of the issue, and further investigation may be needed to determine why undici is experiencing timeouts on Windows with Node.js 24.

Recommendation

Apply a workaround by increasing the fetch timeout for Telegram API calls to a higher value, such as 60000ms, to allow for slower responses. This should resolve the immediate issue, but further investigation may be needed to determine the root cause and implement a more permanent fix.

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

Agent reply is delivered to Telegram after model generates response.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Telegram channel: fetch-timeout 10000ms on sendChatAction/sendMessage (undici, Windows, Node 24) [2 comments, 3 participants]