Skip to content

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

Closed as not planned

Description

@pathexplorer

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.

Activity

  1. github-actions commented on Sep 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed write-up!

    The part that actually breaks here is the V1 TUI (1.18.27) not loading the npm TUI plugin opencode-voice. OpenCode v1 only gets fixes for critical bugs (data loss, security problems, crashes with no workaround), so this is unlikely to be fixed in v1.

    A few notes that may help:

    • Sharing config locations between versions is intentional. The current migration guide says V1 and V2 use the same configuration locations, and that they are no longer installed side by side by default. Running both at once, with a V2 service daemon in the background and a V1 TUI in front, isn't a supported setup.
    • Workarounds:
      • Stop the opencode2 serve --service daemon while you use the V1 TUI.
      • Or load the plugin from a local file under ~/.config/opencode/plugins/, which you said does load.
    • We'd encourage moving to V2 (a 2.x release rather than a 0.0.0-next preview build). Note that V1 plugins don't run in V2: plugins need to be ported to the new plugin API (see the "Migrate from V1" docs).

    If you think this is critical, or you see the same problem with plugins on a V2 2.x release, please reply here with the details and we'll take another look.

  3. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Closing this as not planned. The problem is in the V1 TUI (1.18.27), which isn't loading the npm TUI plugin, and v1 only gets fixes for critical bugs. We haven't heard back that it's critical or that it also happens on a V2 2.x release.

    In the meantime, you can stop the opencode2 serve --service daemon while using the V1 TUI, or load the plugin from a local file under ~/.config/opencode/plugins/. Better still, move to a V2 2.x release (V1 plugins need porting to the V2 plugin API).

    If you see the same plugin problem on a V2 2.x release, please open a new issue with the version and steps. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions