Skip to content

WhatsApp group messages never reach inbound handling (LID groups?) — DMs work; repro across relink + 2026.6.11→2026.7.1 #107244

Open

Description

@kaluyckx

Summary

WhatsApp group messages never reach OpenClaw's inbound handling — gateway.call health never updates lastInboundAt/messagesHandled for group traffic, and directory groups list --channel whatsapp always returns [] — even though WhatsApp's own delivery receipts confirm the message reached the linked device. Direct messages (DMs) on the same account work perfectly and instantly. This reproduces across a fresh QR relink and across a full gateway + plugin version update.

Environment

  • OpenClaw gateway: upgraded during triage from 2026.6.11 → 2026.7.1
  • @openclaw/whatsapp plugin: upgraded from 2026.6.11 → 2026.7.1 (via plugins install @openclaw/whatsapp --force)
  • Deployment: self-hosted, Docker Compose, prebuilt GHCR image
  • WhatsApp account type: WhatsApp Business, linked via QR (companion/multi-device session, not the Cloud API)
  • Multi-agent setup: a second agent (household) routed via a top-level bindings[] entry: {type: "route", agentId: "household", match: {channel: "whatsapp", accountId: "ferdinand"}}

Steps to reproduce

  1. Link a WhatsApp Business account via openclaw channels login --channel whatsapp --account <id> (QR).
  2. Confirm DM works: message the linked number directly — pairs via dmPolicy: pairing, replies correctly. gateway call health shows lastInboundAt populated, messagesHandled incrementing.
  3. Add the linked number to a WhatsApp group as a normal member.
  4. Send a message in that group.
  5. Check openclaw directory groups list --channel whatsapp --account <id> --limit 50 --json → returns [].
  6. Check gateway call health --json for that account → lastInboundAt: null, unchanged.
  7. On the sending phone, check the message's delivery info for the linked number specifically → shows delivered / read (double-grey then blue ticks), confirming WhatsApp did deliver it to that device.

What was ruled out

  • groupPolicy setting: tested all three values (disabled, allowlist with empty groupAllowFrom, and open/no filter at all). Same null result in every case — including fully open, which should bypass all filtering.
  • Stale/interrupted session state: fully logged out (channels logout) and relinked from scratch via a fresh QR pairing. Same result on the new session.
  • Plugin/gateway version: reproduced on both 2026.6.11 and, after updating, 2026.7.1 (gateway core) with the plugin explicitly reinstalled at 2026.7.1 too.
  • Config/binding mistake: the account-level binding routes correctly for DMs (same account, same binding path), so the routing config itself is not the issue — it's specifically group-type messages that never arrive at the inbound handler.

Hypothesis (unconfirmed)

WhatsApp's newer privacy feature addresses group participants via an LID (@lid) identity rather than the plain phone-number JID (@s.whatsapp.net) used for DMs. This account's self-identity has both (from gateway call health): 32456872514@s.whatsapp.net and LID 33986831237279@lid. Given DMs (JID-addressed) work perfectly and only group messages (which involve LID-based participant addressing) silently fail to register, a parsing/routing gap specific to LID-addressed group messages seems like the most likely root cause — though this wasn't confirmed against the plugin's source directly.

Impact

WhatsApp group support is effectively non-functional for this setup — the provider reports healthy/connected the whole time, so there's no error surfaced anywhere; it just silently never sees group traffic.

Activity

  1. kaluyckx commented on Jul 14, 2026

    @kaluyckx
    Author

    Update: after upgrading both the gateway core AND the @openclaw/whatsapp plugin to 2026.7.1 (the plugin needs an explicit plugins install @openclaw/whatsapp --force — the gateway image update alone does not bump it), group ingestion works. Debug logs on 2026.7.1 show Own LID session created successfully followed by Hydrated N participating groups on connect, and group messages now reach the policy layer correctly. So this appears to have been the LID-session gap in 2026.6.11, already fixed in 2026.7.1.

    Two residual notes for maintainers:

    1. openclaw directory groups list --channel whatsapp still returns [] even after group hydration and successfully processed group messages — the directory store never populates. We had to extract the group JID from the baileys sender-key filenames in credentials/whatsapp/<account>/. That part still looks like a real (smaller) bug.
    2. On 2026.6.11 the failure was completely silent — provider healthy/connected, no errors, group messages just never appeared. A warning when LID session setup is unavailable/failed would make this much easier to diagnose.

    Feel free to retitle/narrow this issue to the directory-listing bug, or close if tracked elsewhere.

  2. kaluyckx commented on Jul 14, 2026

    @kaluyckx
    Author

    Correction to my earlier comment: 2026.7.1 did NOT fully fix this. Group ingestion regressed again minutes after pairing. Much more precise diagnostics now:

    Definitive symptom: group messages reach the socket and are decrypted — the libsignal sender-key ratchet file (credentials/whatsapp/<account>/sender-key-<groupJid>--<senderLid>--N.json) advances its mtime at the exact moment each group message is sent — but the plugin's message handling never fires: the web-heartbeat's messagesHandled stays 0 and lastInboundAt stays null. No log output at any level. DMs on the same account/connection work perfectly throughout.

    The one time it worked: in the ~1 minute window immediately after a fresh QR pairing, a group message DID reach the policy layer (logged Blocked group message (groupPolicy: allowlist, no groupAllowFrom)). Every connection after that: silent void, while sender-key ratchets keep advancing.

    Ruled out since my last comment:

    • groupPolicy (reproduced with open, allowlist with the group JID allowed, and disabled)
    • the 2026.7.1 config migration artifact: doctor --fix moved old channel-level settings into a new account literally named default alongside the real one — two providers then fight over one linked session ([whatsapp:default] health-monitor: restarting (reason: stopped) + connection errored). Removing the phantom account fixed the connection instability but not group ingestion. This migration bug is probably worth its own issue.
    • stale sessions / relink (fresh QR, same result)
    • model/agent-layer errors (separate issue, fixed)

    Hypothesis: whatever group-context setup happens at pairing time (LID mapping / group metadata / app-state sync) is not re-established on subsequent socket connects, and group messages whose context is missing are dropped after decryption without any logging. A debug-level log line on that drop path would have saved many hours.

    Happy to run any diagnostics on my deployment — this reproduces 100% reliably.

  3. kaluyckx commented on Jul 14, 2026

    @kaluyckx
    Author

    RESOLVED on my deployment — confirmed root cause + working local workaround.

    Root cause of groups-silently-dead-while-DMs-work: the plugin's socket identifies as browser: ["openclaw", "cli", VERSION] with syncFullHistory: false (dist/session-*.js). With a non-Desktop browser identity, WhatsApp's servers stop pushing group messages to the companion device shortly after pairing (matching the ~1-minute post-pairing window where groups briefly worked). Nothing ever reaches messages.upsert for @g.us, so nothing is logged — while sender-key ratchets still advance, which misleadingly suggests local processing. Same class as #57989.

    Working fix (patched locally in dist): browser: ["Mac OS", "Desktop", "10.15.7"] (Baileys' Browsers.macOS("Desktop")), keep syncFullHistory: false, then re-pair (the identity registers at pairing; on the old pairing the changed identity causes a 428 setup loop). Note: syncFullHistory: true made QR login fail outright pre-pairing ("Non-Error rejection") — do not combine.

    After re-pairing with the Desktop identity: group messages arrive reliably, Hydrated N participating groups on connect runs on every reconnect (not just post-pairing), and it survives gateway restarts. Verified end-to-end with agent replies in the group.

    Suggestion for maintainers: make the browser identity configurable (or default to a Desktop identity), and add a debug log on the WA-server-side no-group-push condition if detectable. Happy to PR if useful.

  4. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jul 14, 2026
  5. clawsweeper commented on Jul 14, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep open: this issue documents sustained group-message loss on official releases, and a maintainer recently designated it as the place to collect related findings; current main does not establish a fix.

    Reproducibility: The official-release observations and successful local intervention are useful evidence, but unchanged socket configuration and mocked event tests do not provide a high-confidence current-main reproduction.

    Next step
    A WhatsApp owner should compare sustained group and DM socket events on current main across reconnects and verify existing-pairing compatibility before selecting an identity repair.

    Review details

    Best possible solution:

    Restore sustained group intake through the plugin's existing connection owner while preserving established pairings and access controls.

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

    The official-release observations and successful local intervention are useful evidence, but unchanged socket configuration and mocked event tests do not provide a high-confidence current-main reproduction.

    Is this the best way to solve the issue?

    Investigate the Desktop-identity workaround with controlled linked-device comparisons before changing defaults; a new configuration option is not yet justified.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Sustained group-only silence has not been independently reproduced on current main, and browser identity, receipt settings, and LID handling remain competing explanations.
    • The reported 428 loop leaves existing-pairing compatibility unresolved for a browser-identity change.

    Codex review notes: model internal, reasoning medium; reviewed against 0f9c51e858ae.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P1: The report describes sustained silent failure of an existing WhatsApp group workflow while DMs and connection health appear normal.
    • impact:message-loss: Group messages reportedly never reach agent intake despite delivery indications on the sending phone.
    Evidence reviewed

    Acceptance criteria:

    • Capture current-main group and DM messages.upsert events beyond the initial post-pairing window and across reconnects.
    • Compare receipt settings under otherwise unchanged conditions and distinguish transport absence from local admission drops.
    • Verify fresh and existing pairings for any proposed identity change, including the reported 428 loop.
    • Establish a failing regression at the verified owner boundary before opening a repair PR.

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 27, 2026, 6:50 AM ET / 10:50 UTC.

  6. added
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jul 14, 2026
  7. 27 remaining items

  8. openclaw-barnacle commented on Oct 11, 2026

    @openclaw-barnacle

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

  9. added
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    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 Oct 11, 2026
  10. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Oct 16, 2026
  11. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    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.
    and removed
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Oct 27, 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.clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions