Skip to content

Don't have a option to restore archived chats #14575

Closed as not planned
Closed as not planned

Description

@FelipeRG117

Description

I archived a chat with too much context of the proyect and i can't restore the chats

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Feb 21, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • 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:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Feb 21, 2026

    @github-actions
    Contributor

    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.

  3. ni3dre commented on Aug 19, 2026

    @ni3dre

    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.
    

    That's all. Now restart OpenCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds:complianceThis means the issue will auto-close after 2 hours.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions