anomalyco / anomalyco/opencode
Server plugins with no discoverable entrypoint are dropped silently (report.missing is a no-op)
@neriousy is already working on this.
Since Sep 1, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The server-plugin loader silently ignores installed npm plugins that don't expose a plugin entrypoint: the report.missing handler it passes to loadExternal for kind: "server" is an empty no-op (missing(){}), while error does log install/load/compatibility failures. So a package listed in plugin that installs fine but resolves zero server targets disappears without any error or warning anywhere — the session just boots without the plugin.
Concrete example: @atlante/opencode@0.1.19 had "main": null and exports with only . and ./api. It installed into ~/.cache/opencode/packages/... on every boot, registered nothing, and never logged anything. Booting with the fixed package.json (non-empty "main" + exports["./server"]) loads it immediately, which confirms discovery was the only problem.
Meanwhile the opencode plugin CLI path already has a good diagnostic for exactly this state (manifest_no_targets: "does not expose plugin entrypoints in package.json — Expected one of: exports["./tui"], exports["./server"], package.json main for server, or package.json["oc-themes"] for tui themes."). The boot loader could reuse it: when an installed plugin yields zero targets, log an error/warning (ideally naming the missing convention) instead of dropping it silently.
Happy to send a PR if you point me at where the report handlers are defined in the new codebase.
Plugins
@atlante/opencode (our adapter; OpenCode plugin API via @opencode-ai/plugin)
OpenCode version
1.18.25
Steps to reproduce
- Create an npm package that imports @opencode-ai/plugin and exports a plugin, but whose package.json has no
mainand noexports["./server"](onlyexports["."]). - Reference it in
opencode.json:"plugin": ["@atlante/opencode"]. - Boot opencode: the package installs into the plugin cache, no error is logged, and the plugin's agents/tools never appear.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.