-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: WebChat sessions_history misses prior history split into reset/archive session files for same visible dashboard conversation #92062
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 workingclawsweeper: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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper: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.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
Summary
sessions_historycan report that a WebChat session has no earlier history, even though older turns for the same visible dashboard conversation still exist locally in prior/reset transcript files.This looks related to reset/archive/family-session handling: the active session transcript is returned, but older transcripts with the same visible WebChat/dashboard session key are not surfaced by
sessions_history.No private user data is included below. Session IDs, paths, and prompts are sanitized.
What happened
A user asked to view earlier messages from the current WebChat session before the current day.
The agent called
sessions_historyfor the visible WebChat session key:{ "sessionKey": "<webchat-dashboard-session-key>", "limit": 200, "includeTools": false }sessions_historyreturned only the current active transcript, starting with the first message in<current-session-id>.jsonl.However, searching local session files showed that the same visible dashboard session key appeared in multiple trajectory files:
The previous session transcript had been rotated into a reset archive:
An older prior transcript also existed as:
Those older files contained prior user turns for the same visible WebChat/dashboard conversation, but
sessions_historydid not include them.Evidence from local investigation
Sanitized structure observed:
The same
<webchat-dashboard-session-key>appeared in the corresponding.trajectory.jsonlfiles for all three session IDs.sessions.jsononly mapped the visible session key to the current active session ID.Related issues / PRs
This appears to match or overlap with:
[Feature]: Script to restore session history archived by new daily-reset mechanismAdd session history family lookupfeat(session): add includeArchived to chat.history and sessions_historyfix(sessions): fall back to latest reset archive for missing async transcriptsRelated closed issues that appear relevant:
sessions_history should support reading archived/reset sessionsBug: session reset archives are not discoverable via sessions_history, breaking context recovery after resetSession history not listed in UI after /new or /resetWebChat session silently resets on first message after daily 4 AM boundaryWebChat Control UI auto-archives sessions with action:new senderId:unknownAuto-pull recent session context on daily resetAdjacent but not the same root cause:
sessions_history: add pagination/offset and export support#90981 is about truncation/pagination. This report is specifically about older history existing in reset/archive/family session files but not being reachable through
sessions_history.Suggested fix
Expose and document one reliable path for retrieving logical conversation history across reset/archive/family transcripts.
For example:
{ "sessionKey": "<webchat-dashboard-session-key>", "includeFamily": true, "includeArchived": true }or a separate export/history endpoint that returns:
Privacy note
This report intentionally omits real prompts, real attachment names, real local usernames, and exact private file paths. The issue is reproducible from the transcript/session structure alone.
Expected behavior
When a visible WebChat/dashboard conversation has prior transcript files connected by the same session key, reset archive, or session family,
sessions_historyshould either:includeFamily,includeArchived, orresetAncestors, orThe UI should also avoid implying “no earlier history” when reset/archive transcripts exist.
Actual behavior
sessions_historyonly returned the active transcript.This made it look like there was no earlier conversation history, even though older turns existed in
.jsonl.reset.*files and matching trajectory files.Why this matters
This can cause agents and users to incorrectly conclude that conversation history is missing or lost.
The data may still exist on disk, but it is hidden from the normal history tool and difficult to discover without manual filesystem inspection.
This is especially confusing in WebChat, where the visible dashboard conversation appears continuous to the user, while the backend has split it across multiple session IDs.
OpenClaw version
v2026.6.5
Operating system
Ubuntu 24.04.4
Install method
npm / pnpm package-manager install, not git checkout
Model
openai/gpt-5.5
Provider / routing chain
OpenClaw -> OpenAI Codex OAuth -> openai/gpt-5.5
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response