-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
[Bug]: WebChat refresh can lose visible conversation history when transcript tail is mostly internal tool traffic #83344
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingbug:behaviorIncorrect behavior without a crashIncorrect behavior without a crashclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
WebChat can show stale or missing conversation history after a browser refresh when the most recent transcript records are dominated by internal tool calls/tool results/NO_REPLY events rather than user-visible chat messages.
Steps to reproduce
Expected behavior
Refreshing WebChat should restore the recent human-visible conversation, even if the transcript tail contains many internal tool-call/tool-result records. Session preview/title data should also reflect recent visible user/assistant messages instead of stale internal/silent records.
Actual behavior
The session transcript on disk still contains the earlier conversation, but the refreshed WebChat view can appear to lose pieces of history. In the observed session, session list metadata showed a stale derived title from the first VPN message and
lastMessagePreview: "NO_REPLY", despite later user messages. The recent transcript tail was dominated by internal tool traffic, so the default recent-history window contained very few user-visible records after client-side filtering.OpenClaw version
OpenClaw 2026.5.12 (f066dd2)
Operating system
Ubuntu 26.04 LTS 7.0.0-15-generic (x86_64)
Install method
npm global
Model
openai/gpt-5.5
Provider / routing chain
OpenClaw -> OpenAI Responses API
Additional provider/model setup details
Main WebChat session for agent
lily; session metadata reported modelgpt-5.5.Logs, screenshots, and evidence
Impact and severity
Affected: WebChat/Control UI users with long-running tool-heavy sessions or sessions receiving heartbeat/internal events.
Severity: Medium to high. The transcript is not deleted, but the UI can make conversation context appear lost across refreshes, which undermines trust and makes it hard to continue ongoing work.
Frequency: Observed in one active WebChat session after a long tool-heavy workflow; likely reproducible whenever the recent transcript window is mostly internal records.
Consequence: Users may believe conversation history was lost, may lose visible context needed to continue a task, and session list previews can point at stale or silent messages.
Additional information
I don't get any responses to the questions i ask unless I refresh, and then the question disappears like i never asked it.
I see maybe it's been reported already - #51549
Current main appears to restore visible conversation history from the gateway via chat.history.
The remaining broken pieces are queued messages and unsent draft text.
chatMessage and chatQueue still initialize from component memory, so a full browser refresh rebuilds them empty.
Queue mutations append/remove entries from the in-memory host.chatQueue; no storage-backed restore path was found.
Draft edits update in-memory state.chatMessage; no sessionStorage/localStorage persistence was found.
Current per-session queue preservation only helps in-app session switching; it uses in-memory chatQueueBySession, so it does not survive F5/tab close.
Source-level evidence from the review pointed at:
ui/src/ui/app.ts for initial chatMessage / chatQueue
ui/src/ui/app-chat.ts for queue enqueue/flush
ui/src/ui/chat/input-history.ts for draft-change handling
ui/src/ui/app-render.helpers.ts for in-memory per-session queue handling
ui/src/ui/controllers/chat.ts for existing history reload
Open questions/risk:
Restored queued messages must not submit too early while an agent run is active.
Attachments need explicit handling if queued messages can include files/media.
Draft/queue retention needs a product/privacy decision: sessionStorage is safer/shorter-lived; localStorage survives browser restarts but leaves prompts on disk longer.
No live browser F5 repro was performed in the bot review; the remaining failure was verified from source behavior.
Short version: history refresh is partly fixed, but queue + draft persistence are still real gaps unless a newer PR landed after that review.