A BB plugin that runs threads through an installed OpenCode v2 server. OpenCode owns model credentials and its own tool execution; BB provides the thread, timeline, and UI.
- BB 0.48.1 or newer
- OpenCode v2.3.0 or newer (
opencode2on the host'sPATH) - A model provider connected in OpenCode (
opencode2 auth login)
bb plugin install git:https://github.com/lqmanh/bb-plugin-opencode2.git- Threads: new and resumed sessions, fork at a checkpoint, rewind/edit with
files restored, steering, stop, discard, rename, and
/compact. - Models and agents: workspace model discovery, reasoning variants, primary
agents, and BB's
/planmode. - Tools and permissions: accept-edits, auto, and full permission modes;
native questions and supported forms; BB dynamic tools; OpenCode MCP Code
Mode;
bbonPATHin shells. - Skills: OpenCode's skills in BB's
/menu, plus opt-in native BB skills throughopencode-bb-skills. - References: OpenCode references in the composer's
@menu. - Timeline and usage: reads, searches, commands, diffs, background tasks, session usage, and provider usage from opencode-usage.
- Recovery: reconnects settle turns from OpenCode's state; external archive, deletion, or moves produce a clear error.
Open Settings → OpenCode v2 in BB.
- Disable provider subagents makes agents delegate through BB. Off by default.
- Register BB skills natively in OpenCode adds a
pluginsentry owned by this plugin for the pinnedopencode-bb-skillsplugin, which OpenCode installs from GitHub, and writes a per-workspace catalog. Off by default. Other OpenCode clients opening the same workspace see the skills; the host and OpenCode must be co-located. - Status shows each host's OpenCode version and updates, and the status of the BB skills and usage plugins.
The plugin keeps a bb_opencode2_* deny rule in the global OpenCode config so
BB tools stay out of OpenCode's own sessions. OpenCode applies config changes
when idle.
See skills/opencode2-provider/SKILL.md
for settings keys and troubleshooting.
npm install
bb plugin types
npm run checknpm run check formats, typechecks, builds, and runs the test suites. To try a
local checkout, run bb plugin install ..
See docs/architecture.md and docs/opencode-v2.md for design and OpenCode behavior.