🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

opencode-handoff

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-handoff

Create focused handoff prompts for continuing work in new OpenCode sessions

latest
Source
npmnpm
Version
0.5.0
Version published
Maintainers
1
Created
Source

opencode-handoff

Create focused handoff prompts for continuing work in new sessions.

Inspired by Amp's handoff command - see their post and manual about it.

Features

  • /handoff <goal> command that analyzes the conversation and generates a continuation prompt
  • Guides the AI to include relevant @file references so the next session starts with context loaded
  • Opens a new session with the prompt as an editable draft
  • read_session tool for retrieving full conversation transcripts from previous sessions when the handoff summary isn't sufficient

Requirements

Installation

Add to your OpenCode config (~/.config/opencode/opencode.json):

{
  "plugin": ["opencode-handoff"]
}

Restart OpenCode and you're ready to go.

Optionally, pin to a specific version for stability:

{
  "plugin": ["opencode-handoff@0.5.0"]
}

OpenCode fetches unpinned plugins from npm on each startup; pinned versions are cached and require a manual version bump to update.

Usage

  • Have a conversation in OpenCode with some context
  • When ready to continue in a fresh session, type /handoff <your goal>
  • A new session opens with the handoff prompt as an editable draft
  • Review and edit the draft if needed, then send

Example:

/handoff implement the user authentication feature we discussed

The AI analyzes the conversation, extracts key decisions and relevant files, generates a focused prompt, and creates a new session with that prompt ready to edit.

Reading Previous Session Transcripts

When you use /handoff, the generated prompt includes a session reference line:

Continuing work from session sess_01jxyz123. When you lack specific information you can use read_session to get it.

This gives the AI in the new session access to the read_session tool, which can fetch the full conversation transcript from the source session. If the handoff summary doesn't include something you need, just ask - the AI can look it up.

Example:

You: What were the specific error messages we saw earlier?

The AI will use read_session to retrieve details from the previous session that weren't included in the handoff summary.

Contributing

Contributions are welcome! Here's how to set up for development:

git clone https://github.com/joshuadavidthomas/opencode-handoff
cd opencode-handoff
bun install

Then symlink the plugin to your OpenCode config:

mkdir -p ~/.config/opencode/plugin
ln -sf "$(pwd)/src/plugin.ts" ~/.config/opencode/plugin/handoff.ts

License

opencode-handoff is licensed under the MIT license. See the LICENSE file for more information.

opencode-handoff is not built by, or affiliated with, the OpenCode team.

OpenCode is ©2025 Anomaly.

Keywords

opencode

FAQs

Package last updated on 26 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts