openclaw - 💡(How to fix) Fix Phantom user messages appear in webchat after heartbeat wakes / gateway restart / session repair [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#75784Fetched 2026-05-02 05:30:14
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
2
Timeline (top)
commented ×1

Three phantom user messages appeared in webchat that the user did NOT send.

Root Cause

Three phantom user messages appeared in webchat that the user did NOT send.

RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw: 2026.4.29 (commit a448042)
  • OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2, x86_64)
  • Node: v22.22.2
  • Channel: webchat

Description

Three phantom user messages appeared in webchat that the user did NOT send.

Phantom 1 - Context bleed from tool call

After assistant ran a curl API test with "say hello in 3 words" as test prompt, a user message with that exact text appeared with no provenance.

Phantom 2 - After gateway restart + session repair

Gateway restart at 00:46 triggered orphan recovery and session file repair, then phantom message appeared.

Phantom 3 - During stuck subagent diagnostics

Stuck subagent triggered repeated diagnostics causing spurious wake events.

Evidence

Gateway journal logs show:

  • subagent-orphan-recovery events
  • stuck session diagnostics (age 127s-183s)
  • session file repaired events (rewrote 1 assistant message)

Impact

  • Messages appear that user did not send
  • Wastes tokens on unwanted replies
  • Users cannot distinguish real vs system messages

Reproduction

  1. Spawn subagent with short test phrase in task
  2. Wait for heartbeat/wake event
  3. Observe: test phrase appears as user message

extent analysis

TL;DR

The issue can likely be mitigated by improving subagent diagnostics and session repair mechanisms to prevent context bleed and spurious message generation.

Guidance

  • Investigate the subagent-orphan-recovery events and stuck session diagnostics to identify the root cause of the phantom messages.
  • Review the session file repair mechanism to ensure it does not rewrite assistant messages as user messages.
  • Consider adding provenance information to messages to distinguish between user-generated and system-generated messages.
  • Verify the issue by reproducing the steps outlined in the reproduction section and observing the behavior.

Example

No code snippet is provided as the issue does not contain sufficient code-related information.

Notes

The issue may be related to the specific version of OpenClaw (2026.4.29) and the Node version (v22.22.2), but without further information, it is difficult to determine the exact cause.

Recommendation

Apply workaround: Implement a temporary fix to the session file repair mechanism to prevent rewriting assistant messages as user messages, and investigate the subagent diagnostics to prevent spurious wake events. This is recommended as it addresses the immediate issue and allows for further investigation into the root cause.

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