openclaw - 💡(How to fix) Fix [Feature]: Native WAHA channel adapter (alongside Baileys) for stabler WhatsApp [1 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#73016Fetched 2026-04-28 06:28:37
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
1
Participants

Request native WAHA (https://github.com/devlikeapro/waha) as a first-class channel in OpenClaw, alongside the existing Baileys-backed whatsapp channel. WAHA is a self-hostable, Dockerized HTTP+webhook gateway around the WhatsApp Web protocol that abstracts the Baileys (@whiskeysockets/baileys) library behind a stable REST API and a webhook event stream.

Root Cause

WAHA decouples OpenClaw from Baileys upgrades. It runs in its own container, exposes a REST API for outbound and a webhook delivery stream for inbound, and supports multiple engines (NOWEB, WEBJS, GOWS) so users can pick whichever is most stable for their account/region. Several OpenClaw users (including us) already run WAHA alongside Baileys — currently we use it for outbound alerts only because there is no native ingest path, so inbound still relies on the Baileys session and remains the failure mode.

Fix Action

Fix / Workaround

Workarounds we are running locally today

RAW_BUFFERClick to expand / collapse

Summary

Request native WAHA (https://github.com/devlikeapro/waha) as a first-class channel in OpenClaw, alongside the existing Baileys-backed whatsapp channel. WAHA is a self-hostable, Dockerized HTTP+webhook gateway around the WhatsApp Web protocol that abstracts the Baileys (@whiskeysockets/baileys) library behind a stable REST API and a webhook event stream.

Motivation

The current whatsapp plugin is a direct Baileys integration. In production it works, but it carries the well-known instability surface of the unofficial WhatsApp Web protocol:

  • Frequent Web connection closed (status 408) storms — auto-recoverable but noisy and very visible in logs/dashboards.
  • NOWEB store sync stalls where the session reports WORKING but inbound message events stop surfacing for tens of minutes (we currently ship a custom watchdog + auto-restart for this).
  • WhatsApp Web protocol drift causes periodic regressions that ripple through every Baileys-using project (recent activity in this repo: #70856, #72262, #72489, #72656, #72735, #72895, etc.).

WAHA decouples OpenClaw from Baileys upgrades. It runs in its own container, exposes a REST API for outbound and a webhook delivery stream for inbound, and supports multiple engines (NOWEB, WEBJS, GOWS) so users can pick whichever is most stable for their account/region. Several OpenClaw users (including us) already run WAHA alongside Baileys — currently we use it for outbound alerts only because there is no native ingest path, so inbound still relies on the Baileys session and remains the failure mode.

Proposed scope

A waha channel plugin (or a whatsapp.engine: "waha" mode on the existing channel) that:

  1. Outbound — wraps WAHA's POST /api/sendText, POST /api/sendImage, POST /api/sendFile, POST /api/reactions, etc., behind the same channel send/react/edit/delete actions the existing Baileys path exposes.
  2. Inbound — registers a session webhook with WAHA pointing at a gateway-served endpoint (e.g. /hooks/waha/<session>), parses WAHA's message, message.reaction, message.ack event payloads, and routes them through the same inbound pipeline (session-key lookup, allowFrom enforcement, group policy, plugin pre-hooks like outbound-finalizer) used by Baileys today.
  3. Auth / session lifecycle — surface WAHA's session lifecycle (STARTING, SCAN_QR_CODE, WORKING, FAILED, STOPPED) into the openclaw status / control-UI views the same way Baileys connection state is surfaced today.
  4. Config — accept the WAHA base URL, API key, and session name as channel config; reuse the existing dmPolicy / allowFrom / groupPolicy semantics so existing config translates 1:1.

Why I think this is a good fit

  • WAHA's webhook + REST interface matches the shape of OpenClaw's existing channel adapters (Slack events, Telegram webhooks, etc.) — so this is a routine adapter, not a new architecture.
  • The hooks endpoint is already generic and authenticated; the only piece missing is a parser/translator that turns WAHA webhook payloads into the channel inbound shape OpenClaw already expects.
  • Baileys is unlikely to fundamentally stabilize as long as it's reverse-engineered. Giving users an opt-in WAHA path provides a stable alternative without dropping the Baileys path that works for many.
  • Lowers the maintenance burden inside OpenClaw: every Baileys upgrade currently risks regressions in whatsapp plugin code; with WAHA, the gateway only depends on a stable REST contract, and Baileys upgrades are WAHA's problem.

Workarounds we are running locally today

  • A custom watchdog (personal-whatsapp-408-storm-watchdog.sh) for 408 storms — alert-only since no per-channel restart RPC exists.
  • A custom watchdog (waha-inbound-cursor-stalled-watchdog.sh) that detects Baileys-inbound silence-with-WORKING-status and auto-restarts the WAHA(-backed) session.
  • Polling the WAHA /api/messages endpoint from cron every few minutes for inbound, because there is no native WAHA→OpenClaw ingest path. This is the polling-versus-realtime gap that motivated the request — sub-second webhook delivery would replace it cleanly.

If a WAHA channel plugin existed, all three of these would go away.

Happy to help

Glad to scope or contribute. Conceptually this looks like the existing slack or telegram channel adapters: an inbound webhook handler, an outbound REST client, and config wiring. If maintainers prefer, we can start with an out-of-tree plugin and PR it in once stable.

extent analysis

TL;DR

Implement a WAHA channel plugin to decouple OpenClaw from Baileys instability and provide a stable alternative for WhatsApp integration.

Guidance

  • Create a new channel plugin for WAHA, utilizing its REST API for outbound messages and webhook delivery stream for inbound messages.
  • Develop an inbound webhook handler to parse WAHA event payloads and route them through the existing OpenClaw inbound pipeline.
  • Integrate WAHA's session lifecycle into OpenClaw's status and control-UI views.
  • Configure the WAHA channel to accept base URL, API key, and session name, reusing existing config semantics.

Example

No code example is provided due to the complexity of the issue, but the implementation should follow the existing channel adapter patterns in OpenClaw.

Notes

The implementation of the WAHA channel plugin requires careful consideration of the existing OpenClaw architecture and the WAHA API. The plugin should be designed to be stable and maintainable, with a clear understanding of the dependencies and potential failure points.

Recommendation

Apply a workaround by creating an out-of-tree WAHA channel plugin, which can be later PR'd into the main OpenClaw repository once stable, to provide a stable alternative to the Baileys integration.

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…

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 [Feature]: Native WAHA channel adapter (alongside Baileys) for stabler WhatsApp [1 participants]