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
When clicking the "Archive" button in OpenCode Desktop for Windows, all conversation history from the current session that hasn't been persisted to the database is permanently lost. This is a critical data loss bug.
Impact
Severity: Critical (data loss)
Affected Users: All Windows Desktop users
Data Lost: 4+ hours of conversation history (in my case)
Steps to Reproduce
Open OpenCode Desktop on Windows 10/11
Start a new conversation and chat for several hours
Do NOT manually save/export the conversation
Click the "Archive" button in the session list
The current session disappears from the list
All messages from ~17:57 to ~21:40 are permanently lost
Expected Behavior
Archiving a session should save all pending messages to the database first
Archived sessions should be recoverable via an "Unarchive" function
Users should be warned if there are unsaved messages before archiving
Actual Behavior
Session data in memory is NOT persisted before archiving
No confirmation dialog warns about unsaved data
No way to recover the archived session
Database shows no record of the lost conversation
Technical Evidence
Database Query Results
Queried ~/.local/share/opencode/opencode.db:
SELECT id, slug, title, time_updated FROM session ORDER BY time_updated DESCLIMIT10;
Session ID
Title
Last Updated (Local Time)
ses_2adb34a58ffelj8oJzw2806lGG
GitHub 项目本地部署与启动流程
2026-04-03 14:49:12
ses_2ac431abcffefonOJboRolkgoG
恢复归档会话记录
2026-04-03 14:37:59
ses_2ad40870affew5ZoDh95e1eu2N
T2: 禁用危险 Sandbox 参数
2026-04-03 13:44:49
All sessions were last updated BEFORE 17:00, but I was actively chatting until 21:40.
Description
When clicking the "Archive" button in OpenCode Desktop for Windows, all conversation history from the current session that hasn't been persisted to the database is permanently lost. This is a critical data loss bug.
Impact
Steps to Reproduce
Expected Behavior
Actual Behavior
Technical Evidence
Database Query Results
Queried
~/.local/share/opencode/opencode.db:All sessions were last updated BEFORE 17:00, but I was actively chatting until 21:40.
File System Analysis
Checked
~/.local/share/opencode/storage/session_diff/:[])Timeline
Root Cause Analysis
Based on source code review and database analysis:
Suggested Fixes
Immediate (Critical)
Long-term
Workarounds (for users)
Until this is fixed, users should:
/exportcommand (Ctrl+X X)opencodecommand) - community PR feat: add session archive/unarchive support to TUI #13961 adds archive/unarchive supportRelated Issues
Related PRs
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
OpenCode Desktop App