anomalyco / anomalyco/opencode

Server plugins with no discoverable entrypoint are dropped silently (report.missing is a no-op)

Open
#46,587 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Create an npm package that imports @opencode-ai/plugin and exports a plugin, but whose package.json has no main and no exports["./server"] (only exports["."]).
  2. Reference it in opencode.json: "plugin": ["@atlante/opencode"].
  3. Boot opencode: the package installs into the plugin cache, no error is logged, and the plugin's agents/tools never appear.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.