Repository navigation
Description
Description
Summary
Local TUI/CLI plugins do not load at all on opencode2 beta-18721 (Windows). Configured exactly per official docs (cli.json plugins with a file:// directory entry + <global-config>/plugins/<name>/index.tsx layout), the sidebar shows nothing; opencode.log has no plugin load/failure records at any log level; plugin-meta.json does not exist. Downgrading to the previous build beta-18707 restores loading.
Environment
- opencode version: 0.0.0-beta-18721 (npm global
@opencode-ai/cli, dist-tagbeta) - OS: Windows_NT 10.0.26200 (win32 x64)
- Terminal: Windows Terminal (terminal env vars unavailable in service context)
- Shell: powershell 7 / cmd
- Install/channel: npm global install, beta channel
- Active plugins:
~/.config/opencode/plugins/tui/opencode-tui-usage.tsx+ sibling directory (installed 2026-08-29; worked fine on earlier builds)
Reproduction
- Install a plugin in the official layout:
~/.config/opencode/plugins/opencode-tui-usage/index.tsx(Plugin.define+context.ui.slot({append:"sidebar.content"}); includesmodel/quota/shared/viewsub-folders with a complete relative import chain). - Configure global
~/.config/opencode/cli.json:"plugins": ["file:///C:/Users/<user>/.config/opencode/plugins/opencode-tui-usage"](officialfile://directory form from the docs). - Restart opencode2.
- Sidebar renders nothing.
~/.local/share/opencode/log/opencode.logrole=clisection contains onlycli starting/event stream/update check— no plugin load or error entries;plugin-meta.jsonis absent.
Expected Behavior
Local TUI plugin loads per the official configuration shape and renders in the sidebar.
Actual Behavior
Silently not loaded, with zero diagnostics at any log level (matches #41574).
Additional Context
Variants tried, all failed (config reverted afterwards):
cli.jsonplugins:file://directory,file://explicit.tsxfile, relative path./plugins/tui/opencode-tui-usage.tsx- Project-level
.opencode/tui.jsonpluginarray - Zero-dependency probe plugin (no business logic; only
Plugin.define+ slot rendering "PROBE-LOADED") — also not loaded, ruling out plugin runtime errors - Both the directory layout (
plugins/<name>/index.tsx) and single-file layout
Version timeline:
- 2026-08-29: plugin installed; earlier beta build loads it fine
- 2026-08-31 01:12 build beta-18707: works (verified during the day, sidebar shows the plugin)
- 2026-08-31 07:28 build beta-18721 (auto-upgraded 19:32 local): plugin disappears
- Downgrading to beta-18707 restores the sidebar plugin
Likely related issues:
- tui: plugins no longer load after cli.json config migration (nightly next channel) #42051 (OPEN):
tui: plugins no longer load after cli.json config migration— symptoms match exactly - tui: a plugin that fails to load or initialize produces no diagnostic at any log level #41574 (OPEN): plugin load/init failures produce no diagnostics at any log level
- [BUG] 「V2 (next-17444)」local .ts plugins fail to load on Windows #42763 / tui: local plugins fail to load on Windows #43644 (OPEN/dup): Windows local plugin path import fails in compiled binary (
file://works around it — this report already usedfile://and still fails, indicating a config-ignored layer above the import issue) - plugins: transient first import failure permanently poisons plugin resolution until restart (Windows) #46095 (OPEN): transient first import failure permanently poisons plugin resolution until restart (Windows)
Workaround: none; only recovery is downgrading: npm install -g @opencode-ai/[email protected]
Plugins
No response
OpenCode version
beta-18721
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Activity
github-actions commentedon Aug 31, 2026
This issue might be a duplicate of existing issues. Please check:
tui: plugins no longer load after cli.json config migration— symptoms appear to match exactly (silent failure to load TUI plugins after cli.json migration, no diagnostics in logs). You already noted this in your report.If this is indeed the same root cause recurring on the beta channel / Windows, it may be best to continue tracking in #42051 rather than opening a new issue. If you've confirmed behavior specific to Windows or beta-18721 that differs from the existing report, please add a comment there with the additional details.
Just-Silver commentedon Aug 31, 2026
Thanks for the triage. This is the same symptom family as #42051, but the report deliberately adds evidence the existing issue doesn't cover:
betachannel, build beta-187210.0.0-beta-18707loads plugins fine;0.0.0-beta-18721silently ignores every supported configuration shape (cli.json plugins, tui.json entries, officialplugins/<name>/index.tsxlayout). That gives a concrete regression range for bisecting the change that broke it.Happy to fold these details into #42051 if maintainers prefer single-issue tracking; keeping this open to represent the beta/Windows angle meanwhile.
MilkyWay008 commentedon Aug 31, 2026
The beta-18707 to beta-18721 regression range is a gift, that makes it bisectable. Since even a zero-dependency probe plugin doesn't load and plugin-meta.json never appears, the loader is dropping the config before it gets to imports, so it's probably the cli.json migration path rather than the Windows import issue (#42763). Worth checking whether beta-18721 rewrote your cli.json in place (compare against a backup or re-add the plugins entry), and confirming the duplicate #42051 tracks the same config-migration root cause, then fold your Windows evidence in there. Until it's fixed, staying on beta-18707 is the sane move.
Just-Silver commentedon Sep 1, 2026
Update (2026-09-01): full root-cause breakdown after debugging on the current beta channel. Windows 11,
0.0.0-beta-18743vianpm i -g @opencode-ai/cli@beta. Same silent failure as beta-18721 — sidebar never renders. But with the service log (~/.local/share/opencode/log/opencode.log) and a probe plugin, the failure is now layered and fully evidenced:1. Discovery only accepts root-level direct
.ts/.jsfilesThe original plugin layout
~/.config/opencode/plugins/tui/opencode-tui-usage.tsx(nested dir +.tsx+ non-index name) is silently skipped. Package-directory layouts (plugins/<name>/index.tsx,plugins/<name>/tui.tsx) are also NOT discovered. Only a root-level directprobe.tswas picked up. Docs confirm the narrow shape ("direct .ts and .js files"). On beta-18707 the same.tsxlayout loaded fine — so discovery regressed to strict filtering.2. Server-side plugin deps now resolve from disk
node_modulesAfter the entry is found,
import "@opencode-ai/plugin"resolves against~/.config/opencode/node_modules/— which the official install never creates. First hit was a stale V1@opencode-ai/[email protected](installed months ago for V1 dev) failing withCannot find package '@opentui/keymap'; after removing it,Cannot find package '@opencode-ai/plugin'. Manually installing the V2 deps (@opencode-ai/[email protected],@opencode-ai/theme,@opentui/core,@opentui/solid,solid-js) makes the server import succeed.3. The loader then fails on
?mtime=file URLs — this is the upstream bugServer log:
The loader dynamically imports plugin entries as
file://...?mtime=<ts>and the module resolver rejects query-string file URLs. This is the same class as #42481 (ERR_UNKNOWN_BUILTIN_MODULE: file:///...js?mtime=...) — and #42485 (SEA-safe import) is still unmerged.Pipeline note: dev was verified working on dab2637 (Aug 12, per #42051) yet both Aug-31 beta builds (18721, 18743) fail identically. There are no plugin-related commits on dev between the two builds (only a v1 backport), and the binary diff between beta-18707 and beta-18721 shows a full repack (module graph reorganized) with identical plugin-discovery string regions. The beta pipeline is not in sync with dev — the fix verified on dev has not reached the release channel.
Requests: (1) merge #42485 (or equivalent fix) and ship it in beta; (2) confirm whether the release install is expected to provide the V2 plugin runtime deps on disk; (3) verify on Windows specifically — discovery narrowing + disk resolution + mtime URLs all interact there. Staying on beta-18707 until then.
Just-Silver commentedon Sep 21, 2026
Closing as resolved from my side.
The silent-load failure is no longer reproducible. On
0.0.0-beta-19425the plugin loads normally after adapting to the current plugin layout: a directory plugin directly under.opencode/plugins/with atui.tsxentry (the older nestedplugins/tui/<name>.tsxshape is indeed no longer discovered, and a bare.tsxfile is not either — only.ts/.jsfiles and direct subdirectories are). The runtime module was also renamed@opencode-ai/plugin/tui→@opencode/plugin/tuiwith no compatibility remap.So the practical resolution: the discovery/layout narrowing plus the package rename accounted for what I hit; matching the new layout made everything work with no manual
node_modulesinstall and no?mtime=failures.Thanks for the triage and the pointers to #42051 / #42485.