Skip to content

[Bug]: WhatsApp flaps and Telegram polling stalls on WSL2 in 2026.4.26 #73602

Closed as not planned

Description

@Vksh07

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

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

Activity

  1. clawsweeper commented on Apr 28, 2026

    @clawsweeper
    Contributor

    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:

    Likely related people:

    • obviyus: Recent work covers Telegram fetch fallback, polling-session lifecycle, liveness recovery, and the merged latency-cluster repair related to the reported stalls. (github.com) (role: recent Telegram transport contributor; confidence: high; commits: 1b38f80088c7, 56873b606578, a2f321ef5584; files: extensions/telegram/src/fetch.ts, extensions/telegram/src/polling-session.ts, extensions/telegram/src/polling-liveness.ts)
    • dataCenter430: Authored the merged recovery work for Baileys 428 closures and adjacent agent resource-discovery stalls that could interrupt WhatsApp keepalives. (github.com) (role: WhatsApp reconnect fix author; confidence: high; commits: 6a99d3e, 0cf732e, a3c7fea; files: extensions/whatsapp/src/auto-reply/monitor.ts, extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts)
    • steipete: Merged the WhatsApp recovery work and has recent adjacent history across Gateway diagnostics and Telegram transport surfaces involved in this reliability cluster. (github.com) (role: merger and recent cross-surface contributor; confidence: high; commits: a3c7fea, 0e8bd8e75c4c, 60fea81cf19f; files: extensions/whatsapp/src/auto-reply/monitor.ts, extensions/telegram/src/fetch.ts, src/gateway/server-runtime-services.ts)
    • vincentkoc: Assigned to the focused open Telegram dispatcher issue and recently associated with Gateway diagnostics used to route this reliability cluster. (github.com) (role: adjacent issue owner; confidence: medium; commits: 875409429244; files: src/gateway/model-pricing-cache.ts, docs/gateway/diagnostics.md)

    Codex review notes: model internal, reasoning high; reviewed against a4467f1971e9.

  2. Vksh07 commented on Apr 28, 2026

    @Vksh07
    Author

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

  3. steipete commented on Apr 29, 2026

    @steipete
    Contributor

    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 relevant openclaw logs --follow slice around one WhatsApp reconnect and one Telegram stall, plus whether proxy or custom DNS env vars are present in the systemd user service.

  4. alessandropcostabr commented on May 1, 2026

    @alessandropcostabr

    Confirming this reproduces on native Linux (not WSL2-specific) with the same version.

    Environment

    • OpenClaw: 2026.4.26 (be8c246)
    • OS: Linux Mint, kernel 6.17.0-22-generic (native, no WSL/container)
    • Node: v22.22.2
    • Install: npm global
    • Gateway mode: local loopback (systemd --user)
    • Telegram: long polling, single bot, DM-only, allowlist of 1 user

    Symptoms

    After ~5–10 min of idle, Telegram polling silently dies. Specifically:

    • [gateway] ready fires, [telegram] [default] starting provider (@Hyper_OpenClaw_bot) logs
    • Telegram menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 80 commands visible.
    • After that point, zero Telegram log entries appear, even with verbose JSON file at /tmp/openclaw/openclaw-*.log
    • Telegram API getWebhookInfo reports pending=0 and last_error=none — server side is happy
    • Direct curl to sendMessage from the same host succeeds (HTTP/2, ~600ms) — network layer is fine

    Smoking gun: kernel Recv-Q stuck

    ss -tn state established '( dport = :443 )' shows OpenClaw's TCP connection to 149.154.166.110:443 accumulating bytes the app never reads:

    Recv-Q  Send-Q  Local                  Peer
    1363    0       192.168.0.100:46216    149.154.166.110:443    # stuck for 30+ seconds
    437     0       192.168.0.100:51624    149.154.166.110:443    # stuck
    0       0       192.168.0.100:46210    149.154.166.110:443    # idle, 0/0 (separate poll)
    

    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

    Config Effect on this bug
    channels.telegram.network.autoSelectFamily: false no change
    Environment=NODE_OPTIONS=--dns-result-order=ipv4first (systemd unit) boot ~30% faster, polling still dies
    channels.telegram.commands.native: false suppresses menu text exceeded warning, polling still dies

    The combination of all three did not prevent the stall on 4.26 native Linux.

    Recovery

    Only systemctl --user restart openclaw-gateway.service recovers. 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! and deleteWebhook failed: Network request failed! appeared briefly in logs around the time of stalls (transient — direct curl worked seconds later). Suggests undici dispatcher holding stale connections that the kernel later marks dead, consistent with #48029.

    Adding rollback to 2026.4.23 to the workaround list per #75703.

  5. openclaw-barnacle commented on May 30, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  6. added
    P2Normal backlog priority with limited blast radius.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 14, 2026
  7. 13 remaining items

  8. added
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    on Jun 18, 2026
  9. added
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    and removed
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    on Jun 26, 2026
  10. openclaw-barnacle commented on Jul 13, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  11. locked as resolved and limited conversation to collaborators on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions