openclaw - 💡(How to fix) Fix [Bug]: Control UI Messages Duplicated - Single Tab Creates Multiple WebSocket Connections [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#72256Fetched 2026-04-27 05:32:27
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1

Control UI creates multiple WebSocket connections in a single browser tab, causing all messages to be displayed twice.

Root Cause

Control UI creates multiple WebSocket connections in a single browser tab, causing all messages to be displayed twice.

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Control UI creates multiple WebSocket connections in a single browser tab, causing all messages to be displayed twice.

Steps to reproduce

<img width="726" height="367" alt="Image" src="https://github.com/user-attachments/assets/b199eba7-5701-490c-ab1f-769653e372c8" />
  1. Open Control UI in a browser tab
  2. Observe gateway.log - multiple WebSocket connections are created within the same second
  3. Send any message to any agent
  4. Notice the same message appears twice in the chat interface

Expected behavior

Each message should appear exactly once in the Control UI chat interface, with a single WebSocket connection established per browser tab.

Before this bug occurred, opening Control UI created only one WebSocket connection, and all messages were displayed correctly without duplication.

Actual behavior

Each message should appear exactly once in the Control UI chat interface, with a single WebSocket connection established per browser tab.

Before this bug occurred, opening Control UI created only one WebSocket connection, and all messages were displayed correctly without duplication.

OpenClaw version

2026.4.24

Operating system

macOS 26.4.1

Install method

npm glabal

Model

minimax2.7

Provider / routing chain

User (Control UI) → WebSocket Gateway (localhost:18789) → Agent (小C/MiniMax-M2.7)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue can be fixed by ensuring that only one WebSocket connection is established per browser tab, potentially by modifying the Control UI's WebSocket connection establishment logic.

Guidance

  • Review the Control UI code to identify why multiple WebSocket connections are being created within the same second, and modify the logic to establish only one connection per tab.
  • Verify that the WebSocket connection establishment logic is correctly handling tab-specific connections, potentially by using a unique identifier for each tab.
  • Investigate if there are any caching or session management issues that could be causing the duplicate connections.
  • Check the WebSocket Gateway configuration to ensure it is not inadvertently allowing multiple connections from the same client.

Example

No code example can be provided without more information about the Control UI's implementation.

Notes

The provided information does not include specific details about the Control UI's implementation, making it difficult to provide a precise fix. Further investigation into the Control UI's code and configuration is necessary to identify the root cause.

Recommendation

Apply workaround: Modify the Control UI's WebSocket connection establishment logic to ensure only one connection per tab, as this is the most likely cause of the issue and can be addressed without waiting for an upgrade or further information.

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…

FAQ

Expected behavior

Each message should appear exactly once in the Control UI chat interface, with a single WebSocket connection established per browser tab.

Before this bug occurred, opening Control UI created only one WebSocket connection, and all messages were displayed correctly without duplication.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING