Skip to content

[Bug]: Control UI webchat duplicates every assistant reply on 2026.4.21 — regression from #5964/#39469 #71992

@rzhnrhjr6j-cloud

Description

@rzhnrhjr6j-cloud

Bug description

Every assistant reply in the Control UI webchat appears exactly twice in the chat view. Full duplicate, not streaming fragments.

  • Fresh install of OpenClaw 2026.4.21 via npm
  • /debug system-events off is disabled by default and cannot be toggled
  • Clearing Local Storage + hard refresh temporarily fixes it
  • Bug returns after a few messages
  • Does NOT occur with Telegram channel (same session)

Environment

Item Value
OpenClaw version 2026.4.21
OS macOS 15.4 (Darwin 25.4.0, arm64)
Browser Chrome + Safari both affected
Gateway mode local
Model kimi/kimi-code

Steps to reproduce

  1. Open Control UI at http://127.0.0.1:18789/chat
  2. Send any message
  3. Observe assistant reply appears twice
  4. Refresh page → temporarily fixed
  5. Send a few more messages → duplicates return

Root cause analysis (from prior investigation)

This is a client-side rendering bug, not backend duplication:

Related issues

Expected behavior

Each assistant turn produces exactly one visible message in the Control UI.

Request

Please either:

  1. Reopen fix(webchat): clear chatStream before updating chatMessages to prevent duplicate rendering #34164 as a clean PR with just the webchat fix (chat.ts + chat.test.ts), or
  2. Apply the one-line fix directly: clear chatStream/chatRunId before writing to chatMessages in both final and aborted event handlers

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.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.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions