Skip to content

[FEATURE]: How do I archive session in v2? #53505

Done

Description

@simPod

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

Closing the tab is not enough, it still pollutes session list.

Activity

  1. github-actions commented on Oct 6, 2026

    @github-actions
    Contributor

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

  2. opencodejr commented on Oct 27, 2026

    @opencodejr
    Contributor

    Thanks for the request, @simPod!

    You'd like a way to archive a session in v2 so it leaves the session list, since closing its tab doesn't remove it.

    The app can already archive sessions in v2, and archived sessions are hidden from the session lists. It just isn't exposed in the default layouts yet. For now you can archive in either of these ways:

    • Experimental Inbox mode: in Settings → General → Interface mode, choose Inbox (marked experimental). Each session's menu there has an Archive item.
    • API: opencode api patch /api/session/<sessionID> --data '{"archived":true}' archives a session, and {"archived":false} restores it.

    An archive action in the regular top/side tab layouts (and a way to view or unarchive archived sessions) isn't available yet. Maintainers will consider it.

    Related issues:

  3. brunodantasgc commented on Oct 28, 2026

    @brunodantasgc

    Same gap, with the exact code-level cause on Desktop 2.2.0 (Windows 11).

    The Home session row already renders an archive control. In the shipped app.asar the button carries data-action="home-session-archive" and an archive icon, and it is gated by the module constant fBt, initialized to !1:

    fBt=!1,pBt=500,mBt=250,hBt=200,gBt=[56,38,66,46,30,52]

    The flag is a literal in the bundle and is never flipped at runtime, so the button cannot render regardless of session state. That matches what was described above as "not exposed in the default layouts yet": the control was built and localized, then disabled at build level rather than merely left out of the layout.

    Supporting evidence:

    • Localization for the action already ships in both languages (common.archive = "Archive" / "Arquivar" in pt-BR).
    • The API path works: PATCH /api/session/{sessionID} with {"archived":true} archives, {"archived":false} restores, and GET /api/session?archived=true lists archived sessions.
    • No other entry point exposes it on 2.2.0. All three were checked: right-click on a Home session row (Rename, Export, Delete), the ... menu in the session header (Rename, Export, Delete), and right-click on the tab in the sidebar (Rename, Close tab, Delete session).

    Steps to observe:

    1. Desktop 2.2.0, open Home.
    2. Hover any session row. No archive button appears.
    3. Try the three menus listed above. None contains Archive.

    Impact: the only visible way to clear a delivered session from the list is Delete, which permanently removes the session and its children. Users who want a reversible "done" state have no option in the default layout, and the disabled flag makes this look like a missing feature rather than a hidden one.

    Environment: OpenCode Desktop 2.2.0, Windows 11 (Windows_NT 10.0.26300, x64), app in pt-BR.

  4. jmmon commented on Nov 24, 2026

    @jmmon

    Same here. The server already supports it (PATCH /api/session/{id} {"archived":true}, DB time_archived) and the mobile app archives fine, but the TUI session list only offers rename/delete/move/pin — no archive, and no keybind command ID to bind one to. A session.archive/session.unarchive command ID + an entry in the /sessions dialog would be enough; the backend is all there.

  5. neriousy commented on Nov 26, 2026

    @neriousy
    Member

    Session archiving ships in Desktop and Web: Cmd+Shift+S (Ctrl+Shift+S on Windows/Linux) toggles archive on the open session, and Archive/Unarchive is in the session menu and command palette. Closing as completed.

  6. simPod commented on Nov 26, 2026

    @simPod
    Author

    And TUI?

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