Repository navigation
Description
Summary
After upgrading to 2026.4.26 (which included WhatsApp stability improvements), the WhatsApp inbound handler enters a silent failure loop within <24 hours. The built-in watchdog correctly detects the problem (app-silent) but the 499 reconnect it triggers does not restore inbound message delivery. This persists across multiple full gateway restarts.
Related: #66920, #63855 — same symptom (silent inbound message loss with "Listening" logged), but those were filed against 2026.4.8–2026.4.14. This reports the issue persisting/regressing in 2026.4.26.
Environment
- OpenClaw: 2026.4.26 (be8c246)
- Node: v25.8.2
- macOS 26.2 (arm64)
- Two WhatsApp accounts (default + secondary), dual-account setup
sleep 0,disksleep 0,displaysleep 0confirmed — not a system sleep issue
Observed Behavior
Timeline (all times UTC-4)
- 10:39 — Last successful inbound message received (group message on default account)
- 11:53 — One more inbound, then silence
- 12:27–12:29 — Built-in watchdog starts warning:
⚠️ web gateway heartbeat - no messages in 30+ minutes(correct detection) - 13:20 — Gateway SIGTERM restart (watchdog-triggered)
- After 13:20 — WhatsApp connects, logs "Listening for personal WhatsApp inbound messages" on both accounts
messagesHandled: 0,lastInboundAt: null— zero inbound messages processed after reconnect- 15:20, 17:20, 19:20 — Three more full gateway restarts, same result each time
- 21:05 — Manual restart finally restored connectivity (both accounts connected)
Key log patterns
Watchdog fires correctly but reconnect does not restore inbound:
watchdogReason: "app-silent"
minutesSinceAppActivity: 120
lastInboundAt: null
messagesHandled: 0
408 disconnects still occurring throughout the day:
WhatsApp Web connection closed (status 408). Retry 1/12 in 2.37s…
Secondary account sends fail with forbidden:
failed to send via web session — err: "Error: forbidden"
No active WhatsApp Web listener (account: secondary)
After each restart, "Listening" logged but no inbound ever arrives:
[whatsapp] Listening for personal WhatsApp inbound messages.
[whatsapp] Listening for personal WhatsApp inbound messages.
(Two lines = two accounts connecting, but messagesHandled stays at 0)
Expected Behavior
- After watchdog-triggered reconnect or gateway restart, inbound messages should be delivered
- The 408 → reconnect cycle should fully re-register message event handlers
messagesHandledshould increment when messages are sent to bound groups
Analysis
The new built-in watchdog (checking minutesSinceAppActivity) is a great improvement over the old behavior — it correctly identifies the stale connection. However, the reconnect path (499 → fresh connection → "Listening") appears to not fully restore the inbound message pipeline. The connection is established but the event handler registration is incomplete.
This may be the same underlying Baileys event handler registration issue from #66920/#63855 surviving the fix — the reconnect re-establishes the WebSocket but does not re-register the messages.upsert (or equivalent) listener.
Reproduction
- Configure dual-account WhatsApp with group allowlists
- Let the gateway run — 408 disconnects will occur naturally
- After the first
app-silentwatchdog cycle (~2 hours), observe thatmessagesHandled: 0andlastInboundAt: nullpersist - Send a message to a bound group — it will not appear in logs
- Restart gateway — connection logs "Listening" but inbound remains dead
- Eventually a restart may restore it (non-deterministic — took 5 restart cycles in our case)
Workaround
Repeated full gateway restarts eventually restore the connection (non-deterministic).
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
legonhilltech-jpg commentedon Apr 29, 2026
Update: Fresh QR re-link with wiped credentials — same result
Completely deleted both WhatsApp credential directories (
~/.openclaw/credentials/whatsapp/default/andsecondary/), stopped the gateway (unloaded LaunchAgent to prevent auto-restart), started fresh, and re-linked the primary account via QR scan.Result: Same behavior. Connection established, "Listening for personal WhatsApp inbound messages" logged, but inbound messages sent to a bound group do not appear in logs.
Inbound messagelog entries are completely absent post-reconnect.This rules out:
The inbound message handler is simply not registering or firing on 2026.4.26, even with a completely fresh session. The issue appears to be in the plugin code itself, not in connection state.
Additional observation: 408 churn increased dramatically
After the upgrade to 2026.4.26, 408 disconnects are occurring every 1-3 minutes (previously ~17 min intervals). Timeline from tonight:
This is far more aggressive than the pre-upgrade pattern and may be contributing to the inbound handler failure.
clawsweeper commentedon Apr 30, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Current main has a focused WhatsApp reconnect/liveness implementation for the reported post-408 app-silent failure path, with regression coverage and docs/changelog notes tying it to the related #63855/#66920 reports. The fix is on main but I could not verify a containing release tag, so users on v2026.4.27 or older still need a newer build.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the current plugin-owned reconnect and inbound fallback implementation on main, and ship it in the next release so 2026.4.26/v2026.4.27 users can move off the affected behavior without adding core-specific WhatsApp policy.
Do we have a high-confidence way to reproduce the issue?
Yes. The issue maps to an existing focused e2e reproduction that simulates a 408 reconnect followed by continued transport frames with no app-message delivery and verifies that the monitor creates another listener; the original nondeterministic live dual-account soak was not rerun here.
Is this the best way to solve the issue?
Yes. The current fix stays inside the WhatsApp plugin boundary, separates transport liveness from app-message silence, preserves quiet healthy sessions, adds a shorter recovery window for recently active reconnects, and adds a group metadata fallback without moving WhatsApp-specific policy into core.
Security review:
Security review: No PR diff was under review; this is ordinary WhatsApp runtime bug triage, not a patch security review.
What I checked:
extensions/whatsapp/src/connection-controller.ts:607, 46888f5afbe9)extensions/whatsapp/src/auto-reply/monitor.ts:225, 46888f5afbe9)extensions/whatsapp/src/inbound/monitor.ts:788, 46888f5afbe9)extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts:517, 46888f5afbe9)docs/channels/whatsapp.md. (docs/channels/whatsapp.md:153, 46888f5afbe9)CHANGELOG.md:340, 46888f5afbe9)Likely related people:
extensions/whatsapp/src/connection-controller.ts,extensions/whatsapp/src/auto-reply/monitor.ts,extensions/whatsapp/src/inbound/monitor.ts)CHANGELOG.md,extensions/whatsapp/src/socket-timing.ts,src/config/types.base.ts)Codex review notes: model gpt-5.5, reasoning high; reviewed against 46888f5afbe9; fix evidence: commit 005eeca06f3c, main fix timestamp 2026-04-30T08:52:12Z.