openclaw - 💡(How to fix) Fix WhatsApp cron announce delivery fails: No active WhatsApp Web listener [2 comments, 3 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#48849Fetched 2026-04-08 00:51:56
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Timeline (top)
commented ×2closed ×1locked ×1subscribed ×1

Cron jobs with delivery.mode: announce and WhatsApp channel fail with:

Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default.

This happens even when WhatsApp is working normally in the main session.

Error Message

Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default.

Root Cause

After deep investigation:

  1. WhatsApp Web listener is stored in a session-scoped Map in active-listener.ts
  2. Isolated cron sessions run in completely separate contexts
  3. They cannot access the main session's WhatsApp connection
  4. The plugin has forceAccountBinding: true and preferSessionLookupForAnnounceTarget: true but this doesn't help because the listener itself isn't shared

Code references:

  • extensions/whatsapp/src/channel.ts:50-51 - forceAccountBinding and preferSessionLookupForAnnounceTarget
  • dist/plugin-sdk/thread-bindings-SYAnWHuW.js:154914 - requireActiveWebListener throws the error

Fix Action

Fix / Workaround

Workarounds

Code Example

Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default.
RAW_BUFFERClick to expand / collapse

Description

Cron jobs with delivery.mode: announce and WhatsApp channel fail with:

Error: No active WhatsApp Web listener (account: default). Start the gateway, then link WhatsApp with: openclaw channels login --channel whatsapp --account default.

This happens even when WhatsApp is working normally in the main session.

Steps to Reproduce

  1. Set up a cron job with sessionTarget: isolated, delivery.mode: announce, and WhatsApp channel
  2. Wait for cron to trigger
  3. Observe the error in cron run history

Expected Behavior

Cron jobs with WhatsApp announce delivery should send messages to WhatsApp, same as regular agent responses.

Actual Behavior

Isolated cron sessions fail with "No active WhatsApp Web listener" error, even though the main session has an active WhatsApp connection.

Root Cause Analysis

After deep investigation:

  1. WhatsApp Web listener is stored in a session-scoped Map in active-listener.ts
  2. Isolated cron sessions run in completely separate contexts
  3. They cannot access the main session's WhatsApp connection
  4. The plugin has forceAccountBinding: true and preferSessionLookupForAnnounceTarget: true but this doesn't help because the listener itself isn't shared

Code references:

  • extensions/whatsapp/src/channel.ts:50-51 - forceAccountBinding and preferSessionLookupForAnnounceTarget
  • dist/plugin-sdk/thread-bindings-SYAnWHuW.js:154914 - requireActiveWebListener throws the error

Environment

  • OpenClaw version: 2026.3.13
  • Platform: Windows_NT
  • Channel: WhatsApp (selfChatMode)
  • Gateway running locally

Workarounds

  1. Use sessionTarget: main with payload.kind: systemEvent - works but waits for idle session
  2. Use delivery.mode: none - runs silently without WhatsApp push

Suggested Fix

Make WhatsApp Web listeners gateway-scoped instead of session-scoped, or route all WhatsApp outbound through the main session automatically.

extent analysis

Fix Plan

To resolve the issue, we need to make WhatsApp Web listeners gateway-scoped instead of session-scoped. Here are the steps:

  • Modify the active-listener.ts file to store the WhatsApp Web listener in a gateway-scoped Map.
  • Update the channel.ts file to use the gateway-scoped listener when sending WhatsApp messages.
  • Ensure that the forceAccountBinding and preferSessionLookupForAnnounceTarget options are properly configured.

Example code changes:

// active-listener.ts
const listenerMap = new Map<string, WhatsAppWebListener>(); // gateway-scoped Map

// channel.ts
import { listenerMap } from './active-listener';

// ...

if (delivery.mode === 'announce' && channel === 'whatsapp') {
  const listener = listenerMap.get('default'); // use gateway-scoped listener
  if (listener) {
    // send WhatsApp message using the listener
  } else {
    throw new Error('No active WhatsApp Web listener');
  }
}

Verification

To verify that the fix worked:

  • Set up a cron job with sessionTarget: isolated, delivery.mode: announce, and WhatsApp channel.
  • Wait for the cron job to trigger and check the run history for errors.
  • If the fix is successful, the WhatsApp message should be sent without errors.

Extra Tips

  • Ensure that the gateway is running and properly configured.
  • Test the fix with different WhatsApp channels and delivery modes to ensure that it works as expected.
  • Consider adding logging and monitoring to detect and diagnose any issues related to WhatsApp Web listeners.

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