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. JulianDom commented on Jan 8, 2026

    @JulianDom

    When will this going to be in production?

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

  5. adamdotdevin commented on Jan 8, 2026

    @adamdotdevin
    Member

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

  6. TheShahnawaaz commented on Jan 20, 2026

    @TheShahnawaaz

    Is it done now?

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

  8. samochreno commented on Jan 30, 2026

    @samochreno

    @adamdotdevin any updates on this?

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

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

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

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

  13. 24 remaining items

  14. brillantlink commented on Jul 8, 2026

    @brillantlink

    It remains hidden and easily accessible in archived chats!

  15. planetzalex commented on Jul 9, 2026

    @planetzalex

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

    promise.

  16. Cleroth commented on Jul 9, 2026

    @Cleroth

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

    promise.

    Gotta wait for GPT 7

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

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

    @Imed-eddine-amara

    why this basic feature had not been merged yet ?

  19. y888 commented on Aug 9, 2026

    @y888

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

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

  21. marked Where is Archived Chats? #50226 as a duplicate of this issue on Oct 1, 2026
  22. 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.

  23. 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?

  24. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Thanks for the suggestion, @0xajka!

    To restate it: you'd like a Show archived sessions item in the sidebar's ... menu on desktop. It would open a modal listing that project's archived sessions, and clicking one would unarchive it and open it.

    Right now the desktop app hides archived sessions from the sidebar, Home and search. The only place they show up is the experimental Inbox sidebar mode. Its "Archived" section lets you unarchive a session from the row menu, but it only lists sessions that finished a run after you first started using the Inbox. So there's no full per-project list to browse and restore from.

    I've marked this as a feature request, and the maintainers will consider 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