You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Archived Sessions Do Not Close Tabs and Reopen Recent Session(归档会话未能关闭标签页,还重新打开最近会话) #35058
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
Ensure all sessions within a project folder are closed (no tabs are open).
Create a new session.
Engage in activity within the session (e.g., typing or executing commands).
Upon completion of the session, click the options menu and select "Archive".
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.
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.
Activity
richard-fairthorne commentedon Aug 29, 2026
Confirming on the web UI (new tabbed view), with an additional symptom.
When archiving the current session from the options menu:
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 sidebar is list state; the tab is viewport state. Archive should only touch the list.
Do less!
thdxr commentedon Oct 11, 2026
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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
fix(tui): close archived session tabs