#selfchatMode bugs / usage on WhatsApp

1 messages ยท Page 1 of 1 (latest)

steep herald
#

Have been using selfchatMode just fine, but this morning ran into a bug where after a reset it appeared my agent fabricated a request to itself and then responded. My first instinct was a security issue, but Claw suggests it is not, but an issue with selfchatMode.

Does that add up?

If so, how can I enable selfchatMode but not get echoes respond to itself? Or is that a known risk / tradeoff with selfchatMode?

tardy steepleBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

steep herald
#

RESPONSE:
What selfChatMode is designed for:

It's the intended setup when you run OpenClaw on your personal WhatsApp number (same number you message from). The FAQ says: "If you run on your personal WhatsApp number, use that number and enable
channels.whatsapp.selfChatMode ."

The auto-detection function isSelfChatMode() checks: does allowFrom contain the same number as selfE164? Your config has allowFrom: ["+NUMBER"] and the bot runs on +NUMBER โ€” same number. So even
without the explicit true, it would have auto-detected as self-chat mode.

#

Why it was true: It was almost certainly set during openclaw onboard โ€” the wizard asks for your WhatsApp number, sees it matches the bot's number, and enables selfChatMode. It's been true in every backup going
back to at least March 25.
Where it's used in the stack:

  1. channel.runtime โ†’ resolveWhatsAppInboundAccess() checks isSelfChat
  2. If isSelfChat is true, the gateway allows messages where from === to (same number) โ€” normally those would be blocked as outbound echoes
  3. The (self) tag in logs shows it knows these are self-messages
  4. But there's no filtering of AGENT's own replies โ€” it allows ALL messages from the self number through, including echoed outbound
#

The bug: selfChatMode is meant to let you message yourself to talk to AGENT (like using "Message Yourself" in WhatsApp). But it doesn't distinguish between:

  • You genuinely typing in the self-chat โ†’ should process
  • AGENT's reply echoing back from the bridge โ†’ should ignore The isFromMe check exists but only catches outbound DMs to other numbers. When from === to === self, everything gets through.
    This looks like an OpenClaw bug worth reporting. The flag works as designed for the use case of "I want to chat with AGENT by messaging myself," but it has no echo suppression for bot-generated replies.
#

@thorny depot