You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plugin silently fails to load when it exports a non-function value #31575
A plugin that exports anything besides the plugin function — a constant, an array — silently fails to load. No error, the hooks just never fire.
It's getLegacyPlugins in packages/opencode/src/plugin/index.ts: it loops over every export and throws on the first non-function one, and that error gets swallowed by the Effect.catch right below it (the one with the // TODO: make proper events for this comment).
Using the export default { id, server } format works around it, since that path skips getLegacyPlugins entirely — but the docs only show the named-export style, so it's easy to hit. A continue instead of the throw would fix it.
Plugins
No response
OpenCode version
1.16.2
Steps to reproduce
Create a plugin that exports a constant next to the function:
Activity
github-actions commentedon Aug 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.