Repository navigation
Description
Summary
External TUI plugins declared in ~/.config/opencode/tui.json are not registered or executed in opencode2 v0.0.0-next-15356. Their slash commands do not appear, and the TUI Plugin Manager is empty.
This prevents external plugins from using the public TUI APIs for keymaps, toasts, dialogs, routes, and slots.
Environment
- opencode version:
opencode2 v0.0.0-next-15356 - OS: Linux david-Stealth-15-A13VF 7.0.0-27-generic x86_64
- Terminal:
TERM=xterm-256color,TERM_PROGRAM=ghostty,COLORTERM=truecolor - Shell:
/usr/bin/zsh - Install/channel: next
- Active plugins:
- TUI config:
@ishaksebsib/opencode-tree,@slkiser/opencode-quota,oc-tps@latest, and one local plugin path. - Server config:
@slkiser/opencode-quota@latest,oc-tps@latest,opencode-vibeguard@latest,@ishaksebsib/opencode-tree@latest,context-mode@latest, and one local plugin path. - Local server plugins:
opencode-codex-identity-plugin.ts,orchestator.ts,pushover-notifier.ts, andrtk.ts.
- TUI config:
Reproduction
-
Add a known TUI plugin to
~/.config/opencode/tui.json:{ "plugin": [ "@ishaksebsib/opencode-tree" ] } -
Start a private TUI instance:
opencode2 --standalone
-
Open the command palette and search for the plugin command, for example
/tree. -
Open
Pluginsfrom the command palette.
Expected Behavior
- The TUI should resolve the external package declared in
tui.json. - The plugin's
default.tui(api, options, meta)callback should run. - Its registered commands should appear in the command palette and as slash commands.
- The Plugin Manager should show the configured external plugin and allow it to be activated or deactivated.
Actual Behavior
-
/treedoes not appear. -
The Plugin Manager is empty.
-
No external TUI plugin command is registered.
-
The same behavior occurs with a minimal local TUI module exporting:
export default { id: "opencode-tui-test", tui: async (api) => { api.keymap.registerLayer({ commands: [ { namespace: "palette", name: "test-toast", title: "Show test toast", slashName: "test-toast", run: () => api.ui.toast({ message: "Loaded" }), }, ], }) }, }
-
Server logs show the module being imported, for example:
msg="loading plugin" id=@ishaksebsib/opencode-tree@latest entrypoint=file:///.../@ishaksebsib/opencode-tree/dist/tui.js role=serverHowever, this does not result in the plugin running inside the TUI.
Additional Context
The issue reproduces consistently after fully restarting OpenCode and when using --standalone.
Inspection of the opencode2 binary suggests that the TUI bootstrap currently wires pluginHost.start(...) to a loader that iterates only a static list of built-in TUI plugins. The external plugin runtime remains initialized with an unavailable fallback:
Plugin runtime is not available.
The runtime's fallback returns false for activate, deactivate, and add, while its plugin status list remains empty. This matches the empty Plugin Manager and absent external commands.
The public @opencode-ai/plugin/tui API in this version exposes keymap, ui.toast, ui.dialog, routes, and slots, but external packages do not receive this API because their TUI target is never invoked.
Activity
github-actions commentedon Jul 12, 2026
This issue appears to be a duplicate of #36505, which reports the same root cause: external TUI plugins configured in
tui.jsonare parsed but never loaded because the TUIpluginHostonly callsloadBuiltinPlugins.Please check #36505 and consider closing this one in favor of the existing report.
opencode-agent commentedon Jul 12, 2026
We’re actively working on the new TUI API right now. This plugin-loading path is part of that ongoing work.
opencode-agent commentedon Jul 30, 2026
Addressed by the V2 TUI plugin-runtime work now on
v2, notably commits fe91698, 068c32d, f599f8f, and 0629090. External package/local TUI modules are resolved and activated with the public TUI context, project plugins are discovered, and the Plugin Manager lists and controls registrations. Legacy config fields migrate to the current plugin directives. Closing as resolved on the v2 branch.