Skip to content

OpenCode 1 and 2

OpenCode 2 replaced the plugin API: a plugin written for OpenCode 1 does not run on it. From 0.6.0, Cockpit ships one package for both — each entry carries a v1 half and a v2 half, and whichever OpenCode loads it picks its own. Nothing to choose at install time.

Your OpenCodeCockpit
2.0.15 or newer0.6.0 or newereverything, with the differences below
1.18.x0.6.0 or newereverything — tested on 1.18.0, 1.18.28 and 1.18.32
older than 1.18not supportedupgrade OpenCode — 1.17 loads the panels but never draws full screen

opencode --version says which you have.

Terminal window
opencode plugin add opencode-cockpit@0.6.0

That writes "plugins" in opencode.json, and OpenCode 2 loads both halves from there — the agent tools and the interface. A single bay works the same way:

Terminal window
opencode plugin add @opencode-cockpit/shell@0.6.0

Options go in the entry as an object — the v2 spelling of v1’s [name, options] pair:

~/.config/opencode/opencode.json
{
"plugins": [
{ "package": "opencode-cockpit@0.6.0", "options": { "features": { "status": false } } }
]
}

Nothing to change. OpenCode 2 reads an existing v1 opencode.json — "plugin" and all — and copies a global tui.json into its own cli.json on first start. Cockpit’s own settings (~/.config/opencode-cockpit/config.json, .cockpit.json) and your statusline modules are the same files on both.

What does not carry over is Cockpit before 0.6: it runs on OpenCode 1 only. If OpenCode 2 lists Cockpit under /plugins as failed, change the version in your opencode.json entry to the newest release and restart. Edit that entry rather than running opencode plugin add beside it — add writes a second one and leaves the old.

The two can share one machine and one config. Install OpenCode 1 under another name (it is the opencode-ai package on npm), and point both at the same Cockpit:

Terminal window
mkdir -p ~/.opencode-v1 && cd ~/.opencode-v1 && npm i opencode-ai@1.18.32
# then run it as ~/.opencode-v1/node_modules/.bin/opencode, or alias it

Everything Cockpit does works on both. Where OpenCode 2 gives a plugin less to work with, this is what you will notice:

OpenCode 1OpenCode 2
shell_start permissionasks with your bash permission rulesruns without asking — v2 gives a plugin tool no way to ask
Tool calls in the chatshell_start, review_list…execute, calling them in Code Mode — same tools, same results
Updating/plugins-update, or npx opencode-cockpit@latest updatechange the version in opencode.json; Cockpit’s updater edits OpenCode 1’s files only
Statusline lsp segmentlanguage serversempty — v2 does not expose them to plugins
Coloursthe themethe same theme, except the subtle border grey, one shade lighter

These track what OpenCode 2 exposes; each is revisited as it grows.