Description
When a configured server plugin (the plugin key in config) fails to load, opencode drops it with no visible diagnostic. The failure only surfaces as a session Error event (easy to miss), and the "no entrypoint" case is swallowed entirely by a no-op missing reporter. The result: a plugin that is present and correctly resolved but throws at import() time looks exactly like a plugin that was ignored.
This makes plugin problems very hard to diagnose. In my case a file:// plugin appeared to be "ignored" while npm plugins worked, which led me to suspect the file:// resolution logic. It was actually fine - the plugin's module threw ENOENT during evaluation (a top-level readFileSync of an asset that was missing from the package). Nothing was printed to stderr, so there was no signal pointing at the real cause.
Plugins
No response
OpenCode version
1.17.12
Steps to reproduce
- Configure a file:// (or npm) server plugin whose module throws during evaluation — e.g. a top-level readFileSync/import of a file that doesn't exist at runtime.
- Start opencode.
- Observe: the plugin's hooks never run, and there is no error on stderr indicating why.
Screenshot and/or share link
No response
Operating System
macOS 26.5.1
Terminal
No response
Description
When a configured server plugin (the plugin key in config) fails to load, opencode drops it with no visible diagnostic. The failure only surfaces as a session Error event (easy to miss), and the "no entrypoint" case is swallowed entirely by a no-op missing reporter. The result: a plugin that is present and correctly resolved but throws at import() time looks exactly like a plugin that was ignored.
This makes plugin problems very hard to diagnose. In my case a file:// plugin appeared to be "ignored" while npm plugins worked, which led me to suspect the file:// resolution logic. It was actually fine - the plugin's module threw ENOENT during evaluation (a top-level readFileSync of an asset that was missing from the package). Nothing was printed to stderr, so there was no signal pointing at the real cause.
Plugins
No response
OpenCode version
1.17.12
Steps to reproduce
Screenshot and/or share link
No response
Operating System
macOS 26.5.1
Terminal
No response