Repository navigation
Description
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-side405 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.comandapi.telegram.orgfrom WSL works. - The failure is not limited to one user action; logs show recurring disconnects/stalls over time.
Possible related issues / upstream context
- [Bug]: Telegram polling stalls on startup in 2026.4.1 (WSL2) #59833: Telegram polling stalls on startup in WSL2 in 2026.4.x-era builds.
- [Bug]: openclaw channels login error #7885: WhatsApp login on WSL2 fails with
status=408 Request Time-out WebSocket Erroreven whencurl https://web.whatsapp.comreturns 200. - Openclaw: Problems with dns failure #13544: WhatsApp DNS hiccup /
EAI_AGAIN web.whatsapp.comand timeout reconnects. - [BUG]Connection Failure error 405 WhiskeySockets/Baileys#2370: WhatsApp/Baileys
405 Connection Failureduring 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, and1006should probably not report healthy. - Review Telegram polling watchdog behavior under WSL2 and provider/model load.
- Consider exposing recent channel transport errors in
channels statusso 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 statusand 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
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Apr 28, 2026
Thanks for the report. I checked current
main, but this shell is missing enough reproduction detail to verify a current bug.Close as stale insufficient information: this version-specific umbrella report has no current-main or v2026.6.11 confirmation, while Telegram recovery/status behavior and WhatsApp reconnect handling have materially changed and newer focused issues now track the remaining reproducible failure classes. (github.com)
Review details
Best possible solution:
Close this outdated umbrella, continue current Telegram and gateway work in the focused open trackers, and open a fresh WhatsApp issue only if v2026.6.11 still reproduces with status/probe output and one complete reconnect log slice.
Do we have a high-confidence way to reproduce the issue?
No. The report has credible historical reproductions on 2026.4.26, including native Linux evidence, but nobody has reproduced the combined WhatsApp, Telegram, and session failure on current main or v2026.6.11.
Is this the best way to solve the issue?
No. A single broad fix is no longer the best path because current evidence separates Telegram transport, gateway/event-loop behavior, and WhatsApp reconnect handling into distinct owner boundaries and focused trackers.
Security review:
Security review: This is an ordinary reliability issue with no proposed patch to security-review.
AGENTS.md: found and applied where relevant.
What I checked:
docs/channels/telegram.md. (docs/channels/telegram.md, a4467f1971e9)extensions/whatsapp/src/auto-reply/monitor.ts, a3c7fea)src/plugins/loader.ts, a2f321ef5584)Likely related people:
extensions/telegram/src/fetch.ts,extensions/telegram/src/polling-session.ts,extensions/telegram/src/polling-liveness.ts)extensions/whatsapp/src/auto-reply/monitor.ts,extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts)extensions/whatsapp/src/auto-reply/monitor.ts,extensions/telegram/src/fetch.ts,src/gateway/server-runtime-services.ts)src/gateway/model-pricing-cache.ts,docs/gateway/diagnostics.md)Codex review notes: model internal, reasoning high; reviewed against a4467f1971e9.
Vksh07 commentedon Apr 28, 2026
the last working version [on WSL2 was 2026.4.23. It was unusuable post that
steipete commentedon Apr 29, 2026
Rechecked this after the Gateway handshake/startup fixes that closed #73592 and #73652.
Keeping this open. Current main now covers the local Gateway timing/startup pieces and also makes WhatsApp status show recent reconnects even when the socket has returned to a healthy-looking state, but that still does not prove the full WSL2 channel regression is fixed. This issue still has the channel-transport symptoms: WhatsApp WebSocket/DNS/405 flapping and Telegram hitting the long-poll stall watchdog path.
Next useful proof is a fresh WSL2 retest on current main with
openclaw channels status --json,openclaw channels status --probe, the relevantopenclaw logs --followslice around one WhatsApp reconnect and one Telegram stall, plus whether proxy or custom DNS env vars are present in the systemd user service.alessandropcostabr commentedon May 1, 2026
Confirming this reproduces on native Linux (not WSL2-specific) with the same version.
Environment
2026.4.26 (be8c246)Symptoms
After ~5–10 min of idle, Telegram polling silently dies. Specifically:
[gateway] readyfires,[telegram] [default] starting provider (@Hyper_OpenClaw_bot)logsTelegram menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 80 commands visible./tmp/openclaw/openclaw-*.loggetWebhookInforeportspending=0andlast_error=none— server side is happysendMessagefrom the same host succeeds (HTTP/2, ~600ms) — network layer is fineSmoking gun: kernel Recv-Q stuck
ss -tn state established '( dport = :443 )'shows OpenClaw's TCP connection to149.154.166.110:443accumulating bytes the app never reads:The 1363-byte buffer never drains. Process is alive (~20% CPU, Discord still serving), Telegram polling thread/promise is parked on the dead socket.
Mitigations tested (all from #75377), partial relief only
channels.telegram.network.autoSelectFamily: falseEnvironment=NODE_OPTIONS=--dns-result-order=ipv4first(systemd unit)channels.telegram.commands.native: falsemenu text exceededwarning, polling still diesThe combination of all three did not prevent the stall on 4.26 native Linux.
Recovery
Only
systemctl --user restart openclaw-gateway.servicerecovers. Hot-reload triggered via config change (reload applied) does NOT recover — the new Telegram channel instance gets the same dead state within minutes.Note on intermittent network errors
On the same install,
sendMessage failed: Network request failed!anddeleteWebhook failed: Network request failed!appeared briefly in logs around the time of stalls (transient — directcurlworked seconds later). Suggests undici dispatcher holding stale connections that the kernel later marks dead, consistent with #48029.Adding rollback to
2026.4.23to the workaround list per #75703.openclaw-barnacle commentedon May 30, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
13 remaining items
openclaw-barnacle commentedon Jul 13, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.