openclaw - 💡(How to fix) Fix [Bug] Webchat messages delivered twice — duplicate replies on same session [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#73464Fetched 2026-04-29 06:19:35
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
closed ×1commented ×1
RAW_BUFFERClick to expand / collapse

Bug Description

When sending messages via webchat (Chrome browser), the same message is sometimes delivered to the agent twice, resulting in two identical replies appearing in the chat UI.

Steps to Reproduce

  1. Open OpenClaw webchat in Chrome
  2. Send a message (e.g., any plain text query)
  3. Observe: two identical replies appear in the UI

Screenshot

Included — showing duplicate Q&A with identical content and timestamps (both 16:29).

Environment

  • OpenClaw version: 2026.4.26 (also occurred on 2026.4.24 before upgrade)
  • Platform: Linux (Ubuntu/Debian)
  • Channel: webchat
  • Sender metadata shows: first message from openclaw-control-ui, second from You — same content, same timestamp

Additional Context

This also appears to cause gateway instability — the watchclaw log shows repeated health check failures and restarts during the period when duplicate messages were occurring. Updating from 2026.4.24 to 2026.4.26 did not resolve the issue.

This looks like a race condition in the webchat plugin's message routing: the same inbound message triggers two separate processing paths (control-ui route + direct session route), causing duplicate agent turns.

Please investigate the webchat plugin message handler for duplicate inbound event handling.

extent analysis

TL;DR

Investigate and refactor the webchat plugin's message handler to prevent duplicate inbound event handling, likely caused by a race condition between the control-ui route and direct session route.

Guidance

  • Review the webchat plugin's code to identify potential race conditions in the message routing logic, focusing on the control-ui and direct session routes.
  • Verify the issue by checking the watchclaw log for repeated health check failures and restarts during periods of duplicate message occurrence.
  • Inspect the sender metadata to confirm that the duplicate messages are indeed coming from both openclaw-control-ui and the user's session.
  • Consider implementing a message deduplication mechanism or a locking mechanism to prevent concurrent processing of the same inbound message.

Example

No code snippet is provided due to the lack of specific code details in the issue.

Notes

The issue may be specific to the webchat plugin's interaction with the OpenClaw platform, and further investigation is needed to determine the root cause. The fact that updating from 2026.4.24 to 2026.4.26 did not resolve the issue suggests that the problem may be more complex than a simple version-specific bug.

Recommendation

Apply a workaround, such as implementing a message deduplication mechanism, until the root cause of the issue can be fully understood and addressed. This is because the issue is causing gateway instability and duplicate messages, which can negatively impact the user experience.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING