openclaw - 💡(How to fix) Fix [Bug]: message.send tool echoes outbound WhatsApp messages into message inbound stream (duplicate message_id) [3 comments, 4 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#53703Fetched 2026-04-08 01:24:35
View on GitHub
Comments
3
Participants
4
Timeline
5
Reactions
1
Author
Timeline (top)
commented ×3closed ×1locked ×1
RAW_BUFFERClick to expand / collapse

This is a regression. Works fine in 2026.3.11 but not in 2026.3.23

Summary

In whatsapp self-chat mode, using the message.send tool to send WhatsApp messages to myself results in the response by the agent being re-ingested into the central message inbound stream and treated as a received message. The inbound event uses the same message_id as the send response, producing an echo/duplicate that surfaces to any consumer of the inbound stream. A duplicated message is also produced inside whatsapp (same string in two differrent messages at the same time).

The issue wasn't reproduced in groups where my number is set as a groupAllowFrom. In other words, only DM is affected.

Steps to reproduce

  1. In whatsapp self-phone mode, from any session, call the message send flow using the message.send tool / message API to channel "whatsapp" to yourself.
  2. Observe the send returns success and includes a messageId.
  3. Immediately afterward, the same message appears on the message inbound stream as an inbound message and the inbound event’s message_id matches the messageId returned by the send call.

Actual behavior

  • Outgoing WhatsApp messages are inserted into the central message inbound stream and appear as inbound messages to UIs, bots, and automations.
  • The inbound event uses the same message_id as the outgoing send.

Expected behavior

  • message.send should produce a send_confirmation/delivery/ack event that is not published as a normal inbound message.
  • The message inbound stream must only contain messages originating from remote peers; send confirmations/delivery receipts must be distinguishable and not treated as new inbound messages.

Environment

  • OS: Windows 11
  • Version: 2026.3.23
  • Nodejs: v24.14.0

extent analysis

Fix Plan

The fix involves modifying the message processing logic to distinguish between sent messages and received messages, and to prevent sent messages from being re-ingested into the central message inbound stream.

Steps to Fix

  • Modify the message.send tool to include a unique identifier for sent messages.
  • Update the message processing logic to check for this identifier and prevent sent messages from being published as inbound messages.
  • Use a separate event type for send confirmations and delivery receipts.

Example Code

// message.send tool
const sentMessageId = generateUniqueIdentifier();
const message = {
  // ...
  sentMessageId: sentMessageId,
  // ...
};

// message processing logic
if (message.sentMessageId) {
  // handle send confirmation or delivery receipt
  // do not publish as inbound message
} else {
  // handle incoming message
  // publish as inbound message
}

Verification

To verify the fix, follow these steps:

  • Send a message to yourself using the message.send tool.
  • Check the message inbound stream to ensure that the sent message is not published as an inbound message.
  • Check the send confirmation or delivery receipt event to ensure that it is correctly handled and distinguishable from incoming messages.

Extra Tips

  • Use a robust and unique identifier for sent messages to prevent collisions and ensure correct handling.
  • Consider implementing a separate queue or stream for send confirmations and delivery receipts to further distinguish them from incoming messages.

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