openclaw - 💡(How to fix) Fix [Bug]: WhatsApp group agents cannot create polls because same-chat runtime hides message tool [1 comments, 2 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#74766Fetched 2026-05-01 05:41:33
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

In WhatsApp group auto-reply sessions, the agent no longer receives the message tool even when the agent config explicitly allows it. Because native polls are exposed via message action poll, the agent cannot create WhatsApp polls and falls back to a text-only "reply with numbers" pseudo-poll.

This appears to be a regression in the same-chat/message-tool suppression path: suppressing ordinary same-chat message send also removes channel actions such as poll.

Root Cause

In WhatsApp group auto-reply sessions, the agent no longer receives the message tool even when the agent config explicitly allows it. Because native polls are exposed via message action poll, the agent cannot create WhatsApp polls and falls back to a text-only "reply with numbers" pseudo-poll.

Code Example

"tools": {
  "profile": "full",
  "allow": [
    "web_search",
    "web_fetch",
    "message",
    "memory_search",
    "memory_get",
    "sessions_spawn",
    "read"
  ]
}

---

{
  "action": "poll",
  "channel": "whatsapp",
  "params": {
    "to": "<current group>",
    "question": "...",
    "options": ["...", "..."],
    "maxSelections": 5
  }
}

---

sock.sendMessage(jid, {
  poll: {
    name: poll.question,
    values: poll.options,
    selectableCount: poll.maxSelections ?? 1
  }
})
RAW_BUFFERClick to expand / collapse

Summary

In WhatsApp group auto-reply sessions, the agent no longer receives the message tool even when the agent config explicitly allows it. Because native polls are exposed via message action poll, the agent cannot create WhatsApp polls and falls back to a text-only "reply with numbers" pseudo-poll.

This appears to be a regression in the same-chat/message-tool suppression path: suppressing ordinary same-chat message send also removes channel actions such as poll.

Environment

  • OpenClaw: 2026.4.26
  • Channel: WhatsApp Web
  • Scenario: WhatsApp group routed to a non-default agent
  • Agent config includes:
"tools": {
  "profile": "full",
  "allow": [
    "web_search",
    "web_fetch",
    "message",
    "memory_search",
    "memory_get",
    "sessions_spawn",
    "read"
  ]
}

Repro

  1. Configure a WhatsApp group to route to an agent whose tools.allow includes message.
  2. In that WhatsApp group, ask the agent to create a native multi-option poll.
  3. Inspect the compiled agent context / trajectory for that run.

Expected

The agent should have a way to create a native WhatsApp poll, e.g. via:

{
  "action": "poll",
  "channel": "whatsapp",
  "params": {
    "to": "<current group>",
    "question": "...",
    "options": ["...", "..."],
    "maxSelections": 5
  }
}

or an equivalent dedicated safe poll tool/directive.

Actual

The compiled WhatsApp group run exposed only 6 tools:

  • read
  • web_search
  • web_fetch
  • memory_get
  • memory_search
  • sessions_spawn

message was absent despite the agent allowlist including it. The system prompt/tooling section therefore had no message tool and no poll action available. The agent responded with a text pseudo-poll instead of creating a native WhatsApp poll.

Evidence / notes

The installed 2026.4.26 runtime appears to have the lower-level poll plumbing:

  • PollParamsSchema includes to, question, options, maxSelections, durationSeconds, durationHours, silent, isAnonymous, threadId, channel, accountId, idempotencyKey.
  • The message action runner has an executePollAction path that calls sendPoll(...).
  • WhatsApp send runtime has sendPollWhatsApp / sendWebChannelPoll and ultimately sends a Baileys poll payload similar to:
sock.sendMessage(jid, {
  poll: {
    name: poll.question,
    values: poll.options,
    selectableCount: poll.maxSelections ?? 1
  }
})

So the missing piece looks like tool exposure/policy, not lack of WhatsApp poll implementation.

Likely related behavior: same-chat prompts include guidance equivalent to "your replies are automatically sent to this group; do not use the message tool to send to this same group." That guard makes sense for avoiding duplicate normal replies, but it should not remove channel actions like poll that cannot be represented by a normal assistant text reply.

Suggested fix

Do one of these:

  1. Keep message available for same-chat sessions when configured, but restrict/guide action=send to avoid duplicate text replies while still allowing non-text channel actions (poll, react, etc.).
  2. Split safe channel actions into separate tools/directives, e.g. a dedicated poll tool that remains available even when same-chat message send is suppressed.
  3. If the current behavior is intentional, surface a clear warning when tools.allow contains message but runtime same-chat policy removes it, because the effective tool inventory is surprising.

This is user-visible because WhatsApp accounts can create polls normally, and the OpenClaw WhatsApp backend appears capable of sending them; the harness just does not expose the action to the agent in this context.

extent analysis

TL;DR

The most likely fix is to modify the tool exposure policy to keep message available for same-chat sessions when configured, while restricting action=send to avoid duplicate text replies.

Guidance

  • Review the same-chat message tool suppression path to ensure it does not remove channel actions like poll.
  • Consider splitting safe channel actions into separate tools/directives, such as a dedicated poll tool.
  • Verify that the tools.allow configuration is correctly applied and does not surprise the user by removing message without warning.
  • Inspect the compiled agent context/trajectory to ensure the expected tools are exposed.

Example

No code snippet is provided as the issue is more related to configuration and policy rather than code implementation.

Notes

The suggested fix assumes that the WhatsApp poll implementation is correct and the issue lies in the tool exposure policy. The fix may need to be adjusted based on the specific requirements of the OpenClaw system.

Recommendation

Apply a workaround by modifying the tool exposure policy to keep message available for same-chat sessions when configured, while restricting action=send to avoid duplicate text replies. This approach allows for the creation of native WhatsApp polls while avoiding potential issues with duplicate text replies.

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 [Bug]: WhatsApp group agents cannot create polls because same-chat runtime hides message tool [1 comments, 2 participants]