openclaw - 💡(How to fix) Fix [Bug]: WhatsApp flaps and Telegram polling stalls on WSL2 in 2026.4.26 [2 comments, 2 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#73602Fetched 2026-04-29 06:17:38
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×2cross-referenced ×1mentioned ×1subscribed ×1

On WSL2 with OpenClaw 2026.4.26, both configured messaging channels are unreliable:

  • WhatsApp is reported as linked/connected/healthy, but repeatedly disconnects, fails WebSocket handshakes, hits DNS EAI_AGAIN, and sometimes receives WhatsApp-side 405 Connection Failure.
  • Telegram is reported as running in polling mode, but long-polling stalls for 120+ seconds and then restarts.
  • User-visible result: WhatsApp integration effectively does not work reliably, and Telegram responses are slow, inconsistent, or incoherent because transport stalls combine with stuck agent/model runs.

This appears to be a channel runtime/network handling issue on WSL2 rather than a simple missing token or unlinked account.

Error Message

"error": "status=408 Request Time-out Connection was lost", [whatsapp] [default] channel exited: {"error":{"output":{"statusCode":408,"payload":{"message":"WebSocket Error (Opening handshake has timed out)"}}}} [whatsapp] [default] channel exited: {"error":{"data":{"errno":-3001,"code":"EAI_AGAIN","syscall":"getaddrinfo","hostname":"web.whatsapp.com"},"output":{"statusCode":408,"payload":{"message":"WebSocket Error (getaddrinfo EAI_AGAIN web.whatsapp.com)"}}}} [whatsapp] [default] channel exited: {"error":{"data":{"reason":"405","location":"frc"},"output":{"statusCode":405,"payload":{"message":"Connection Failure"}}}} [telegram] [diag] polling cycle finished reason=polling stall detected ... durationMs=124164 ... error=Network request for 'getUpdates' failed! [agent/embedded] embedded run agent end ... error=LLM request timed out [agent/embedded] embedded run agent end ... error=LLM request failed: network connection error [agent/embedded] embedded run agent end ... provider=kilocode error=402 Even when a channel receives a message, the response path can stall, time out, or fall back into a provider/payment error.

  • #7885: WhatsApp login on WSL2 fails with status=408 Request Time-out WebSocket Error even when curl https://web.whatsapp.com returns 200.

Root Cause

  • WhatsApp is reported as linked/connected/healthy, but repeatedly disconnects, fails WebSocket handshakes, hits DNS EAI_AGAIN, and sometimes receives WhatsApp-side 405 Connection Failure.
  • Telegram is reported as running in polling mode, but long-polling stalls for 120+ seconds and then restarts.
  • User-visible result: WhatsApp integration effectively does not work reliably, and Telegram responses are slow, inconsistent, or incoherent because transport stalls combine with stuck agent/model runs.

Fix Action

Fix / Workaround

[telegram] [default] starting provider
[telegram] menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 65 commands visible.
[telegram] Polling stall detected (active getUpdates stuck for 124.16s); forcing restart.
[telegram] [diag] polling cycle finished reason=polling stall detected ... durationMs=124164 ... error=Network request for 'getUpdates' failed!
[telegram] polling runner stopped (polling stall detected); restarting in 2.19s.
[telegram] [diag] closing stale transport before rebuild
[telegram] [diag] rebuilding transport for next polling cycle
[telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=UND_ERR_CONNECT_TIMEOUT)
[telegram] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=UND_ERR_CONNECT_TIMEOUT)

Temporary workarounds under consideration

No durable workaround has been confirmed for this exact WSL2 + 2026.4.26 setup.

Code Example

{
  "telegram": {
    "configured": true,
    "running": true,
    "tokenSource": "config",
    "mode": "polling"
  },
  "whatsapp": {
    "configured": true,
    "statusState": "linked",
    "linked": true,
    "running": true,
    "connected": true,
    "healthState": "healthy",
    "lastDisconnect": {
      "status": 408,
      "error": "status=408 Request Time-out Connection was lost",
      "loggedOut": false
    },
    "reconnectAttempts": 1
  }
}

---

[whatsapp] [default] starting provider (+91...)
[whatsapp] Listening for personal WhatsApp inbound messages.
[whatsapp] Web connection closed (status 408). Retry 1/12 in 2.4s… (status=408 Request Time-out Connection was lost)
[whatsapp] [default] channel exited: {"error":{"output":{"statusCode":408,"payload":{"message":"WebSocket Error (Opening handshake has timed out)"}}}}
[whatsapp] [default] channel exited: {"error":{"data":{"errno":-3001,"code":"EAI_AGAIN","syscall":"getaddrinfo","hostname":"web.whatsapp.com"},"output":{"statusCode":408,"payload":{"message":"WebSocket Error (getaddrinfo EAI_AGAIN web.whatsapp.com)"}}}}
[whatsapp] [default] channel exited: {"error":{"data":{"reason":"405","location":"frc"},"output":{"statusCode":405,"payload":{"message":"Connection Failure"}}}}
[whatsapp] [default] auto-restart attempt 6/10 in 164s
[whatsapp] [default] channel stop exceeded 5000ms after abort; continuing shutdown
[whatsapp] Failed hydrating participating groups on connect: 1006

---

[telegram] [default] starting provider
[telegram] menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 65 commands visible.
[telegram] Polling stall detected (active getUpdates stuck for 124.16s); forcing restart.
[telegram] [diag] polling cycle finished reason=polling stall detected ... durationMs=124164 ... error=Network request for 'getUpdates' failed!
[telegram] polling runner stopped (polling stall detected); restarting in 2.19s.
[telegram] [diag] closing stale transport before rebuild
[telegram] [diag] rebuilding transport for next polling cycle
[telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=UND_ERR_CONNECT_TIMEOUT)
[telegram] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=UND_ERR_CONNECT_TIMEOUT)

---

curl -I -L --max-time 15 https://web.whatsapp.com
# HTTP/2 200

curl -I -L --max-time 15 https://api.telegram.org
# HTTP/2 302 -> HTTP/2 200

---

getent hosts web.whatsapp.com
# resolves to WhatsApp CDN host

getent hosts api.telegram.org
# resolves IPv6 address

---

[diagnostic] stuck session ... state=processing age=... queueDepth=0
[session-write-lock] releasing lock held for 88633ms (max=15000ms)
[agent/embedded] embedded run agent end ... error=LLM request timed out
[agent/embedded] embedded run agent end ... error=LLM request failed: network connection error
[agent/embedded] embedded run agent end ... provider=kilocode error=402

---

env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy \
  openclaw channels status
RAW_BUFFERClick to expand / collapse

Bug type

Channel reliability / WSL2 regression

Summary

On WSL2 with OpenClaw 2026.4.26, both configured messaging channels are unreliable:

  • WhatsApp is reported as linked/connected/healthy, but repeatedly disconnects, fails WebSocket handshakes, hits DNS EAI_AGAIN, and sometimes receives WhatsApp-side 405 Connection Failure.
  • Telegram is reported as running in polling mode, but long-polling stalls for 120+ seconds and then restarts.
  • User-visible result: WhatsApp integration effectively does not work reliably, and Telegram responses are slow, inconsistent, or incoherent because transport stalls combine with stuck agent/model runs.

This appears to be a channel runtime/network handling issue on WSL2 rather than a simple missing token or unlinked account.

Environment

  • OpenClaw: 2026.4.26 (be8c246)
  • OS: WSL2 Ubuntu 24.04.4 LTS on Windows
  • Kernel: 6.6.87.2-microsoft-standard-WSL2
  • Install method: npm global (~/.npm-global/bin/openclaw)
  • Gateway mode: local loopback
  • Node used by service: /usr/bin/node
  • Channels enabled: telegram, whatsapp
  • Telegram mode: polling
  • WhatsApp mode: WhatsApp Web / linked account

Channel status snapshot

openclaw channels status --json reports both channels as configured/running:

{
  "telegram": {
    "configured": true,
    "running": true,
    "tokenSource": "config",
    "mode": "polling"
  },
  "whatsapp": {
    "configured": true,
    "statusState": "linked",
    "linked": true,
    "running": true,
    "connected": true,
    "healthState": "healthy",
    "lastDisconnect": {
      "status": 408,
      "error": "status=408 Request Time-out Connection was lost",
      "loggedOut": false
    },
    "reconnectAttempts": 1
  }
}

So the UI/status layer can claim WhatsApp is healthy while recent logs show repeated disconnects/restarts.

WhatsApp symptoms / logs

Representative logs:

[whatsapp] [default] starting provider (+91...)
[whatsapp] Listening for personal WhatsApp inbound messages.
[whatsapp] Web connection closed (status 408). Retry 1/12 in 2.4s… (status=408 Request Time-out Connection was lost)
[whatsapp] [default] channel exited: {"error":{"output":{"statusCode":408,"payload":{"message":"WebSocket Error (Opening handshake has timed out)"}}}}
[whatsapp] [default] channel exited: {"error":{"data":{"errno":-3001,"code":"EAI_AGAIN","syscall":"getaddrinfo","hostname":"web.whatsapp.com"},"output":{"statusCode":408,"payload":{"message":"WebSocket Error (getaddrinfo EAI_AGAIN web.whatsapp.com)"}}}}
[whatsapp] [default] channel exited: {"error":{"data":{"reason":"405","location":"frc"},"output":{"statusCode":405,"payload":{"message":"Connection Failure"}}}}
[whatsapp] [default] auto-restart attempt 6/10 in 164s
[whatsapp] [default] channel stop exceeded 5000ms after abort; continuing shutdown
[whatsapp] Failed hydrating participating groups on connect: 1006

The account is linked and can briefly enter a listening state, but the WebSocket connection repeatedly fails or is terminated.

Telegram symptoms / logs

Representative logs:

[telegram] [default] starting provider
[telegram] menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 65 commands visible.
[telegram] Polling stall detected (active getUpdates stuck for 124.16s); forcing restart.
[telegram] [diag] polling cycle finished reason=polling stall detected ... durationMs=124164 ... error=Network request for 'getUpdates' failed!
[telegram] polling runner stopped (polling stall detected); restarting in 2.19s.
[telegram] [diag] closing stale transport before rebuild
[telegram] [diag] rebuilding transport for next polling cycle
[telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=UND_ERR_CONNECT_TIMEOUT)
[telegram] fetch fallback: DNS-resolved IP unreachable; trying alternative Telegram API IP (codes=UND_ERR_CONNECT_TIMEOUT)

This makes Telegram inbound/reply behavior slow and inconsistent.

Basic network probes from WSL

Basic HTTPS probes from the same WSL environment succeed:

curl -I -L --max-time 15 https://web.whatsapp.com
# HTTP/2 200

curl -I -L --max-time 15 https://api.telegram.org
# HTTP/2 302 -> HTTP/2 200

DNS also resolves both domains from WSL:

getent hosts web.whatsapp.com
# resolves to WhatsApp CDN host

getent hosts api.telegram.org
# resolves IPv6 address

So the environment is not fully offline. The failures seem specific to long-lived WhatsApp WebSocket / Telegram long-poll traffic and/or how the channel runtime handles WSL DNS/network intermittency.

Downstream agent/model symptoms

Transport failures are compounded by agent/model failures, which likely explain the user-visible “non-coherent/inconsistent” replies:

[diagnostic] stuck session ... state=processing age=... queueDepth=0
[session-write-lock] releasing lock held for 88633ms (max=15000ms)
[agent/embedded] embedded run agent end ... error=LLM request timed out
[agent/embedded] embedded run agent end ... error=LLM request failed: network connection error
[agent/embedded] embedded run agent end ... provider=kilocode error=402

Even when a channel receives a message, the response path can stall, time out, or fall back into a provider/payment error.

What was ruled out

  • WhatsApp is not simply unlinked; status says linked and connected at times.
  • Telegram is not simply unconfigured; it starts in polling mode and periodically rebuilds transport.
  • Basic HTTPS to web.whatsapp.com and api.telegram.org from WSL works.
  • The failure is not limited to one user action; logs show recurring disconnects/stalls over time.

Possible related issues / upstream context

  • #59833: Telegram polling stalls on startup in WSL2 in 2026.4.x-era builds.
  • #7885: WhatsApp login on WSL2 fails with status=408 Request Time-out WebSocket Error even when curl https://web.whatsapp.com returns 200.
  • #13544: WhatsApp DNS hiccup / EAI_AGAIN web.whatsapp.com and timeout reconnects.
  • WhiskeySockets/Baileys#2370: WhatsApp/Baileys 405 Connection Failure during WebSocket/device handshake.

Expected behavior

  • WhatsApp should remain connected once linked, or classify the channel unhealthy while it is flapping.
  • Telegram polling should recover quickly from transient network failures and should not stall for 120+ seconds before restart.
  • Channel status should reflect recent disconnect/retry state accurately, not show “healthy” while repeated reconnect failures are happening.
  • Replies should not become delayed/incoherent due to unbounded stuck sessions or provider fallback loops.

Actual behavior

  • WhatsApp repeatedly disconnects or fails to reconnect despite linked/healthy status.
  • Telegram polling stalls and restarts after long delays.
  • Agent/model failures and session locks compound the channel transport issues, making responses delayed or inconsistent.

Suggested investigation

  • Check whether WSL2 needs special DNS/IP family handling for WhatsApp WebSocket and Telegram long-polling beyond the current sticky IPv4 fallback.
  • Review WhatsApp channel health classification: a linked account with repeated 408, EAI_AGAIN, 405, and 1006 should probably not report healthy.
  • Review Telegram polling watchdog behavior under WSL2 and provider/model load.
  • Consider exposing recent channel transport errors in channels status so the status output matches logs.
  • Consider bounding stuck agent/session/model work so channel replies do not degrade into long-running inconsistent states.

Temporary workarounds under consideration

No durable workaround has been confirmed for this exact WSL2 + 2026.4.26 setup.

Potential diagnostic workarounds to validate:

env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy \
  openclaw channels status

and forcing IPv4/DNS behavior if supported by channel runtime, since logs show Telegram trying sticky IPv4 fallback after UND_ERR_CONNECT_TIMEOUT.

the last working version [on WSL2 was 2026.4.23. It was unusuable post that @steipete

extent analysis

TL;DR

The most likely fix involves adjusting DNS and IP family handling for WhatsApp WebSocket and Telegram long-polling in the WSL2 environment, potentially requiring changes to the OpenClaw configuration or the underlying network setup.

Guidance

  1. Investigate WSL2 DNS settings: Review how WSL2 handles DNS resolution, especially for WebSocket and long-polling connections, to ensure it's not causing the repeated disconnects and stalls.
  2. Adjust OpenClaw configuration: Consider configuring OpenClaw to use a specific IP family (e.g., IPv4) for WhatsApp and Telegram connections, as the logs suggest issues with DNS resolution and connection timeouts.
  3. Review channel health classification: Update the health classification logic for WhatsApp to reflect repeated errors (e.g., 408, EAI_AGAIN, 405) as unhealthy, rather than reporting a linked account as healthy.
  4. Implement polling watchdog adjustments: Adjust the polling watchdog behavior for Telegram under WSL2 to recover more quickly from transient network failures and prevent long stalls.
  5. Test with previous version: If possible, test with version 2026.4.23, which was reported to be the last working version on WSL2, to isolate the issue.

Example

No specific code example is provided, as the issue seems related to configuration and environment settings rather than a code snippet.

Notes

The exact solution may depend on the specifics of the WSL2 environment, OpenClaw version, and network configuration. The provided guidance is based on the information given and may require further investigation and testing to fully resolve the issue.

Recommendation

Apply a workaround by adjusting the DNS and IP family handling for WhatsApp and Telegram connections, as this seems to be a key factor in the repeated disconnects and stalls. If a previous version (2026.4.23) is known to work, temporarily downgrading might also be a viable option until 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

  • WhatsApp should remain connected once linked, or classify the channel unhealthy while it is flapping.
  • Telegram polling should recover quickly from transient network failures and should not stall for 120+ seconds before restart.
  • Channel status should reflect recent disconnect/retry state accurately, not show “healthy” while repeated reconnect failures are happening.
  • Replies should not become delayed/incoherent due to unbounded stuck sessions or provider fallback loops.

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]: WhatsApp flaps and Telegram polling stalls on WSL2 in 2026.4.26 [2 comments, 2 participants]