openclaw - 💡(How to fix) Fix [Bug]: WhatsApp "no messages in 30m" watchdog causes pathological reconnect loop during low-traffic periods [1 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#58841Fetched 2026-04-08 02:31:58
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1locked ×1

The WhatsApp Web plugin has a "no messages in 30m" inactivity watchdog that force-restarts the connection when no inbound messages arrive within 30 minutes. During low-traffic periods (nighttime, weekends), this creates a pathological reconnect loop — disconnecting every ~60 seconds indefinitely since no messages will arrive at 4 AM regardless of connection health.

Error Message

Delivery failed (whatsapp to +48450024016): Error: No active WhatsApp Web listener (account: default)

Root Cause

The WhatsApp Web plugin has a "no messages in 30m" inactivity watchdog that force-restarts the connection when no inbound messages arrive within 30 minutes. During low-traffic periods (nighttime, weekends), this creates a pathological reconnect loop — disconnecting every ~60 seconds indefinitely since no messages will arrive at 4 AM regardless of connection health.

Fix Action

Workaround

Gateway restart (openclaw gateway restart) temporarily resets the timer. No permanent config-level workaround found.

Code Example

"No messages received in 30m - restarting connection" → status=499

---

Delivery failed (whatsapp to +48450024016): Error: No active WhatsApp Web listener (account: default)
RAW_BUFFERClick to expand / collapse

Bug type

Defect (unexpected behavior)

Summary

The WhatsApp Web plugin has a "no messages in 30m" inactivity watchdog that force-restarts the connection when no inbound messages arrive within 30 minutes. During low-traffic periods (nighttime, weekends), this creates a pathological reconnect loop — disconnecting every ~60 seconds indefinitely since no messages will arrive at 4 AM regardless of connection health.

Environment

  • OpenClaw version: latest (as of 2026-04-01)
  • Platform: macOS (Apple Silicon)
  • WhatsApp channel: linked, running, connected

What happens

  1. WhatsApp connects normally, sends/receives work fine
  2. After 30 minutes with no inbound WhatsApp messages, the watchdog fires
  3. Connection force-closes with status 499
  4. Gateway auto-reconnects in ~2 seconds
  5. Still no inbound messages (it is nighttime) → watchdog fires again at 31m, 32m...
  6. After a few cycles, the loop tightens to every ~60 seconds
  7. During disconnect windows (~2-30 seconds each), outbound delivery can fail silently

Evidence from logs

"No messages received in 30m - restarting connection" → status=499

458 lifetime 499 events attributed to this watchdog. Confirmed 1 delivery failure during a disconnect window tonight:

Delivery failed (whatsapp to +48450024016): Error: No active WhatsApp Web listener (account: default)

The 499 loop runs for hours overnight until daytime traffic resumes.

Separate from #34741

Issue #34741 is about listener map desync after restart storms. This bug is about the watchdog itself being too aggressive — it mistakes "nobody is messaging at 4 AM" for "connection is dead." The WhatsApp Web connection is maintained by protocol-level keepalives; application-layer message absence is not a valid signal of connection death.

Expected behavior

  • Watchdog should NOT force-restart based solely on inbound message absence
  • Connection health should be determined by protocol-level keepalives (which Baileys already handles via 408 reconnect)
  • If the watchdog is needed, the timeout should be configurable (e.g., channels.whatsapp.inactivityTimeoutMs) and much longer (hours, not 30 minutes)

Suggested fix

Either:

  1. Remove the "no messages in 30m" watchdog entirely (Baileys already handles connection health via protocol keepalives)
  2. Make it configurable with a sensible default (e.g., 6 hours) and allow disabling
  3. Add a backoff — if the reconnect results in no new messages, exponentially increase the timeout instead of looping

Workaround

Gateway restart (openclaw gateway restart) temporarily resets the timer. No permanent config-level workaround found.

extent analysis

TL;DR

The most likely fix is to remove or make the "no messages in 30m" watchdog configurable to prevent pathological reconnect loops during low-traffic periods.

Guidance

  • Identify the root cause of the reconnect loop by analyzing the logs for the "No messages received in 30m - restarting connection" message and the resulting 499 status code.
  • Consider removing the watchdog entirely, as Baileys already handles connection health via protocol-level keepalives.
  • If the watchdog is necessary, make it configurable with a sensible default (e.g., 6 hours) and allow disabling to prevent aggressive reconnects.
  • Implement a backoff mechanism to exponentially increase the timeout if the reconnect results in no new messages, preventing the loop from tightening.

Example

No code snippet is provided, as the issue suggests modifying the existing watchdog mechanism rather than introducing new code.

Notes

The suggested fix assumes that the watchdog is not essential for maintaining connection health, which is already handled by Baileys via protocol keepalives. The fix may not apply if the watchdog serves another purpose not mentioned in the issue.

Recommendation

Apply a workaround by restarting the gateway (openclaw gateway restart) temporarily, and consider removing or making the watchdog configurable in the long term to prevent the reconnect loop. This is because the current watchdog mechanism is too aggressive and mistakes low traffic for a dead connection.

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

  • Watchdog should NOT force-restart based solely on inbound message absence
  • Connection health should be determined by protocol-level keepalives (which Baileys already handles via 408 reconnect)
  • If the watchdog is needed, the timeout should be configurable (e.g., channels.whatsapp.inactivityTimeoutMs) and much longer (hours, not 30 minutes)

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 "no messages in 30m" watchdog causes pathological reconnect loop during low-traffic periods [1 comments, 2 participants]