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.9.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.9.0

Then restart OpenCode’s background service, which loads plugins only when it starts — after this install and after every update:

Terminal window
opencode service restart

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.9.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, run opencode service restart, and restart OpenCode. 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, then opencode service restart; Cockpit’s updater edits OpenCode 1’s files only
The agent sideloads with each windowruns in a background service that keeps the Cockpit it started with until opencode service restart — a window toasts when it is older, and doctor’s Service check says so
Status’s diagnosticsMCP servers and language serversMCP servers only — v2 does not expose language servers to plugins
OpenCode’s own sidebar blocksContext, MCP, LSP, Todo, Files, Footer — off in tui.json under plugin_enabledContext, MCP, Footer — off in cli.json as -opencode.sidebar.<id> in plugins (ids)
Coloursthe themethe same theme, except the subtle border grey, one shade lighter

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