Skip to content
    ↑↓ select↵ openesc close
    English中文
    wafonro2

    Resurrect

    v0.1.1Other
    @wafonro2/opencode-resurrect

    OpenCode plugin that saves and restores the latest session per project

    GitHub stars

    0

    Monthly installs

    15

    1 in 7 days

    Composite scoreSCORE

    20.5

    Multi-signal model

    Last commit

    4 months ago

    2026-04-11

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@wafonro2/opencode-resurrect@0.1.1"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    OpenCode plugin that saves the active session ID in the project folder and restores that session when OpenCode starts.

    What it does

    • Listens for session.created, session.updated, and session.deleted events.
    • Writes <project root>/.opencode-session-<YYYYMMDD-HHMMSSmmm>.txt containing only the session ID.
    • Avoids redundant writes by caching the last value written for each file.
    • On startup, restores the most recent saved session in that project.

    Install from npm (recommended)

    Add the published package to your OpenCode config.

    Project config (opencode.json in your repo root):

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@wafonro2/opencode-resurrect"]
    }
    

    Global config (~/.config/opencode/opencode.json):

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@wafonro2/opencode-resurrect"]
    }
    

    Then restart opencode. OpenCode installs npm plugins automatically at startup.

    Verify it works

    1. Start opencode in a project.
    2. Create or update a session.
    3. Confirm a file like .opencode-session-20260411-021857123.txt appears in the project root.
    4. Restart opencode in the same project and confirm the session restores automatically.

    Local development install (optional)

    For local file-based plugin loading during development:

    • ./install.sh --global installs to ~/.config/opencode/plugins/.
    • ./install.sh --project /path/to/project installs to /path/to/project/.opencode/plugins/.