Skip to content

[FEATURE]: view archived sessions on desktop #6680

Open
Shaik121/opencode
#1

Description

@0xajka

Feature hasn't been suggested before.

  • 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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 2, 2026
  2. 0xajka commented on Jan 2, 2026

    @0xajka
    ContributorAuthor

    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)

  3. 0xajka commented on Jan 2, 2026

    @0xajka
    ContributorAuthor
  4. JulianDom commented on Jan 8, 2026

    @JulianDom

    When will this going to be in production?

  5. 0xajka commented on Jan 8, 2026

    @0xajka
    ContributorAuthor

    When will this going to be in production?

    @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

  6. adamdotdevin commented on Jan 8, 2026

    @adamdotdevin
    Member

    Apologies @JulianDom and @0xajka promise we'll resolve this very soon

  7. TheShahnawaaz commented on Jan 20, 2026

    @TheShahnawaaz

    Is it done now?

  8. hypnoticHODL commented on Jan 21, 2026

    @hypnoticHODL

    Looking forward to this feature. I just archived a session by mistake and can't see it anymore.

  9. samochreno commented on Jan 30, 2026

    @samochreno

    @adamdotdevin any updates on this?

  10. anphung commented on Feb 4, 2026

    @anphung

    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."

  11. xtfer commented on Feb 15, 2026

    @xtfer

    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.

  12. 0xajka commented on Feb 15, 2026

    @0xajka
    ContributorAuthor

    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.

  13. linuxing3 commented on Mar 5, 2026

    @linuxing3

    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

  14. 23 remaining items

  15. MarcoLavoro commented on May 30, 2026

    @MarcoLavoro

    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

  16. brillantlink commented on Jul 8, 2026

    @brillantlink

    It remains hidden and easily accessible in archived chats!

  17. planetzalex commented on Jul 9, 2026

    @planetzalex

    Apologies @JulianDom and @0xajka promise we'll resolve this very soon

    promise.

  18. Cleroth commented on Jul 9, 2026

    @Cleroth

    Apologies @JulianDom and @0xajka promise we'll resolve this very soon

    promise.

    Gotta wait for GPT 7

  19. Aresitoo commented on Jul 15, 2026

    @Aresitoo

    Yeah I totally need this. Incredible that it is impossible to find archived chat sessions! such a basic needed feature

  20. Imed-eddine-amara commented on Jul 18, 2026

    @Imed-eddine-amara

    why this basic feature had not been merged yet ?

  21. y888 commented on Aug 9, 2026

    @y888

    我随手点到了归档的内容,后来只能开启新对话让它自己把自己的归档的内容恢复🫥 成功了

  22. Cleroth commented on Sep 22, 2026

    @Cleroth

    Apologies @JulianDom and @0xajka promise we'll resolve this very soon

    promise.

    Gotta wait for GPT 7

    Don't worry guys, just one more major version left.

  23. marked Where is Archived Chats? #50226 as a duplicate of this issue on Oct 1, 2026
  24. alohaninja commented on Oct 1, 2026

    @alohaninja

    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.

  25. alohaninja commented on Oct 14, 2026

    @alohaninja

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions