opencode-forking-agents-plugin
v0.1.6
Published
OpenCode plugin: fork_* subagents with parent session transcript prepended to task prompts
Downloads
577
Maintainers
Readme
opencode-forking-agents-plugin
OpenCode plugin that adds fork_<agent> subagents. When you run the task tool with subagent_type set to fork_general, fork_explore, or fork_<name> for any configured mode: subagent agent, the plugin rewrites the call to the base agent and prepends the parent session transcript to the task prompt (wrapped in <parent_session_transcript>).
Install
In opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-forking-agents-plugin"]
}OpenCode installs npm plugins automatically (see Plugins).
Local development
Clone this repo and point plugin at the entry file, or use bun link / npm link.
Release to npm
GitHub Actions publishes to npm when a GitHub release is published.
The workflow uses npm trusted publishing from GitHub Actions, so no NPM_TOKEN repository secret is required.
The GitHub release tag must match the current package.json version as either X.Y.Z or vX.Y.Z.
Versions with a prerelease suffix such as 0.2.0-beta.1 publish to the next dist-tag. Versions without a prerelease suffix publish to latest.
Disable
Set OPENCODE_DISABLE_FORK_SUBAGENT_PLUGIN=1.
Requirements
OpenCode must pass listSessionMessages on the plugin input (session store, no HTTP). This matches @opencode-ai/plugin 1.5.0+ in the main OpenCode repo; the published npm plugin package types may lag—runtime behavior follows OpenCode.
License
MIT
