openclaw - 💡(How to fix) Fix [Bug]: WebChat loses previously visible assistant text after new user messages (regression in 2026.5.2) [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#77079Fetched 2026-05-05 05:52:39
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
2
Timeline (top)
labeled ×2closed ×1commented ×1mentioned ×1

In WebChat, a previously visible assistant reply can partially disappear after the user sends a later message.

What remains in the UI is often only:

  • Tool call
  • Tool output

The natural-language assistant explanation that was visible before is no longer shown.

This has happened repeatedly, not as a one-off.


Error Message

The user reports the following pattern:

Root Cause

  • Makes historical reasoning and explanations hard to review
  • Creates the impression that the assistant never replied
  • Especially damaging in tool-heavy workflows, because only the tool trace remains visible

Code Example

# Bug Report: Assistant text disappears from WebChat history after new user messages, leaving only tool cards

## Title

WebChat drops previously visible assistant text after later user messages; only `Tool call` / `Tool output` remain

## Version

OpenClaw **2026.5.2**

## Regression

This started **after upgrading to 2026.5.2**.
It **did not happen before the upgrade**.

---

## Summary

In WebChat, a previously visible assistant reply can partially disappear after the user sends a later message.

What remains in the UI is often only:

- `Tool call`
- `Tool output`

The natural-language assistant explanation that was visible before is no longer shown.

This has happened repeatedly, not as a one-off.

---

## Observed behavior

The user reports the following pattern:

1. Before sending a new message, the previous assistant reply is still visible in the WebChat UI.
2. After sending a new message, part or all of that previous assistant text disappears.
3. The UI often keeps only the tool-related cards.
4. Sometimes multiple user messages appear grouped together while the assistant replies between them are gone.
5. This can happen even when the previous assistant reply is already old (for example, about 10 minutes old), so it does **not** look like a simple "previous reply was still streaming" problem.

---

## Expected behavior

Completed assistant replies should remain visible in WebChat history.

If a turn contains:

- assistant text
- tool call(s)
- tool output(s)

then the UI should preserve the full completed turn instead of dropping the assistant text when later user messages arrive.

---

## Actual behavior

After a later user message is sent, previously visible assistant text may disappear from the chat history UI, while tool cards remain.

---

## Scope / impact

- Makes historical reasoning and explanations hard to review
- Creates the impression that the assistant never replied
- Especially damaging in tool-heavy workflows, because only the tool trace remains visible

Severity suggestion: **Medium-High**

---

## Important finding

This does **not** appear to be a policy/rules issue.

I did **not** find any rule or instruction requiring WebChat to hide assistant text and only show tool cards.
This looks like a **WebChat rendering / history reconstruction / message stitching bug**, not intended behavior.

---

## Evidence

### Session transcript exists

The conversation history is being persisted to a transcript file:

`/Users/yoc/.openclaw/agents/main/sessions/087c33cf-6d89-4b75-8981-0c8a0a231e43.jsonl`

This suggests the issue is not "history only saved to file and intentionally not shown in UI".
The data exists; the WebChat UI appears to be rendering it incorrectly.

### Related log paths

- Session transcript:
  `/Users/yoc/.openclaw/agents/main/sessions/087c33cf-6d89-4b75-8981-0c8a0a231e43.jsonl`
- Gateway logs directory:
  `/Users/yoc/.openclaw/logs/`
- Current day log:
  `/tmp/openclaw/openclaw-2026-05-04.log`

### Additional clue

Session history shows many assistant turns ending in tool use / tool-related steps. These turns may be reconstructed incorrectly by the WebChat frontend after later messages arrive.

---

## Suspected cause

Likely one of the following:

### 1. Final assistant text is not stably attached to the stored turn

The UI may initially show it, but later history refresh/rebuild drops it and leaves only tool cards.

### 2. WebChat incorrectly reconstructs turns that contain both tools and final assistant text

The tool trace survives, but the final natural-language reply is lost.

### 3. A completed assistant turn is being folded or replaced incorrectly when a later user message is appended

This would explain why older visible text disappears only after a new user message is sent.

### 4. Parent/child turn stitching bug

If the frontend collapses messages by parentId / chain incorrectly, it may merge user turns and drop assistant text between them.

---

## Reproduction outline

1. Use WebChat on OpenClaw 2026.5.2
2. Have the assistant perform one or more tool calls and then produce a natural-language explanation
3. Confirm the assistant text is visible
4. Send a later user message
5. Observe that the earlier assistant text may disappear while `Tool call` / `Tool output` remain

---

## Why this looks like a regression

- User reports it did **not** happen before upgrading to **2026.5.2**
- It started happening after the upgrade
- The issue has repeated multiple times since then

---

## What to check

1. WebChat history reconstruction for turns containing:
   - tool use
   - tool results
   - final assistant text
2. Message list refresh behavior when a new user message is appended
3. Whether final assistant text is persisted separately from tool-only turns
4. Whether transcript replay matches what the live UI originally rendered
5. Any 2026.5.2 frontend changes related to tool-card rendering, turn folding, or transcript replay

---

## One-line conclusion

After upgrading to **OpenClaw 2026.5.2**, WebChat appears to intermittently drop previously visible assistant text from history and retain only tool cards; this looks like a **frontend/history rendering regression**, not an intentional rule or policy.
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading to OpenClaw 2026.5.2, WebChat sometimes removes previously visible assistant text from chat history after a later user message is sent.

What remains is often only:

Tool call Tool output The assistant’s natural-language reply was visible before, but disappears afterward.

<img width="968" height="822" alt="Image" src="https://github.com/user-attachments/assets/45a1fc6d-9019-47c1-860b-5ef05382f86d" /> <img width="974" height="1040" alt="Image" src="https://github.com/user-attachments/assets/0e88210c-6fdf-41ad-b89b-4513902d3e87" />

Steps to reproduce

NOT_ENOUGH_INFO.

Expected behavior

Previously completed assistant replies should remain visible in WebChat history.

Actual behavior

After a later user message, earlier assistant text may disappear while tool cards remain.

<img width="968" height="822" alt="Image" src="https://github.com/user-attachments/assets/f045c50a-dcd7-42d5-a8f7-f173dbdfe1bc" /> <img width="974" height="1040" alt="Image" src="https://github.com/user-attachments/assets/971e2900-2e15-4189-a309-05e0d6919d96" />

OpenClaw version

2026.5.2

Operating system

macOS 26.4.1 (25E253)

Install method

No response

Model

gpt-5.4/deepseek-v4-flash

Provider / routing chain

WebChat -> OpenClaw gateway -> Cloudflare AI Gateway -> gpt-5.4/deepseek-v4-flash

Additional provider/model setup details

No response

Logs, screenshots, and evidence

# Bug Report: Assistant text disappears from WebChat history after new user messages, leaving only tool cards

## Title

WebChat drops previously visible assistant text after later user messages; only `Tool call` / `Tool output` remain

## Version

OpenClaw **2026.5.2**

## Regression

This started **after upgrading to 2026.5.2**.
It **did not happen before the upgrade**.

---

## Summary

In WebChat, a previously visible assistant reply can partially disappear after the user sends a later message.

What remains in the UI is often only:

- `Tool call`
- `Tool output`

The natural-language assistant explanation that was visible before is no longer shown.

This has happened repeatedly, not as a one-off.

---

## Observed behavior

The user reports the following pattern:

1. Before sending a new message, the previous assistant reply is still visible in the WebChat UI.
2. After sending a new message, part or all of that previous assistant text disappears.
3. The UI often keeps only the tool-related cards.
4. Sometimes multiple user messages appear grouped together while the assistant replies between them are gone.
5. This can happen even when the previous assistant reply is already old (for example, about 10 minutes old), so it does **not** look like a simple "previous reply was still streaming" problem.

---

## Expected behavior

Completed assistant replies should remain visible in WebChat history.

If a turn contains:

- assistant text
- tool call(s)
- tool output(s)

then the UI should preserve the full completed turn instead of dropping the assistant text when later user messages arrive.

---

## Actual behavior

After a later user message is sent, previously visible assistant text may disappear from the chat history UI, while tool cards remain.

---

## Scope / impact

- Makes historical reasoning and explanations hard to review
- Creates the impression that the assistant never replied
- Especially damaging in tool-heavy workflows, because only the tool trace remains visible

Severity suggestion: **Medium-High**

---

## Important finding

This does **not** appear to be a policy/rules issue.

I did **not** find any rule or instruction requiring WebChat to hide assistant text and only show tool cards.
This looks like a **WebChat rendering / history reconstruction / message stitching bug**, not intended behavior.

---

## Evidence

### Session transcript exists

The conversation history is being persisted to a transcript file:

`/Users/yoc/.openclaw/agents/main/sessions/087c33cf-6d89-4b75-8981-0c8a0a231e43.jsonl`

This suggests the issue is not "history only saved to file and intentionally not shown in UI".
The data exists; the WebChat UI appears to be rendering it incorrectly.

### Related log paths

- Session transcript:
  `/Users/yoc/.openclaw/agents/main/sessions/087c33cf-6d89-4b75-8981-0c8a0a231e43.jsonl`
- Gateway logs directory:
  `/Users/yoc/.openclaw/logs/`
- Current day log:
  `/tmp/openclaw/openclaw-2026-05-04.log`

### Additional clue

Session history shows many assistant turns ending in tool use / tool-related steps. These turns may be reconstructed incorrectly by the WebChat frontend after later messages arrive.

---

## Suspected cause

Likely one of the following:

### 1. Final assistant text is not stably attached to the stored turn

The UI may initially show it, but later history refresh/rebuild drops it and leaves only tool cards.

### 2. WebChat incorrectly reconstructs turns that contain both tools and final assistant text

The tool trace survives, but the final natural-language reply is lost.

### 3. A completed assistant turn is being folded or replaced incorrectly when a later user message is appended

This would explain why older visible text disappears only after a new user message is sent.

### 4. Parent/child turn stitching bug

If the frontend collapses messages by parentId / chain incorrectly, it may merge user turns and drop assistant text between them.

---

## Reproduction outline

1. Use WebChat on OpenClaw 2026.5.2
2. Have the assistant perform one or more tool calls and then produce a natural-language explanation
3. Confirm the assistant text is visible
4. Send a later user message
5. Observe that the earlier assistant text may disappear while `Tool call` / `Tool output` remain

---

## Why this looks like a regression

- User reports it did **not** happen before upgrading to **2026.5.2**
- It started happening after the upgrade
- The issue has repeated multiple times since then

---

## What to check

1. WebChat history reconstruction for turns containing:
   - tool use
   - tool results
   - final assistant text
2. Message list refresh behavior when a new user message is appended
3. Whether final assistant text is persisted separately from tool-only turns
4. Whether transcript replay matches what the live UI originally rendered
5. Any 2026.5.2 frontend changes related to tool-card rendering, turn folding, or transcript replay

---

## One-line conclusion

After upgrading to **OpenClaw 2026.5.2**, WebChat appears to intermittently drop previously visible assistant text from history and retain only tool cards; this looks like a **frontend/history rendering regression**, not an intentional rule or policy.

Impact and severity

Affected: WebChat users on OpenClaw 2026.5.2 Severity: Medium-High (breaks reliable history review) Frequency: Intermittent, but observed repeatedly Consequence: Previously visible assistant text disappears from the UI, making prior explanations hard to review

Additional information

Last known good version 2026.4.29, first known bad version 2026.5.2,. This looks like a frontend/history reconstruction regression. The transcript persists on disk, but WebChat appears to sometimes drop previously visible final assistant text when later messages are appended, while retaining tool-related cards. Possible areas to inspect: toolUse/toolResult/final-assistant turn stitching, transcript replay parity vs live render, and parentId/chain folding after later user messages.

extent analysis

TL;DR

The issue can likely be fixed by adjusting how WebChat reconstructs and renders turns containing both tool use/results and final assistant text in the history after a new user message is sent.

Guidance

  1. Inspect turn reconstruction logic: Verify how WebChat handles turns with both tool calls/results and final assistant text, especially after new user messages are appended.
  2. Check transcript replay vs. live render: Compare the transcript file with the live UI rendering to ensure they match, focusing on turns with tool use and assistant text.
  3. Review frontend changes in 2026.5.2: Examine changes related to tool-card rendering, turn folding, or transcript replay in the 2026.5.2 update.
  4. Test with different message sequences: Try various scenarios involving tool use, assistant text, and user messages to isolate the conditions under which the issue occurs.

Example

No specific code example can be provided without more details on the WebChat frontend implementation. However, the fix might involve ensuring that each turn's data (tool calls, tool outputs, and final assistant text) is correctly preserved and rendered in the UI after new messages are sent.

Notes

The exact solution depends on the specifics of WebChat's history reconstruction and rendering logic, which are not fully detailed in the issue report. The provided steps are intended to guide the investigation towards the most likely causes.

Recommendation

Apply a workaround or fix related to turn reconstruction and rendering in the WebChat frontend, as the issue appears to be a regression introduced in version 2026.5.2, affecting the display of historical assistant text after new user messages are sent.

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

Completed assistant replies should remain visible in WebChat history.

If a turn contains:

  • assistant text
  • tool call(s)
  • tool output(s)

then the UI should preserve the full completed turn instead of dropping the assistant text when later user messages arrive.


Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: WebChat loses previously visible assistant text after new user messages (regression in 2026.5.2) [1 comments, 2 participants]