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
Don't have a option to restore archived chats #14575
The bug report template requires reproduction context, but Steps to reproduce, OpenCode version, Operating System, and Terminal are all left empty/unanswered. Please fill these in so maintainers can investigate.
This appears to be a missing feature (no UI option to unarchive sessions) rather than a bug — consider using the Feature Request template with a [FEATURE]: title prefix instead.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
How to Restore Archived Chats in OpenCode
If you accidentally archived a chat and can't find it anywhere — don't worry, your data is not deleted. OpenCode stores all sessions in a SQLite database, and archiving simply sets a timestamp in the time_archived column. The chat data is still there, just hidden from the UI.
The Problem
OpenCode currently has no built-in way to list or restore archived sessions. So when you hit that archive button by mistake, there's no obvious way to get it back. Now enter the following prompt on any chat page:
The Fix
Here's a prompt you can paste directly into OpenCode to restore all your archived chats:
My opencode chats disappeared after I accidentally archived them. Please restore them from the SQLite database.
1. Connect to the database at ~/.local/share/opencode/opencode.db using Python's sqlite3 module
2. List all archived sessions by running: SELECT id, title, datetime(time_created/1000, 'unixepoch', 'localtime') as created, datetime(time_archived/1000, 'unixepoch', 'localtime') as archived FROM session WHERE time_archived IS NOT NULL ORDER BY time_archived DESC;
3. Show me the list of archived sessions with their titles and dates
4. Restore all of them by setting time_archived = NULL
5. Verify the restoration was successful
Important: Do not delete anything. Only unarchive by setting time_archived to NULL.
Activity
github-actions commentedon Feb 21, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:title prefix instead.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Feb 21, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.
ni3dre commentedon Aug 19, 2026
How to Restore Archived Chats in OpenCode
If you accidentally archived a chat and can't find it anywhere — don't worry, your data is not deleted. OpenCode stores all sessions in a SQLite database, and archiving simply sets a timestamp in the time_archived column. The chat data is still there, just hidden from the UI.
The Problem
OpenCode currently has no built-in way to list or restore archived sessions. So when you hit that archive button by mistake, there's no obvious way to get it back. Now enter the following prompt on any chat page:
That's all. Now restart OpenCode.