I am running 2026.4.26; On cold start, when the WhatsApp channel exits with a 428 (Connection Terminated) during its initial reconnect cycle, the
agent:main:mainsession appears to restart multiple times. Evidence: a webhook registered to that session re-registers 5 times over ~4 minutes, each re-registration correlating with session reinit. This creates contention during startup — cron can't reconcile, Telegram WS handshakes time out, and the gateway is generally noisy.Two questions:
- Should a WhatsApp channel exit (428) be able to trigger a main session restart? Is this expected behavior?
- Is there a recommended way to configure startup grace periods or channel/plugin initialization ordering to reduce this kind of cold-start stampede?
#> WhatsApp 428 exit causing repeated main session restarts on cold start
1 messages · Page 1 of 1 (latest)
I checked the 2026.4.26 docs/source path: a WhatsApp 428 should not restart agent:main:main. It should be handled as WhatsApp-channel reconnect/restart behavior. 428 is retryable; only 440 conflict / logged-out style states are terminal.
What can happen: WhatsApp connect/disconnect queues system events into the resolved main session, so the main session may look active. But if your webhook is truly re-registering because the main session object is being recreated, that sounds like a bug/regression, not expected behavior.
There isn’t a public “channel startup ordering” knob. Channels start concurrently; the exposed dampening knobs in 2026.4.26 are health/reconnect related:
{
web: {
reconnect: {
initialMs: 5000,
maxMs: 120000,
factor: 1.6,
jitter: 0.3,
maxAttempts: 0, // keep retrying instead of exiting the WA monitor
},
},
gateway: {
channelHealthCheckMinutes: 10,
channelStaleEventThresholdMinutes: 45,
channelMaxRestartsPerHour: 3,
},
channels: {
whatsapp: {
healthMonitor: { enabled: false }, // optional: isolate WA from health-monitor restarts
},
},
}
Docs: https://docs.openclaw.ai/gateway/health and https://docs.openclaw.ai/channels/whatsapp