Skip to content

[Bug]: WhatsApp event loop blocked (eventLoopDelayMaxMs=12088ms) on first inbound message — 2026.5.3-1 Windows #77443

Closed as not planned

Description

@zaff70

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading to 2026.5.3-1 on Windows 11, the WhatsApp plugin blocks the Node.js event loop (eventLoopDelayMaxMs=12088ms, eventLoopUtilization=0.999) immediately after processing the first inbound message, permanently stalling all agent model calls.

Steps to reproduce

  1. Install OpenClaw 2026.5.3-1 on Windows 11 (npm install -g openclaw@2026.5.3-1)
  2. Install WhatsApp plugin manually (openclaw plugins install @openclaw/whatsapp --force will fail due to npm bug; workaround: cd C:\Users<user>.openclaw\npm && npm install @openclaw/whatsapp@2026.5.3 --omit=dev --ignore-scripts --no-audit --no-fund --legacy-peer-deps)
  3. Enable plugin in config: openclaw config patch with {"plugins": {"entries": {"whatsapp": {"enabled": true}}}}
  4. Start gateway: gateway-start.cmd
  5. Confirm WhatsApp connects and shows Listening for personal WhatsApp inbound messages
  6. Send any inbound WhatsApp message to the linked number
  7. Observe: gateway processes the message and sends ack reaction, then event loop blocks permanently

Expected behavior

WhatsApp should process inbound messages and continue operating normally without blocking the event loop, as it did in OpenClaw 2026.4.23 (a979721) where the same phone number, credentials, and configuration handled messages stably with no event loop degradation.

Actual behavior

After the first inbound message is processed, the gateway logs the following liveness warning:

liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu interval=34s eventLoopDelayP99Ms=12088 eventLoopDelayMaxMs=12088 eventLoopUtilization=0.999 cpuCoreRatio=1.006 active=2 waiting=0 queued=0

The WhatsApp channel then exits with status 428 (Connection Terminated) and attempts auto-restart. All subsequent agent model calls stall indefinitely. Rolling back to 2026.4.23 immediately restores normal operation with the same credentials and configuration.

OpenClaw version

OpenClaw 2026.5.3-1 (2eae30e)

Operating system

Windows 11 home

Install method

npm global install (npm install -g openclaw@2026.5.3-1)

Model

anthropic/claude-sonnet-4-6 (primary), openai/gpt-5 (fallback)

Provider / routing chain

Direct Anthropic API (api_key mode) — no proxy or router

Additional provider/model setup details

Two agents configured: main (primary: anthropic/claude-sonnet-4-6, fallback: openai/gpt-5) and cron (primary: openai/gpt-4o-mini, fallback: anthropic/claude-haiku-4-5). Active Memory plugin enabled with openai/gpt-4o-mini. All models use api_key auth profiles.

Logs, screenshots, and evidence

19:06:15 [gateway] ready (8 plugins: acpx, active-memory, browser, device-pair, memory-core, phone-control, talk-voice, whatsapp; 84.4s)
19:16:25 [whatsapp] [default] starting provider (+4795001666)
19:16:36 [whatsapp] Listening for personal WhatsApp inbound messages.

18:58:14 [web-inbound] inbound message from=+4746931740 to=+4795001666 body="Hei"
18:58:14 [web-auto-reply] sending ack reaction emoji=👍
18:58:23 [whatsapp/outbound] Sent reaction "👍" -> message ACEDC3F68EF997DA7ECE2D0458DF9504

18:59:07 [web-reconnect] connection closed status=408 reconnectAttempts=1
18:59:07 [channels/whatsapp] WhatsApp Web connection closed (status 408). Retry 1/12 in 2.39s…
18:59:51 [channels/whatsapp] [default] channel exited: statusCode=428 "Connection Terminated"
18:59:51 [channels/whatsapp] [default] auto-restart attempt 1/10 in 5s

19:00:14 [diagnostic] liveness warning: reasons=event_loop_delay,event_loop_utilization,cpu 
  interval=34s eventLoopDelayP99Ms=12088 eventLoopDelayMaxMs=12088 
  eventLoopUtilization=0.999 cpuCoreRatio=1.006 active=2 waiting=0 queued=0

Additional context:

OS: Windows 11 (10.0.26200 x64)
Node: v22.22.2
WhatsApp plugin: @openclaw/whatsapp 2026.5.3
Same behavior observed on first upgrade attempt to 2026.5.2 (eventLoopDelayMaxMs=8497ms) — rolled back. Now reproduced again on 2026.5.3-1 with higher delay (12088ms).
Rollback to 2026.4.23 (a979721) immediately restores stable operation with identical credentials, config, and WhatsApp session.
Note: openclaw plugins install @openclaw/whatsapp fails on Windows with npm error Cannot read properties of undefined (reading 'spec') — likely a separate bug related to npm v10.9.7 bundled in OpenClaw conflicting with the plugin's peerDependencies structure.

Impact and severity

Affected users: Any OpenClaw user on Windows running WhatsApp as a primary channel who upgrades to 2026.5.3-1
Severity: Blocks workflow completely — WhatsApp becomes non-functional immediately after the first inbound message
Frequency: 100% reproducible — occurs on every gateway start upon receiving the first inbound WhatsApp message
Consequence: All inbound WhatsApp messages go unanswered, all cron agent model calls stall indefinitely, and the only recovery is a full rollback to 2026.4.23. This is the third consecutive release (4.29, 5.2, 5.3-1) where WhatsApp on Windows has been broken on upgrade, suggesting a systematic issue with the Windows event loop and the WhatsApp plugin's Baileys runtime on this platform.

Additional information

Last known good: 2026.4.23 (a979721) — stable, WhatsApp fully functional on same machine/credentials
First known bad: 2026.4.29 (first upgrade attempt) — WhatsApp 408 timeout loop; 2026.5.2 — event loop blocked (8497ms); 2026.5.3-1 — event loop blocked (12088ms, worse than 5.2)
Plugin install bug: openclaw plugins install @openclaw/whatsapp fails on Windows with npm error Cannot read properties of undefined (reading 'spec') in @npmcli/arborist reify.js:1404. Workaround used: manual npm install with --legacy-peer-deps in ~/.openclaw/npm/, followed by manual edits to plugins/installs.json to correct source paths from .ts to dist/*.js. This suggests the plugin installer on Windows is broken independently of the event loop bug.
Event loop pattern: The block occurs during agent model call prep (session-resource-loader: 10616ms) immediately after the first inbound message triggers an embedded agent run, suggesting the Baileys WebSocket reconnect and the agent startup compete for the event loop on Windows in a way that does not occur on 2026.4.23.
Gateway startup time: 2026.5.3-1 starts in ~8-10 seconds vs ~84 seconds for 2026.4.23 (which installs bundled runtime deps on first start). The faster startup in 5.x may be related to the different plugin loading path that exposes the event loop issue.

Activity

  1. clawsweeper commented on May 4, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 28, 2026, 3:49 PM ET / 19:49 UTC.

    Summary
    Keep open: current main has the WhatsApp 428 retry mitigation from the merged reconnect PR, but the reported Windows event-loop stall is not proven fixed and the remaining root-cause work is split across open plugin-discovery and resource-loader performance threads.

    Reproducibility: no. not by this read-only review. The reporter supplied strong live Windows logs and current source still contains the blocking-prone reload/discovery paths, but I did not run a linked WhatsApp Windows reproduction against current main.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    Manual review is needed because the remaining fix path is split across open loader/plugin-discovery work and needs maintainer-approved ownership plus live Windows WhatsApp proof.

    Review details

    Best possible solution:

    Keep this issue open until the exact Windows WhatsApp path is either live-proven fixed by the linked loader/plugin-discovery work or explicitly split into the two narrower canonical issues with maintainer agreement.

    Do we have a high-confidence way to reproduce the issue?

    No, not by this read-only review. The reporter supplied strong live Windows logs and current source still contains the blocking-prone reload/discovery paths, but I did not run a linked WhatsApp Windows reproduction against current main.

    Is this the best way to solve the issue?

    No, closing now is not the best solution. The current best path is maintainer review of the linked plugin-discovery/resource-loader fixes plus live Windows WhatsApp proof before deciding whether this exact report can be closed or split.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No fresh current-main live reproduction was run on Windows with a linked WhatsApp account, so the exact timing and first-inbound failure mode remain reporter-proven rather than independently reproduced here.
    • The merged WhatsApp retry PR mitigates one failure mode but does not prove the underlying event-loop stall is gone.
    • The open async plugin-discovery candidate is conflicting and previously reviewed as needing changes, so a new automated fix lane would duplicate unresolved maintainer work.

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

    Label changes

    Label changes:

    • remove clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.

    Label justifications:

    • P1: The report describes a real-user Windows regression where WhatsApp inbound delivery and subsequent agent/model work stall after the first message.
    • impact:message-loss: Inbound WhatsApp messages can go unanswered while the event loop is blocked and the channel reconnects.
    • impact:crash-loop: The report includes WhatsApp 428/408 exits and auto-restart/reconnect loops after long event-loop stalls.
    • maturity:stable: The affected gateway channel status/control surface maps to Gateway runtime Channel APIs, and gateway-runtime is scored M4 Stable.
    Evidence reviewed

    What I checked:

    Likely related people:

    • mcaxtr: Recent commits by Marcus Castro changed WhatsApp terminal disconnect, socket bounds, and connection startup waits on the same monitor/controller surface affected by the 428/408 behavior. (role: recent WhatsApp lifecycle contributor; confidence: high; commits: 52d9d16e1be9, 7d8b000bf78a, dd2083c7ec51; files: extensions/whatsapp/src/auto-reply/monitor.ts, extensions/whatsapp/src/connection-controller.ts)
    • vincentkoc: Recent commits by Vincent Koc touched plugin snapshot fingerprinting and registry root memoization, which are central to reducing synchronous plugin registry work without breaking freshness. (role: recent plugin registry contributor; confidence: medium; commits: cba9c0209536, 9313471fa579; files: src/plugins/plugin-registry-snapshot.ts, src/plugins/plugin-metadata-snapshot.ts, src/plugins/plugin-snapshot-fingerprint.ts)
    • steipete: Peter Steinberger has recent commits around persisted plugin install index and gateway auto-enabled config caching, and merged the WhatsApp retry-mitigation PR that partially addressed this report. (role: adjacent gateway/plugin contributor and merger; confidence: high; commits: 5443baa8527e, ca7b6be7cf41, a3c7fea5126e; files: src/plugins/plugin-registry-snapshot.ts, src/gateway/runtime-plugin-config.ts, extensions/whatsapp/src/auto-reply/monitor.ts)
    • dataCenter430: Authored the merged WhatsApp reconnect PR that added the current 428 retry mitigation and tests while explicitly leaving the Windows event-loop stall root cause for follow-up. (role: partial-fix author; confidence: high; commits: a3c7fea5126e; files: extensions/whatsapp/src/auto-reply/monitor.ts, extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts)
    • fede-kamel: Opened the broader plugin-discovery event-loop issue and authored the open async plugin-registry/status/send candidate PR that partially overlaps this report's remaining root cause. (role: open candidate-fix author; confidence: medium; commits: bf19320e83a5; files: src/plugins/plugin-registry-snapshot.ts, src/gateway/server-methods/channels.ts, src/gateway/server-methods/send.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. zaff70 commented on May 4, 2026

    @zaff70
    Author

    I can reproduce this on demand on Windows 11 (10.0.26200), Node 22.22.2, with a live linked WhatsApp account. Happy to run additional profiling or instrumentation if you can tell me what data to capture around the ack/reconnect/session-resource-loader path. Available to test any PR or build.

  3. zaff70 commented on May 5, 2026

    @zaff70
    Author

    PR #75773 regression test matches my exact reproduction — post-open 428 from Windows event-loop stall during first agent startup. I'm ready to test on live Windows with a linked WhatsApp account as soon as this merges. @steipete @obviyus — would appreciate a review when you have time

  4. openclaw-barnacle commented on May 31, 2026

    @openclaw-barnacle

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

  5. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    on Jun 14, 2026
  6. 3 remaining items

  7. added
    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:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 15, 2026
  8. added
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 28, 2026
  9. 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.

  10. clawsweeper commented on Jul 14, 2026

    @clawsweeper
    Contributor

    ClawSweeper status: review started.

    I am starting a fresh review of this issue: [Bug]: WhatsApp event loop blocked (eventLoopDelayMaxMs=12088ms) on first inbound message — 2026.5.3-1 Windows This is item 1/1 in the current shard. Shard 43/44.

    This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

    Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

  11. openclaw-barnacle commented on Jul 21, 2026

    @openclaw-barnacle

    Closing due to inactivity.
    If this is still an issue, please retry on the latest OpenClaw release and share updated details.
    If you are absolutely sure it still happens on the latest release, open a new issue with fresh steps to reproduce.

  12. locked as resolved and limited conversation to collaborators on Sep 14, 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

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper: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.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.regressionBehavior that previously worked and now failsstaleMarked 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