You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: view archived sessions on desktop #6680
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Add a menu item to the ... menu in the side bar to show archived sessions. This should then open a modal that lists the archived sessions from that project and if you click on one it will unarchive it and open it up. @adamdotdevin suggested it on the discord and gave most of these specs.
Looking forward to this feature. I just archived a session by mistake and can't see it anymore.
@hypnoticHODL Not exactly unarchiving, but you can view archived sessions in TUI: "Use the /sessions command (or ctrl+x l) to list and switch between archived sessions."
Reacted by Hypnotic HODL and Defake
Reacted by Christopher Skene, Ilya Laryushkin, brokenstring314, SerjLaren and mflow42
Just lost a session because of this, and it is not in the TUI list. Would be great if this fairly simple improvement could be added. Thanks.
Using ctrl + p you should be able to search sessions including archived sessions. This should work in the latest desktop version. I am less familiar with the tui. If that doesn't work there are files in your .opencode that contain the session data that can be manually edited to change from being archived. Finally I know that opencode just rolled out or is rolling out a SQLite db but I am only vaguely aware of the troubleshooting steps that Dax mentioned on X if it's not working.
I found the solution.
Edit ~/.local/share/opencode/opencode.db with lazysql
If a sessions is archived, the archived field has timstramp and permision field is NULL
press c to change values of your session record
change archived to NULL and permission as other sessions.
Save query with C-S-s
Looking forward to this feature. I just archived a session by mistake and can't see it anymore.
@hypnoticHODL Not exactly unarchiving, but you can view archived sessions in TUI: "Use the /sessions command (or ctrl+x l) to list and switch between archived sessions."
someone tried this? because i cannot do /sessions on desktop because is not recognized and control +x l does do NOTHING
Adding the backend context from #24153 (closed today as a dup of this — I filed it and bug #47849):
I accidentally archived a session and couldn't get it back. There's no unarchive UI yet, and unarchive is broken at the API too: clearing time.archived returns 200 and does nothing, because the projector drops undefined from the update set and the handler guard skips {"time":{}}. Fix is up in #47848.
@PaoloC68 independently confirmed the falsy-value behavior by restoring with archived: 0 — test.
Following up on my earlier backend report: I checked V2 dev at 35bb8e4. Session PATCH currently accepts title, metadata, and permissions, while Home has a TODO awaiting an archive API. Storage still retains time_archived and Home filters archived sessions.
Would a small API-first PR be welcome?
Proposed contract:
PATCH /api/session/:sessionID with {"archived": true} archives using a server timestamp; {"archived": false} restores by persisting NULL.
Omitting archived leaves the state alone. Repeating either operation is a no-op, preserving the original archive timestamp.
Keep the existing 204 response and not-found behavior.
Publish the state change through the existing durable session-event/projector path so connected clients can observe it.
Treat this as visibility state: preserve messages and session recency, without interrupting running work or cascading to child sessions.
The first PR would cover the API, core persistence/event handling, generated clients, and archive → restore → reread/replay tests, including repeated requests and updates that omit archived. Existing session.list behavior would remain compatible; UI discovery and restore controls can follow under this issue.
Does that contract fit the intended V2 design, or is someone already implementing it?
Activity
0xajka commentedon Jan 2, 2026
I tried to build this but cannot get the desktop app to build on my computer to confirm it works so I am not making a PR (yet)
0xajka commentedon Jan 2, 2026
https://github.com/0xajka/opencode/tree/feat/view-archived-sessions
JulianDom commentedon Jan 8, 2026
When will this going to be in production?
0xajka commentedon Jan 8, 2026
@adamdotdevin said they are currently in discussions on how they want to implement this so they aren't merging my fix yet so idk how long
adamdotdevin commentedon Jan 8, 2026
Apologies @JulianDom and @0xajka promise we'll resolve this very soon
TheShahnawaaz commentedon Jan 20, 2026
Is it done now?
hypnoticHODL commentedon Jan 21, 2026
Looking forward to this feature. I just archived a session by mistake and can't see it anymore.
samochreno commentedon Jan 30, 2026
@adamdotdevin any updates on this?
anphung commentedon Feb 4, 2026
@hypnoticHODL Not exactly unarchiving, but you can view archived sessions in TUI: "Use the /sessions command (or ctrl+x l) to list and switch between archived sessions."
xtfer commentedon Feb 15, 2026
Just lost a session because of this, and it is not in the TUI list. Would be great if this fairly simple improvement could be added. Thanks.
0xajka commentedon Feb 15, 2026
Using ctrl + p you should be able to search sessions including archived sessions. This should work in the latest desktop version. I am less familiar with the tui. If that doesn't work there are files in your .opencode that contain the session data that can be manually edited to change from being archived. Finally I know that opencode just rolled out or is rolling out a SQLite db but I am only vaguely aware of the troubleshooting steps that Dax mentioned on X if it's not working.
linuxing3 commentedon Mar 5, 2026
I found the solution.
Edit ~/.local/share/opencode/opencode.db with
lazysqlIf a sessions is archived, the
archivedfield has timstramp andpermisionfield isNULLpress
cto change values of your session recordchange
archivedtoNULLandpermissionas other sessions.Save query with
C-S-s23 remaining items
MarcoLavoro commentedon May 30, 2026
someone tried this? because i cannot do /sessions on desktop because is not recognized and control +x l does do NOTHING
brillantlink commentedon Jul 8, 2026
It remains hidden and easily accessible in archived chats!
planetzalex commentedon Jul 9, 2026
promise.
Cleroth commentedon Jul 9, 2026
Gotta wait for GPT 7
Aresitoo commentedon Jul 15, 2026
Yeah I totally need this. Incredible that it is impossible to find archived chat sessions! such a basic needed feature
Imed-eddine-amara commentedon Jul 18, 2026
why this basic feature had not been merged yet ?
y888 commentedon Aug 9, 2026
我随手点到了归档的内容,后来只能开启新对话让它自己把自己的归档的内容恢复🫥 成功了
Cleroth commentedon Sep 22, 2026
Don't worry guys, just one more major version left.
fix(session): make unarchive work; find/restore archived sessions in …
alohaninja commentedon Oct 1, 2026
Adding the backend context from #24153 (closed today as a dup of this — I filed it and bug #47849):
I accidentally archived a session and couldn't get it back. There's no unarchive UI yet, and unarchive is broken at the API too: clearing
time.archivedreturns 200 and does nothing, because the projector dropsundefinedfrom the update set and the handler guard skips{"time":{}}. Fix is up in #47848.@PaoloC68 independently confirmed the falsy-value behavior by restoring with
archived: 0— test.alohaninja commentedon Oct 14, 2026
Following up on my earlier backend report: I checked V2 dev at 35bb8e4. Session PATCH currently accepts title, metadata, and permissions, while Home has a TODO awaiting an archive API. Storage still retains time_archived and Home filters archived sessions.
Would a small API-first PR be welcome?
Proposed contract:
The first PR would cover the API, core persistence/event handling, generated clients, and archive → restore → reread/replay tests, including repeated requests and updates that omit archived. Existing session.list behavior would remain compatible; UI discovery and restore controls can follow under this issue.
Does that contract fit the intended V2 design, or is someone already implementing it?