Skip to content

[Bug] Archived Sessions Do Not Close Tabs and Reopen Recent Session(归档会话未能关闭标签页,还重新打开最近会话) #35058

Closed as not planned

Description

@tp20c5

Description

When archiving a session in the opencode desktop application, the tabs associated with the session are not closed automatically. Instead, the most recently used session within the project is unexpectedly reopened. This behavior disrupts workflow and can lead to confusion.

Expected Behavior:

The current session should close, and the session should be hidden from the session history.

Actual Behavior:

The current session does not close. Instead, the most recent session history from the project automatically reopens.

Plugins

OMO

OpenCode version

1.17.13 (but Desktop 1.17.12)

Steps to reproduce

  1. Ensure all sessions within a project folder are closed (no tabs are open).
  2. Create a new session.
  3. Engage in activity within the session (e.g., typing or executing commands).
  4. Upon completion of the session, click the options menu and select "Archive".

确保项目文件夹中的所有会话都处于关闭状态(没有页签打开)。
创建一个新的会话。
在会话中进行活动(例如,输入或执行命令)。
会话完成后,点击选项菜单并选择“归档”。

Screenshot and/or share link

No response

Operating System

Centos7 for opencode serve

Terminal

win10 msedge for WebUI

Activity

  1. richard-fairthorne commented on Aug 29, 2026

    @richard-fairthorne

    Confirming on the web UI (new tabbed view), with an additional symptom.

    When archiving the current session from the options menu:

    • the archived session's tab does not close
    • the tab content is replaced with another session (apparently the most recently used, as described above)
    • and a new tab opens with an unrelated conversation

    Local dev build based on v1.18.18, with one unrelated cosmetic patch (send-button overlap); session/tab handling is stock.

    Suggestion: decouple archive from navigation entirely

    Archiving writes one bit of metadata (time_archived). Every bug in this family — this issue (wrong session reopened in the tab), #11222 (subagent session displayed after keyboard archive; "fixed" in #12798 by navigating to the root session instead), #7882 (archived session flashes back via SSE race) — comes from treating archive as a navigation command that must then choose a replacement session. Fixes that keep the coupling ("pick a better session to navigate to") leave the races intact.

    Proposed behavior: the session should remain open, but archived.

    • The tab stays; the conversation stays visible in the viewport.
    • The session disappears from the sidebar (it is archived).
    • The tab shows an "Archived" badge with an unarchive affordance.
    • Interacting with the archived session unarchives it — consistent with the behavior already shipped in fix: unarchive session on touch, stop cache eviction on archive #16031 ("unarchive session on touch") — ideally with an explicit "unarchive to continue?" prompt rather than silently undoing the archive.

    The sidebar is list state; the tab is viewport state. Archive should only touch the list.

    Do less!

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

  3. added a commit that references this issue on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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