Summary
When selfChatMode: true is set on the WhatsApp channel, the agent incorrectly processes and responds to messages sent in any DM thread — not just the user's self-chat (note-to-self).
Config
"whatsapp": {
"enabled": true,
"dmPolicy": "allowlist",
"selfChatMode": true,
"allowFrom": ["+19194576111"],
"actions": {
"sendMessage": true
}
}
What happened
The user was having a normal conversation with a friend (Dylan) in a WhatsApp DM. The agent started responding in that thread — treating the user's own outbound messages to Dylan as commands, and replying to Dylan directly as if he were the agent operator.
Root cause (analysis)
The inbound log shows the sender as +19194576111 (the user's own number) for all events — which is correct, since in WhatsApp DMs the sender field reflects who sent the message. The allowFrom allowlist matches, so the message passes through.
However, the agent cannot distinguish between:
- User messaging themselves (self-chat / note-to-self) → should trigger the agent
- User messaging a third party (e.g., a friend) → should NOT trigger the agent
The selfChatMode flag appears to enable agent triggering when the sender matches the user's own number, but it does not check whether the recipient is also the user's own number (i.e., sender == recipient == user's number).
Expected behavior
selfChatMode: true should only trigger the agent when the conversation is a true self-chat: sender and recipient are the same number (the user's own WhatsApp account number). Any DM thread where the recipient is a different number should not trigger the agent, regardless of allowFrom rules.
Workaround
Disabled sendMessage as an immediate mitigation to prevent further replies to third parties.
Environment
- OpenClaw: 2026.3.2
- macOS: Darwin 25.3.0 arm64
- WhatsApp transport: personal account (not Business API)
Summary
When
selfChatMode: trueis set on the WhatsApp channel, the agent incorrectly processes and responds to messages sent in any DM thread — not just the user's self-chat (note-to-self).Config
What happened
The user was having a normal conversation with a friend (Dylan) in a WhatsApp DM. The agent started responding in that thread — treating the user's own outbound messages to Dylan as commands, and replying to Dylan directly as if he were the agent operator.
Root cause (analysis)
The inbound log shows the sender as
+19194576111(the user's own number) for all events — which is correct, since in WhatsApp DMs the sender field reflects who sent the message. TheallowFromallowlist matches, so the message passes through.However, the agent cannot distinguish between:
The
selfChatModeflag appears to enable agent triggering when the sender matches the user's own number, but it does not check whether the recipient is also the user's own number (i.e., sender == recipient == user's number).Expected behavior
selfChatMode: trueshould only trigger the agent when the conversation is a true self-chat: sender and recipient are the same number (the user's own WhatsApp account number). Any DM thread where the recipient is a different number should not trigger the agent, regardless ofallowFromrules.Workaround
Disabled
sendMessageas an immediate mitigation to prevent further replies to third parties.Environment