Skip to content

[Bug]: WhatsApp group: subsequent @mentions silently dropped after first (regression 2026.5.26) #87609

Closed as not planned

Description

@Mohd-Mursaleen

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Problem

After upgrading 2026.5.22 → 2026.5.26, only the first @mention of an agent in a WhatsApp group
registers in the dashboard and receives a response. All subsequent @mentions in the same
session window are silently dropped — no inbound event logged, no response delivered.

Worked correctly on 2026.5.22.

Root Cause

PR #85517 ("Fix foreground reply fence visibility") made the reply fence visibility-aware.
With messages.groupChat.visibleReplies: "automatic", the first mention triggers
auto-delivery which sets visibleReplySent = true in the fence's per-dispatch state. The
fence then cancels all subsequent dispatches in the same group session window before they
reach the agent or dashboard.

This interaction did not exist on 2026.5.22 — old fence did not track visibleReplySent. PR
review notes confirm live WhatsApp transport was not tested in #85517.

Expected Behavior

All @mentions register as inbound events and receive responses regardless of how many arrive
in the same session window — matching 2026.5.22 behavior.

Current Workaround

Revert messages.groupChat.visibleReplies from "automatic" to "message_tool". Restores
correct multi-mention behavior immediately (hot-reloads, no restart needed).

Possible Solutions

  1. Fix visibility-aware fence in Fix foreground reply fence visibility #85517 to not cancel pending dispatches when visibleReplies: "automatic" is set — auto-delivery should not signal "session done" for subsequent inbound
    triggers
  2. Gate visibleReplySent cancellation to only apply when session was explicitly closed by
    the agent, not by auto-delivery

Impact

Production regression for any WhatsApp deployment using visibleReplies: "automatic".
Multiple users mentioning an agent simultaneously results in only first getting a response —
all others silently lost with no log or acknowledgment.

Environment

Steps to reproduce

  1. Start OpenClaw 2026.5.26 with messages.groupChat.visibleReplies: "automatic" in
    openclaw.json.
  2. Have two different users @mention the same agent in a WhatsApp group within 30 seconds of
    each other.
  3. Observe: only first @mention appears in dashboard and receives a response. Second @mention
    produces no inbound event and no response.

Expected behavior

In 2026.5.22, both @mentions registered as separate inbound events in the dashboard and each
received a response. All @mentions in a group session window were processed independently.

Actual behavior

Only the first @mention is logged in the dashboard and triggers a response. All subsequent
@mentions in the same session window are silently dropped — no inbound event, no log entry, no
response delivered to the user.

OpenClaw version

2026.5.26

Operating system

macOS 15.4 (Mac mini, arm64)

Install method

npm global

Model

openrouter/openai/gpt-5.4-mini

Provider / routing chain

openclaw -> openrouter -> openai/gpt-5.4-mini

Additional provider/model setup details

Fallback chain: openrouter/openai/gpt-5.4-mini -> openrouter/google/gemini-3-flash-preview.
Agent: clerk, bound to WhatsApp account via bindings[agentId: "clerk", match: {accountId:
"clerkwa", channel: "whatsapp"}].
Relevant config under channels.whatsapp.accounts.clerkwa and messages.groupChat.

Logs, screenshots, and evidence

No dashboard inbound event logged for second @mention — absence of log entry is the evidence.
  Workaround confirmed: reverting messages.groupChat.visibleReplies from "automatic" to
  "message_tool"
  immediately restores multi-mention behavior without restart (hot-reload).
  Root cause traced to PR #85517 — visibility-aware fence sets visibleReplySent = true on first
  auto-delivery, cancelling subsequent dispatches in same group session window.

Impact and severity

Affected: All WhatsApp group users on 2026.5.26 with visibleReplies: "automatic"
Severity: High — blocks multi-user concurrent workflows entirely
Frequency: Always (100% reproducible — every second @mention dropped)
Consequence: Users receive no response and no acknowledgment; silent failure with no error
shown

Additional information

Last known good: 2026.5.22
First known bad: 2026.5.26
Regression introduced by PR #85517 ("Fix foreground reply fence visibility") —
visibility-aware
fence was not tested against live WhatsApp transport per PR review notes.
Temporary workaround: set messages.groupChat.visibleReplies: "message_tool" (hot-reloads, no
restart needed).

Activity

  1. clawsweeper commented on May 28, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    Close as superseded: the remaining automatic-mode WhatsApp group concurrency problem is now tracked by the stronger open canonical issue with current-main source evidence, while the separate admission-timeout path has already been closed as implemented.

    Canonical path: Use #92186 as the active canonical work item for the automatic-mode WhatsApp foreground-fence fix and keep this report linked there as release-regression context.

    So I’m closing this here and keeping the remaining discussion on #92186.

    Review details

    Best possible solution:

    Use #92186 as the active canonical work item for the automatic-mode WhatsApp foreground-fence fix and keep this report linked there as release-regression context.

    Do we have a high-confidence way to reproduce the issue?

    Yes at source level for the shared automatic-mode foreground-fence path, but not as a live current-main reproduction of this exact pre-dashboard symptom. The stronger open canonical issue preserves the current-main source reproduction for the remaining behavior.

    Is this the best way to solve the issue?

    Yes, superseding this older report with the stronger open canonical issue is the best triage shape. The older report’s exact no-dashboard symptom is not as well matched to current source, while the canonical issue tracks the same automatic-mode fence problem with clearer current-main evidence.

    Security review:

    Security review: This is issue triage without a patch or security-sensitive report.

    AGENTS.md: found and applied where relevant.

    What I checked:

    • Root policy applied: Root AGENTS.md was read in full and requires source, tests, current/shipped behavior, related reports, and scoped ownership checks for triage. (AGENTS.md:1, 04875efd28ee)
    • Scoped channel and extension policy applied: The extension and channel guides were read; they frame WhatsApp as plugin-owned channel behavior that still needs source-level core/channel review when shared dispatch behavior is implicated. (extensions/AGENTS.md:1, 04875efd28ee)
    • Vision fit: VISION.md prioritizes bug fixes, stability, and better support for major messaging channels, which fits this WhatsApp message-loss regression. (VISION.md:15, 04875efd28ee)
    • Current fence identity: Current main still keys the foreground reply fence by channel, account, session, chat type, and target; it does not include participant, inbound message, or reply-lineage identity. (src/auto-reply/dispatch.ts:83, 04875efd28ee)
    • Current cancellation path: The fence cancels at delivery time by returning null from beforeDeliver when a newer same-key generation has visible delivery; current source does not show this fence blocking inbound event creation itself. (src/auto-reply/dispatch.ts:582, 04875efd28ee)
    • WhatsApp visible delivery metadata: WhatsApp durable visible delivery returns visibleReplySent metadata that feeds the shared foreground fence behavior. (extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.ts:700, 04875efd28ee)

    Likely related people:

    • cavit99: The foreground-fence visibility change that made visible delivery state part of freshness was authored by Cavit Erginsoy in d74b0ac. (role: introduced behavior; confidence: high; commits: d74b0acf74c7; files: src/auto-reply/dispatch.ts, src/auto-reply/dispatch.freshness.test.ts, extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.ts)
    • steipete: The same foreground-fence visibility commit records Peter Steinberger as committer for the merged behavior. (role: merger; confidence: medium; commits: d74b0acf74c7; files: src/auto-reply/dispatch.ts, src/auto-reply/dispatch.freshness.test.ts)
    • vincentkoc: Current blame in the shallow checkout attributes the present fence key and cancellation implementation to a later current-main commit by Vincent Koc. (role: recent area contributor; confidence: medium; commits: 2e240e772b83; files: src/auto-reply/dispatch.ts, src/auto-reply/dispatch.freshness.test.ts)

    Codex review notes: model internal, reasoning high; reviewed against 04875efd28ee.

  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    and removed
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    on May 28, 2026
  3. Mohd-Mursaleen commented on May 28, 2026

    @Mohd-Mursaleen
    Author

    Answering your open questions directly

    Do we have a high-confidence current-main repro?
    Not on current main — but the release repro is 100% deterministic. The code path is confirmed
    via workaround: switching visibleReplies from "automatic" to "message_tool" restores
    correct behavior immediately on the same 2026.5.26 binary, isolating the failure to
    exactly the visibleReplySent auto-delivery path.

    Is reverting / scoping visibleReplySent the right fix?
    Yes. The visibleReplySent cancellation in the fence should only apply to stale
    same-generation
    replies, not to new inbound dispatches arriving after delivery is complete. The guard
    condition
    at dispatch.ts:60 needs to distinguish between "a newer generation has already delivered"
    (correct to cancel) and "this generation delivered, a new independent inbound just arrived"
    (incorrect to cancel). Scoping the cancellation to same-generation same-dispatch-id comparison

    rather than any-active-visibleReplySent would fix this without breaking stale-reply
    suppression.


    This is a silent message-loss regression on the current stable release affecting all WhatsApp
    group deployments using visibleReplies: "automatic". Every second concurrent user mention is

    permanently dropped with no log, no error, no retry — users simply receive no response. There is no
    workaround around this . Given this is a regression in the latest stable release on one of the primary supported channels, urgent attention from the implicated area owners (cavit99, Vincent, Peter) would be appreciated.

  4. Mohd-Mursaleen commented on May 28, 2026

    @Mohd-Mursaleen
    Author

    What is happening and why

    The failure is in the interaction between visibleReplies: "automatic" and the
    visibility-aware
    foreground fence introduced in the change you identified at src/auto-reply/dispatch.ts:60.

    Step-by-step on the affected 2026.5.26 path:

    1. User A @mentions the agent in a WhatsApp group. Inbound dispatch fires, a run starts,
      generation N is registered in the fence for this chatId target.

    2. Because visibleReplies: "automatic", the runtime auto-delivers the reply without waiting
      for an explicit message(action=send) tool call. This sets visibleReplySent = true on
      generation N's dispatch state in the fence.

    3. User B @mentions the agent 5–10 seconds later. The inbound handler fires, but the fence
      sees generation N still active with visibleReplySent = true and cancels the new dispatch
      before it is logged — no inbound event, no run, no dashboard entry.

    4. The cancellation happens before the event reaches the agent, which is why the dashboard
      shows nothing. It is not a failed run — it is a pre-admission drop.

    On 2026.5.22 the fence did not track visibleReplySent at all, so step 3 never triggered
    a cancellation. Both mentions entered the run queue independently.

    The WhatsApp-specific path you flagged at
    extensions/whatsapp/src/auto-reply/monitor/inbound-dispatch.ts:700 is exactly where
    visibleReplySent metadata is returned from the durable and direct delivery paths and fed
    back into the shared fence. This is the code surface where the fix belongs.


    Why current-main repro is hard without a live WhatsApp session

    The test files you listed (dispatch.freshness.test.ts, reply-turn-admission.test.ts,
    inbound-dispatch.test.ts, kernel.test.ts) cover the fence and admission paths, but the
    specific interaction requires:

    • visibleReplies: "automatic" config active
    • Two distinct inbound WhatsApp group events for the same chatId
    • The fence's visibleReplySent state being set by the first delivery before the second
      event arrives

    A targeted unit test for this path would mock two sequential dispatchInboundMessage calls
    to the same group chatId with visibleReplies: "automatic" set, assert that
    visibleReplySent
    from the first delivery does not cancel admission for the second, and assert both dispatches
    produce a run. That test does not currently exist and would be the focused regression proof
    you are asking for.

    The live reproduction on current main: confirmed reproducible on 2026.5.26 release (100%
    of attempts, every second @mention dropped). Cannot confirm whether the unshipped
    reply-admission changes on current main (the removal of the 15-second cleanup timeout you
    referenced at reply-turn-admission.test.ts:42) partially or fully address this, because
    that change alters how long a visible turn waits but does not change whether
    visibleReplySent
    from generation N gates admission of a new inbound dispatch for the same target.


    Answering your open questions directly

    Do we have a high-confidence current-main repro?
    Not on current main — but the release repro is 100% deterministic. The code path is confirmed
    via workaround: switching visibleReplies from "automatic" to "message_tool" restores
    correct behavior immediately on the same 2026.5.26 binary, isolating the failure to
    exactly the visibleReplySent auto-delivery path.

    Is reverting / scoping visibleReplySent the right fix?
    Yes. The visibleReplySent cancellation in the fence should only apply to stale
    same-generation
    replies, not to new inbound dispatches arriving after delivery is complete. The guard
    condition
    at dispatch.ts:60 needs to distinguish between "a newer generation has already delivered"
    (correct to cancel) and "this generation delivered, a new independent inbound just arrived"
    (incorrect to cancel). Scoping the cancellation to same-generation same-dispatch-id comparison

    rather than any-active-visibleReplySent would fix this without breaking stale-reply
    suppression.


    This is a silent message-loss regression on the current stable release affecting all WhatsApp
    group deployments using visibleReplies: "automatic". Every second concurrent user mention is

    permanently dropped with no log, no error, no retry — users simply receive no response. The is no
    workaround around this . Given this is a regression in the
    latest stable release on one of the primary supported channels, urgent attention from the
    implicated area owners (cavit99, Vincent, Peter) would be appreciated.

    @steipete @cavit99 @vincentkoc

  5. Mohd-Mursaleen commented on May 28, 2026

    @Mohd-Mursaleen
    Author

    Additional issue: "gateway timeout after 1ms" when using visibleReplies: "message_tool"

    workaround

    While the workaround (reverting to visibleReplies: "message_tool") does restore
    multi-mention
    behavior, operators on 2026.5.22 encountered a secondary failure on that same path that is
    worth
    flagging for context:

    Symptom — error returned to agent on every message tool send attempt:

    {
    "status": "error",
    "tool": "message",
    "error": "gateway timeout after 1ms\nGateway target: ws://127.0.0.1:18789\nSource: local
    loopback\nConfig: /Users/bluclaw/.openclaw/openclaw.json\nBind: loopback"
    }

    Root cause — broken ES module export in OpenClaw's bundle causing heartbeat failure, which

    stalls the event loop and breaks deadline math for the message tool RPC:

    error gateway/heartbeat heartbeat failed:
    The requested module './synthetic-auth.runtime.js' does not provide an export named 'n'

    The 1ms is Node clamping an overflowed/undefined setTimeout value (same root class as
    #9572, #7194, #41240). Crucially, Baileys still delivers the message successfully — the
    agent just thinks it failed and may retry, causing double-sends:

    info gateway/channels/whatsapp/outbound Sent message 3EB0... -> sha256: (553ms)
    info gateway/ws ⇄ res ✓ send 781ms channel=whatsapp

    Fix: openclaw update && openclaw doctor --fix && openclaw restart (bundle corruption,
    not a config issue — timeout config overrides make it worse).

    This means operators hit with the multi-mention regression face a two-sided problem:

    • visibleReplies: "automatic" → second mention silently dropped (this issue)
    • visibleReplies: "message_tool" → gateway timeout ghost errors + potential double-sends
      if bundle is corrupt

    Both failure modes land on the same WhatsApp group delivery path. The bundle fix is
    operator-side, but the regression in this issue means there is currently no clean stable
    configuration for WhatsApp group multi-mention delivery on 2026.5.26 without first
    resolving the bundle corruption separately. Related upstream issues: #4954, #9572, #59470,
    #9471.

  6. openclaw-barnacle commented on Jun 15, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  7. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions