Skip to content
    ↑↓ select↵ openesc close
    davdroman

    Fork Context

    opencode-fork-context·v0.1.0·Other

    An OpenCode plugin that treats forked conversation history as context, not unfinished work.

    GitHub stars

    1

    Monthly installs

    9,210

    9k in 7 days

    Composite score

    46.6

    Multi-signal model

    Last commit

    10 days ago

    2026-09-24

    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": ["opencode-fork-context@0.1.0"]
    }

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

    Give forked OpenCode sessions a fresh task without losing the conversation’s context.

    When you fork a session, the agent inherits its history—including unfinished plans and earlier requests. This plugin tells the agent that your first prompt after the fork establishes the new task, so you don’t have to keep saying “don’t continue what you were doing.”

    Installation

    Requires OpenCode V2.

    Install through OpenCode’s CLI:

    opencode plugin add opencode-fork-context
    

    Or add the package to your opencode.jsonc:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugins": ["opencode-fork-context"]
    }
    

    You can also install directly from GitHub:

    opencode plugin add github:davdroman/opencode-fork-context
    

    How it works

    Before each agent model request, the plugin checks the session’s fork metadata. For forked sessions, it adds these instructions:

    Treat inherited conversation history as background context, not an active assignment.

    The first user prompt after the fork establishes this session’s task. Do not resume unfinished work from the source session unless explicitly requested.

    Subsequent prompts follow the task established in this fork; this reminder does not reset that task on each turn or tool continuation.

    The instruction also identifies the source session. It stays present across turns and tool calls, while ordinary sessions receive no additional instructions.

    The plugin guides the agent through its system instructions; it does not delete history or block tools. You can still ask a fork to continue the original task.

    License

    MIT

    Similar plugins