restore-opencode-archived-session

Restore archived OpenCode sessions by setting time_archived to NULL in opencode.db.

Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Pans0020/opencode-skills --skill restore-opencode-archived-session
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restore-opencode-archived-session
Source: https://github.com/Pans0020/opencode-skills/tree/main/restore-opencode-archived-session
Command: npx skills add https://github.com/Pans0020/opencode-skills --skill restore-opencode-archived-session

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Restores a hidden OpenCode session so the conversation reappears in the current session list when it was archived (hidden) via its database time_archived flag.

Core Features & Use Cases

  • Targets the archived-session flag: Restores visibility by setting time_archived to NULL for a single selected session ID.
  • Finds the correct session reliably: Helps locate the exact archived row using clues like slug, directory, timestamps, and message text, including handling mojibake/garbled Chinese.
  • Prevents risky edits: Avoids deleting or recreating sessions and restricts changes to the selected time_archived field only.
  • Use Case: You remember an earlier OpenCode thread about a project, but it no longer shows in the normal list because it was archived; restore it so you can continue from that context.

Quick Start

Ask to restore the archived session with id ses_xxx in the OpenCode SQLite database by setting only its time_archived field to NULL, then verify the session becomes visible in the UI.

Frequently Asked Questions about restore-opencode-archived-session

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restore an archived OpenCode session that disappeared from the list?

To restore an archived OpenCode session, you need to set the `time_archived` field to NULL for the specific session ID in the opencode.db SQLite database, which unhides the row and makes the conversation reappear in the UI.

Why does my OpenCode chat thread show as archived in the SQLite database but not in the UI?

An OpenCode thread is hidden from the UI when its `time_archived` flag is set in the opencode.db database. Restoring visibility requires updating this specific field back to NULL without deleting the row.

How can I find the exact session ID of a hidden OpenCode thread to restore it?

You can locate the correct archived session row in the SQLite database by searching for clues like the session slug, directory, timestamps, and message text, even if the text contains mojibake or garbled characters.

Does restoring an archived OpenCode session delete or alter other chat data in the database?

Restoring an archived OpenCode session restricts changes to only the selected `time_archived` field, preventing risky edits, row deletion, or recreation of sessions while keeping all other session data intact.

What is the best way to unhide a specific archived conversation in opencode.db without breaking other sessions?

The safest way to unhide an archived conversation is to target only the specific session ID and update its `time_archived` value to NULL, ensuring no other session rows or database data are modified or deleted.