Skip to content

OpenCode silently enters a broken UI state when a plugin fails to initialize #24847

@BorisDay

Description

@BorisDay

Description

Expected behavior:

  • Option A: OpenCode should print a clear error on startup (e.g. "Plugin X not found — skipping" or "Plugin load failed: ...")
  • Option B: OpenCode should gracefully disable the broken plugin and continue with a degraded but functional UI
  • Option C: At minimum, the TUI should remain usable with a visible error indicator

Actual behavior:
Silent UI breakage. No error output anywhere. The user has no indication of what went wrong.

Root cause (from debugging):
The opencode.json plugin array referenced packages not present in ~/.config/opencode/node_modules/. OpenCode attempted to load them, failed silently, and the initialization of the input handler and agent status display never completed — leaving the TUI in a zombie state.

Workaround:
Remove uninstalled plugin entries from "plugin" array, or run npm install <plugin> in the config directory.
Why this matters for OpenCode specifically:
The TUI is the primary user interface. A silent failure that disables text input with zero diagnostics is critical — users naturally look for errors in logs or console output and find nothing.

Plugins

https://github.com/affaan-m/everything-claude-code

OpenCode version

1.14.28

Steps to reproduce

  1. Add a plugin entry to opencode.json that is NOT installed in node_modules/.
    Example: "plugin": ["opencode-antigravity-auth@1.3.0"]
  2. Run opencode from terminal.
  3. Observation: The TUI loads (no "Loading plugins..." hang), but:
    • The status bar shows no active agent name
    • Typing text and pressing Enter does nothing
    • No error message is printed to stdout/stderr

Screenshot and/or share link

No response

Operating System

WSL2 (Debian) on Windows 11

Terminal

TUI

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions