Install
openclaw skills install archived-session-managementImplement, extend, or repair archived-session browsing in OpenClaw Control UI. Use when adding or fixing Archived Sessions / Recent Archived Sessions UI, archived search, resume / restore flows, session-history DB filters, live-session rebind logic, archive-state reconciliation, or session lifecycle cleanup for OpenClaw chat sessions.
openclaw skills install archived-session-managementImplement archived-session UX as an end-to-end feature, not a single-button patch. Archived session work spans the Control UI, gateway RPC handlers, transcript file moves, the session_history SQLite index, and the live sessions.json store.
Inspect the whole chain first
sessions.archived, sessions.resume, sessions.deleteArchivedsrc/gateway/session-archive.tssrc/config/sessions/history-db.tssessions.jsonTreat these as separate failure classes
Fix backend truth before UI polish
Reconcile legacy/inconsistent rows when needed
Archived search must match more than just friendly labels. Include at least:
sessionIdsessionKeydisplayNamefirstMessageagentIdchannelchatTypestatusfilePathWhen filtering archived sessions, do not rely on status = 'archived' alone. Legacy rows can still be archived-discoverable when:
archivedAt IS NOT NULL, orfilePath points into /sessions/archive/Read references/implementation-map.md before editing the query layer.
Restoring an archived session must be idempotent.
Handle all three cases:
When restore succeeds, update the history row so it reflects the active transcript path and active status.
Do not resume old archived main sessions into agent:main:main.
Older rows often store that key, which causes the UI to jump back into the current main thread instead of the restored transcript.
Bind restored transcripts to a distinct live key such as:
agent:<agentId>:archive-<sessionId>Then write that binding into the live session store so the session actually appears in Live and can be opened by URL.
Archived-session UI should include:
If the repo already has the UI shell, wire it to the corrected backend instead of rebuilding it.
When a user says an archived session is broken, verify all four:
session_historyIf a session is in neither Live nor Archived, suspect DB/store drift immediately.
Read references/implementation-map.md for the concrete OpenClaw file map, bug patterns, and example fixes.
When work is complete, report: