anomalyco / anomalyco/opencode
Running V1 and V2 side-by-side: shared state/config conflicts, V1 TUI plugins silently not loaded
@nexxeln is already working on this.
Since Sep 3, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
Running OpenCode V1 and V2 side by side (as the docs propose) does not work reliably and creates cross-version state conflicts. In our setup a V1 TUI session that starts while a V2 serve --service daemon is running silently fails to load plugins (nothing is registered, keybinds do nothing) and both versions interleave into the same shared state/logs.
Environment
- OS: Kubuntu 26.04 (Linux)
~/.opencode/bin/opencode→ V11.18.27~/.opencode/bin/opencode2→ V2opencode2 v0.0.0-next-17403- A long-lived
opencode2 serve --servicedaemon is started at login (PID started earlier). - A separate V1 TUI (
opencode) is launched from a terminal afterwards.
What happened
-
Both binaries are installed into the same
~/.opencode/bin/and share the same state/config/cache/log locations:- config:
~/.config/opencode/opencode.jsonc(same file read by both V1 and V2) - plugin cache:
~/.cache/opencode/packages/ - shared data/log:
~/.local/share/opencode/log/opencode.log(appended to concurrently by V1 and V2 processes, now 161 MB, entries interleaved withrole=server/role=cli/role=tuiand mixedrun=tokens)
- config:
-
A TUI plugin (
opencode-voice, registered as a V1TuiPluginexporting{ tui }) was added to the shared config:"plugin": [["opencode-voice", { "provider": "groq" }]]The package is fetched into the plugin cache at startup, but the running V1 TUI never logs any plugin load (
loading pluginlines are absent for that session'srun=), and the plugin's command/keybind (ctrl+space) does nothing — no toast, no registration. -
Only plugins from local files (
~/.config/opencode/plugins/sound-notify.ts) and packages loaded by the V2 service daemon appear in the logs. The V1 TUI process appears to not load npm TUI plugins when the V2 daemon already owns the shared instance/state.
Expected
Following the documented "use both V1 and V2 at the same time" guidance should either:
- isolate state/plugin/config per major version, or
- clearly warn/refuse when a V2 service is already running, instead of silently misbehaving.
Notes
- It is hard to tell from logs which process/version owns a given line; both write to the single
opencode.log. - Freshly installed V1 TUI plugins behave as if never loaded ("nothing at all" when pressing their keybind).
Happy to provide more logs/configs on request. This may just be a missing isolation concern, but it makes side-by-side installs unreliable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.