anomalyco / anomalyco/opencode

Running V1 and V2 side-by-side: shared state/config conflicts, V1 TUI plugins silently not loaded

Open
#47,018 1 comment 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Sep 3, 2026.

2.0
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 → V1 1.18.27
  • ~/.opencode/bin/opencode2 → V2 opencode2 v0.0.0-next-17403
  • A long-lived opencode2 serve --service daemon is started at login (PID started earlier).
  • A separate V1 TUI (opencode) is launched from a terminal afterwards.

What happened

  1. 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 with role=server / role=cli / role=tui and mixed run= tokens)
  2. A TUI plugin (opencode-voice, registered as a V1 TuiPlugin exporting { 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 plugin lines are absent for that session's run=), and the plugin's command/keybind (ctrl+space) does nothing — no toast, no registration.

  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.