OpenCode 2 for BB adds the opencode2 ACP provider and makes its terminal-
native behavior work across BB desktop, remote, and mobile clients.
- Adds OpenCode 2 as a provider without replacing BB's regular OpenCode provider.
- Discovers the models reported by the installed
opencode2CLI. - Supports BB permission modes, reasoning levels, service tiers, session resume/fork behavior, and manual compaction.
- Keeps BB's
/skill-namecomposer UI while loading recognized skills through OpenCode 2's nativeskilltool. OpenCode 2's terminal resolves@nameclient-side; ACP does not carry that TUI metadata, so the plugin performs the equivalent native tool routing explicitly. - Shows one shared OpenCode Go allowance for regular OpenCode and OpenCode 2.
- Shows Cursor subscription usage in the same tracker, with its own visibility toggle and full desktop, remote, and mobile support.
- Uses the rolling 5-hour window for the compact sidebar reading and keeps weekly/monthly limits in expanded details.
- Adds the shared OpenCode Go card to Settings → Usage limits.
- Refreshes manually, every five minutes, and when a stale window becomes active again. A single refresh includes Cursor and OpenCode Go.
- Mounts the same usage UI in BB's remote/mobile sidebar drawer.
The plugin supports every skill in BB's configured skill catalog. It does not
redistribute third-party skill collections; install those separately and they
will appear in BB's / menu for OpenCode 2.
- BB 0.39.1 or newer
- OpenCode 2 installed as
opencode2on the BB host - An authenticated OpenCode 2 session
opencode2 auth loginbb plugin install git:https://github.com/Flame119052/bb-plugin-opencode2.git@^1.0.0Open Settings → Plugins → OpenCode 2 to choose which sidebar readings are visible. To monitor the shared OpenCode Go allowance, enter the OpenCode Go API key in the secret setting there. BB stores the value as a plugin secret and it is never sent to the browser.
Use BB's normal skill menu or type a leading skill invocation:
/wait-what Explain where we are.
For a skill currently configured in BB, the bridge asks OpenCode 2 to load that
exact ID with its native skill tool before continuing. Unknown slash commands
and provider commands such as /compact pass through unchanged.
OpenCode and OpenCode 2 share one OpenCode Go subscription. The plugin fetches that allowance once and renders it once rather than double-counting it.
- Provider execution stays on the enrolled BB host.
- The OpenCode Go API key is stored as a BB secret setting.
- The key is used only by the BB server when requesting the OpenCode Go usage endpoint; it is never included in frontend RPC responses.
- The browser stores only the last successful usage snapshot so temporary failures do not erase the last known limits.
- The plugin is full-trust code because it launches the local
opencode2CLI.
npm install
npm run checkThe release check synchronizes BB SDK types, type-checks the source, runs the usage/mobile/skill-routing tests, and builds the server, app, and host bundles.
The usage tracker is based on Mateo Cerquetella's MIT-licensed Usage Tracker.
The ACP bridge is adapted from BB's MIT-licensed provider-acp plugin. See
THIRD_PARTY_NOTICES.md.