-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Description
OpenClaw WebChat /new Behavior vs Session Label/History Indexing
Summary
On a stock OpenClaw install (2026.2.21-2), WebChat "New Session" (or sending /new) keeps only one session row (agent:main:main) in sessions.list, archives prior transcript files to .jsonl.reset.*, and appears to drop user label metadata from the active session entry.
This makes chat history appear "lost" in UI, even though transcript files are present on disk.
Environment
- OS: Ubuntu server
- OpenClaw:
2026.2.21-2 - Gateway service:
openclaw-gateway.service(user unit, enabled+active) - Gateway exec path:
/home/jarvis/.nvm/versions/node/v24.13.0/bin/node .../openclaw/dist/index.js gateway --port 16372
Observed Behavior
- Label current session from WebChat.
- Click New Session (UI) or send
/new. - Session label disappears.
- Session list still shows one key (
agent:main:main), often perceived asmain:main:mainin UI. - Old messages are not listed as separate sessions in UI.
- On disk, many archived transcript files exist (
*.jsonl.reset.*) under agent session dirs.
Expected Behavior (user expectation)
- Either:
/newpreserves label in the active entry when rotatingsessionId, or- UI/session model clearly surfaces archived resets/history as prior sessions.
- Avoid apparent "history loss" when transcripts are still present on disk.
Hard Evidence
1) Live gateway sessions.list returns single indexed session
Observed response:
count: 1sessions[0].key: "agent:main:main"sessions[0].sessionId: "bd4b2023-7648-406e-8e22-1bbda20c2dce"
2) Session files exist, including many reset archives
Under ~/.openclaw/agents/main/sessions:
- total files:
39 - live
.jsonl:11 - reset archives
.jsonl.reset.*:23
3) Main session index has only one key and empty label
From ~/.openclaw/agents/main/sessions/sessions.json:
main_keys=1- key:
agent:main:main main_label=(empty)
4) UI New Session action sends /new
dist/control-ui/assets/index-Cx1_w3YP.js:7665contains:onNewSession:()=>e.handleSendChat("/new",{restoreDraft:!0})
5) Session key canonicalization collapses direct chats to main bucket
dist/sessions-BpJAqQ8e.js:590-603- comment says non-group direct chats collapse to canonical direct bucket
- canonical key resolves to
agent:main:<mainKey>(default main key)
6) sessions.list reads session store (index), not transcript archive inventory
dist/gateway-cli-Cq5z-VKf.js:7173-7183sessions.list->loadCombinedSessionStoreForGateway(cfg)->listSessionsFromStore(...)
7) sessions.reset path preserves label
dist/gateway-cli-Cq5z-VKf.js:7337-7350- reset entry explicitly includes
label: entry?.label
- reset entry explicitly includes
8) Chat /new flow rebuilds session entry and archives prior transcript
dist/reply-B2UJINPw.js:71090-71115- session entry reconstructed with many fields but no explicit
label
- session entry reconstructed with many fields but no explicit
dist/reply-B2UJINPw.js:71183-71188- previous transcript archived with reason
"reset"
- previous transcript archived with reason
Potential Root Cause
There appears to be an inconsistency between:
- gateway RPC reset path (
sessions.reset) that preserves label, and - chat command
/newpath (used by WebChat New Session) that rebuilds entry and may not preserve label.
Combined with store-based listing, this yields:
- one visible session key,
- archived files on disk,
- no visible historical sessions in the UI list,
- perceived label loss.
Questions for Maintainers
- Is
/newintended to keep one key (agent:main:main) and only rotatesessionId? - Should
/newpreserve existinglabellikesessions.resetdoes? - Is the UI expected to expose reset archives/history, or is single-row behavior by design?
- If by design, can docs/UI messaging clarify this to avoid apparent data-loss confusion?
Local Integrity Notes
- Install was restored to stock via official updater (
openclaw update --yes --tag 2026.2.21-2). - No local code patch retained in installed dist after restore.
- Chat transcript files are present on disk (history not physically lost).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels