Summary
The WhatsApp web monitor watchdog has a hardcoded MESSAGE_TIMEOUT_MS of 30 minutes (1800s). On low-traffic setups (e.g., DM-only with dmPolicy: allowlist), it's common to go hours without inbound messages. The watchdog treats this as a dead connection and force-closes it with status 499 ("watchdog-timeout"), triggering reconnect loops that eventually escalate to 440 (session conflict).
Root Cause
In channel.runtime-Cu2TxQlg.js (line ~2531):
const MESSAGE_TIMEOUT_MS = tuning.messageTimeoutMs ?? 1800 * 1e3;
const WATCHDOG_CHECK_MS = tuning.watchdogCheckMs ?? 60 * 1e3;
The WebMonitorTuning type defines messageTimeoutMs and watchdogCheckMs as optional, but no config path in openclaw.json exposes them. The tuning object is passed as {} from the gateway, so the 30-minute default always wins.
Environment
- OS: Ubuntu 22.04 (DigitalOcean VPS)
- OpenClaw: 2026.3.23-2
- Node: v22.22.0
- Config:
channels.whatsapp.dmPolicy: allowlist, single allowed number
Steps to Reproduce
- Configure WhatsApp with
dmPolicy: allowlist and a single allowed number
- Start gateway
- Wait ~30 minutes without sending any WhatsApp messages
- Observe watchdog firing every 60s, force-closing the connection with 499
Logs
12:47:14 [whatsapp] No messages received in 150m - restarting connection
12:47:15 [whatsapp] Web connection closed (status 499). Retry 1/12 in 2.19s… (status=499)
12:47:18 [whatsapp] Listening for personal WhatsApp inbound messages.
12:48:18 [whatsapp] No messages received in 151m - restarting connection
... (repeats every 60s)
12:53:41 [whatsapp] Web connection closed (status 440: session conflict)
Expected Behavior
Either:
- Make
messageTimeoutMs configurable via channels.whatsapp.messageTimeoutMs (or plugins.entries.whatsapp.config.messageTimeoutMs)
- Disable the watchdog by default for allowlist DM-only setups where long idle periods are normal
- Increase the default significantly (e.g., 24h) — a 30-minute timeout is unreasonable for a personal assistant bot
Workaround
Gateway restart resets the lastInboundAt timer, temporarily clearing the loop. But it recurs after the next 30-minute idle window.
Related Issues
Summary
The WhatsApp web monitor watchdog has a hardcoded
MESSAGE_TIMEOUT_MSof 30 minutes (1800s). On low-traffic setups (e.g., DM-only withdmPolicy: allowlist), it's common to go hours without inbound messages. The watchdog treats this as a dead connection and force-closes it with status 499 ("watchdog-timeout"), triggering reconnect loops that eventually escalate to 440 (session conflict).Root Cause
In
channel.runtime-Cu2TxQlg.js(line ~2531):The
WebMonitorTuningtype definesmessageTimeoutMsandwatchdogCheckMsas optional, but no config path inopenclaw.jsonexposes them. Thetuningobject is passed as{}from the gateway, so the 30-minute default always wins.Environment
channels.whatsapp.dmPolicy: allowlist, single allowed numberSteps to Reproduce
dmPolicy: allowlistand a single allowed numberLogs
Expected Behavior
Either:
messageTimeoutMsconfigurable viachannels.whatsapp.messageTimeoutMs(orplugins.entries.whatsapp.config.messageTimeoutMs)Workaround
Gateway restart resets the
lastInboundAttimer, temporarily clearing the loop. But it recurs after the next 30-minute idle window.Related Issues