Skip to content

[Bug]: Intermittent duplicate message delivery in 2026.4.24 across all channels #72176

Closed as not planned

Description

@bmdf

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading from 2026.4.23 to 2026.4.24, identical user messages are occasionally delivered twice to the session with the same timestamp but different seq numbers, causing the assistant to reply to both and producing duplicate visible messages in all channels (webchat and WeChat).

Steps to reproduce

  1. Run OpenClaw 2026.4.24 with webchat or WeChat channel configured
  2. Send a user message from the webchat UI or WeChat
  3. Observe session history via sessions_history API
  4. Same user message appears twice in transcript with identical timestamp but sequential seq numbers (e.g., seq 2703 and seq 2705)
  5. Assistant reply is also duplicated (seq 2704 and seq 2706) with same responseId

Expected behavior

In 2026.4.23, each user message was delivered exactly once. The same message should not appear twice in the session transcript.

Actual behavior

Same user message is delivered twice with identical timestamp but different __openclaw.id and sequential seq numbers. The assistant replies to both, producing duplicate visible messages. This happens intermittently, not on every message. Confirmed via sessions_history API showing duplicate entries for both user messages and assistant replies.

OpenClaw version

2026.4.24 (cbcfdf6)

Operating system

Linux 6.6.87.2-microsoft-standard-WSL2 (x64) / Windows 11 host

Install method

npm global

Model

bailian/qwen3.6-plus (also observed with nvidia-nim/z-ai/glm4.7)

Provider / routing chain

openclaw-weixin -> gateway -> bailian (dashscope) / webchat -> gateway -> bailian

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: All channels (webchat, WeChat)
Severity: Medium (annoying UX, duplicate visible messages, no data loss)
Frequency: Intermittent — not every message, but recurring across multiple sessions
Consequence: User sees duplicate messages in chat history, making conversations hard to follow

Additional information

Last known good version: 2026.4.23
First known bad version: 2026.4.24

Session history evidence from sessions_history API:

  • User message seq 2703 at timestamp 1777207291784
  • User message seq 2705 at same timestamp 1777207291784 (duplicate)
  • Assistant reply seq 2704 at timestamp 1777207292059
  • Assistant reply seq 2706 at same timestamp 1777207292059 (duplicate)

This pattern repeats multiple times (seq 2707-2710).

Possible related changes in 2026.4.24:

No workaround available — occurs at the session delivery layer.

Activity

  1. added
    bugSomething isn't working
    on Apr 26, 2026
  2. added 4 commits that reference this issue on Apr 26, 2026
    6f995fa
    4247127
  3. clawsweeper commented on Apr 29, 2026

    @clawsweeper
    Contributor

    Thanks for the report. I checked current main, but this shell is missing enough reproduction detail to verify a current bug.

    Close pending a current-version reproduction. The last human confirmation is from May, the relevant admission and transcript paths have changed substantially, and the previously active proposal closed without merging. The historical duplicate pairs do not establish which mechanism still fails.

    Review details

    Best possible solution:

    Preserve identity-based deduplication in the existing admission and transcript owners, and repair only the boundary identified by a fresh correlated duplicate trace.

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

    No: the historical examples lack a deterministic trigger or current-version trace connecting one submission to duplicated processing and delivery; no runtime reproduction was executed.

    Is this the best way to solve the issue?

    Unclear: an idless-content fallback is not established as the appropriate repair because the report never demonstrates that missing message IDs caused these duplicates.

    Security review:

    Security review: This is a duplicate-delivery report without a demonstrated security boundary violation.

    AGENTS.md: found and applied where relevant.

    What I checked:

    • Historical reports lack current confirmation: The report identifies 2026.4.24; human comments confirm 2026.5.2 on May 3 and 2026.5.12 on May 15. The supplied complete discussion contains no later human reproduction. Timestamp/sequence examples and the short-ID/full-UUID observation are useful historical evidence, but do not correlate ingress, run, persistence, and outbound identities.
    • Previous implementation candidate closed unmerged: fix(auto-reply): dedupe idless inbound retries #72314 closed unmerged on September 13, invalidating the previous review's reason to wait for an active proposal. Its supplied evidence exercises an idless-message helper, not the reported cross-channel duplicate pairs. The supplied metadata also shows fix(chat): prevent duplicate user message delivery in 2026.4.24 regression #72290 and fix(gateway): dedupe WebChat sends before attachment parsing #72605 closed unmerged.
    • Current shared inbound deduplication: The owner shares in-flight claims across module instances, scopes stable message IDs by route and agent, and fences released claims. Missing message IDs still return invalid, but the report does not establish missing IDs as its trigger. The dispatch caller skips duplicate and in-flight claims before proceeding. (src/auto-reply/reply/inbound-dedupe.ts:80, 0cbbec027285)
    • Current WebChat admission differs from historical proposals: Admission checks for retries and records a pending reservation before subsequent lifecycle work; the module explicitly owns registration before attachment processing. The user-turn persistence owner also requests an idempotency lookup before appending. These safeguards establish material implementation change, not proof that every reported duplicate is fixed. (src/gateway/server-methods/chat-send-admission.ts:149, 0cbbec027285)
    • Regression coverage inspected without execution: Existing tests cover shared claim state across module instances, released-claim fencing, replacement claims, and expiration. This supports the current contract but does not reproduce the reporter's original environment. (src/auto-reply/reply/inbound-dedupe.test.ts:67, 0cbbec027285)
    • Relevant maintenance history: This September commit documents changes to inbound suppression, stale claims, watchdog abandonment, and queued-input recovery. Recent path history also identifies Peter Steinberger and Vincent Koc as routing candidates. Older content-history and blame inspection encountered unavailable Git objects, so no exact introduction attribution is claimed. (src/auto-reply/reply/inbound-dedupe.ts, d87269045e4b)

    Likely related people:

    • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

    Codex review notes: model internal, reasoning medium; reviewed against 6d299c3ab220.

  4. xilopaint commented on May 3, 2026

    @xilopaint
    Contributor

    This is still an issue in v2026.5.2.

  5. schiles67 commented on May 15, 2026

    @schiles67

    Can confirm this is still present in v2026.5.12.

    From session analysis on May 14-15: 23% of all assistant text messages are duplicated in the session transcript — one entry with short 8-char ID, one with full UUID, identical content. These both get delivered to Telegram, causing every substantial response to appear twice.

    Notable because it creates confusion when subagent results or status updates land as duplicate bubbles.

    Happy to provide session traces if helpful for debugging.

  6. added
    P2Normal backlog priority with limited blast radius.
    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.
    on May 20, 2026
  7. 25 remaining items

  8. added
    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.
    and removed
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Aug 2, 2026
  9. added
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    on Sep 5, 2026
  10. openclaw-barnacle commented on Sep 19, 2026

    @openclaw-barnacle

    This bug report has been automatically marked as stale due to inactivity.
    ClawSweeper is checking whether current main already fixes the reported behavior.
    Inactivity alone will not close a bug report.

  11. added
    staleMarked as stale due to inactivity
    and removed
    staleMarked as stale due to inactivity
    on Sep 19, 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

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingimpact: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: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions