Skip to content

[FEATURE]: Add unarchive/restore for archived sessions and confirmation dialog #32355

Closed as duplicate

Description

@devZu9

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

Problem: Archiving a session in the desktop app is a one-way operation with no confirmation. The archive button in the sidebar is too easy to hit accidentally (issue #20347). Once archived, there's no way to restore from the UI - you have to edit the SQLite database manually.

What happened to me:
I accidentally clicked the archive button in the desktop sidebar (the icon looks like a context menu button). The session disappeared immediately with no confirmation. I couldn't restore it from the UI. I had to use opencode db to find it in the SQLite database and set time_archived=NULL. Even then, the session didn't reappear until I manually reconstructed it.

Request:

  1. Add Unarchive action to restore archived sessions (backend already supports time_archived=NULL)
  2. Show archived sessions in a visible section or filter in the sidebar
  3. Add a confirmation dialog before archiving (Are you sure you want to archive this session?)

Related issues:

Activity

  1. github-actions commented on Jun 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please check those issues and consider adding your use case (accidental click in the desktop sidebar) as a comment there instead of opening a new request.

  2. MrAwesome commented on Aug 10, 2026

    @MrAwesome

    For anyone finding this through Google before it's fixed, you can unarchive sessions manually with sqlite.

    Find your opencode.db file, open it with sqlite:

    sqlite3 ~/.local/share/opencode/opencode.db
    

    Run this to show all archived sessions:

    SELECT id, title, time_archived FROM session WHERE time_archived IS NOT NULL;
    

    Copy the id of the relevant session, then:

    UPDATE session SET time_archived = NULL WHERE id = 'paste_your_id_here';
    
  3. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Closing as a duplicate of #6680, which tracks viewing and restoring (unarchiving) archived sessions. Please add your use case and 👍 there. The accidental-archive confirmation you describe is a good point to raise there as well.

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