Environment:
- OpenClaw 2026.4.14
- custom channel plugin: whatsapp-cloud
- plugin starts an HTTP webhook server on port 3100 inside startAccount()
Observed behavior:
- startAccount() starts the webhook listener, logs “Channel started”, then returns
- OpenClaw runtime then treats the channel as exited and schedules auto-restart
- next restart hits:
Webhook server error: listen EADDRINUSE: address already in use :::3100 - this repeats with auto-restart attempts
Relevant runtime behavior:
- in server.impl, startAccount() is wrapped as a tracked promise
- when that promise resolves/finally, runtime marks channel stopped and schedules restart
Question:
For custom channels, is startAccount() expected to remain pending/alive until abortSignal fires?
If yes, is the correct pattern:
- start webhook server
- await a promise tied to abortSignal
- on abort, close the server and resolve
Current hypothesis:
our plugin is wrong because it starts the server and returns immediately, so OpenClaw restarts it forever.
Can you confirm the intended lifecycle contract for custom channel startAccount()?