Skip to content

[Bug]: Control UI Chat History Display Issues #76892

@yusunz

Description

@yusunz

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

  1. Duplicate messages — during agent streaming output, the UI renders multiple overlapping chat bubbles with truncated/partial text.
  2. History loss on refresh — after refreshing the page, the entire chat conversation history disappears (blank chat), even though the transcript is intact on disk.

Steps to reproduce

  1. Open http://127.0.0.1:18789/ in browser.
  2. Have a conversation with the agent (at least 5-10 turns).
  3. Observe duplicate chat bubbles appearing during agent response (Issue 1).
  4. Refresh the page (F5).
  5. Observe empty chat area with no history (Issue 2).

Expected behavior

  • Per WebChat documentation:

    "Control UI remembers the backing Gateway sessionId returned by chat.history and includes it on follow-up chat.send calls, so reconnects and page refreshes continue the same stored conversation unless the user starts or resets a session."

  • Page refresh should preserve and reload the full conversation history.
  • Streaming output should render cleanly without duplicate bubbles.

Actual behavior

Symptoms

During agent generation, the UI shows multiple duplicate chat bubbles. Each new bubble appends one extra sentence from the agent's response. The chat appears correctly once the agent finishes output.

Symptoms

  1. User has a long conversation with the agent (30+ turns).
  2. User refreshes the browser tab (F5 / browser refresh).
  3. Control UI loads, but the chat area is empty — all previous conversation history is gone.
  4. Checking the server side: the transcript .jsonl file still exists on disk at ~/.openclaw/agents/main/sessions/<sessionId>.jsonl, and the session is still registered in sessions.json.
  5. Switching to TUI (openclaw tui) also shows the same empty history (confirmed).
Image Image Image Image

OpenClaw version

2026.5.2

Operating system

Ubuntu 24.04.4 LTS

Install method

No response

Model

deepseek-v4-flash

Provider / routing chain

deepseek

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

NOT_ENOUGH_INFO

Additional information

  • Thinking mode: Config thinkingDefault: "off", session override via UI picker can switch to high
  • Channel: webchat (Control UI)
  • Issue 1 : Duplicate / overlapping chat bubbles during streaming output### When it happens

  • Agent responds with multiple sentences (e.g. explanation + tool call).
  • Each streaming chunk or thinking-mode toggle triggers a re-render, causing the UI to append duplicate entries.

Impact

Conversation becomes unreadable in real time.

Issue 2: Chat history disappears after page refresh

Workarounds Found

  1. Set blockStreamingDefault: "off" and blockStreamingBreak: "message_end" — reduces chunking but does not eliminate the issue.

Additional Context

  • The thinking level picker in the Control UI was observed toggling between Default(medium) and user-set levels during agent output. After setting thinkingDefault: "off" in config, the toggling stopped, but the duplicate bubble and history-loss issues persisted.
  • Running openclaw doctor --fix cleaned up stale session files but did not resolve the issue.
  • The TUI client also showed empty history after session switches, suggesting the problem is at the Gateway chat.history endpoint level rather than a pure frontend rendering issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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