anomalyco / anomalyco/opencode

v2: duplicate plugin ID hangs the server — activation defect never opens readiness latch

Open
#44,975 1 comment 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Aug 25, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

On v2, if two loaded plugins export the same id (e.g. an npm plugin and a local plugin, or a plugin whose id collides with an internal/SDK plugin), Plugin.activate dies with Duplicate plugin ID (packages/core/src/plugin.ts). The supervisor's reload loop catches the defect and logs failed to reload plugins, but never opens the readiness latch (packages/core/src/plugin/supervisor.ts), so every unbounded PluginSupervisor.flush caller blocks forever — session startup / opencode serve request handling hangs. Config changes retry activation, but a duplicate ID is deterministic, so the hang is permanent.

From the user's perspective this is silent: no inventory entry, no plugin.updated event, nothing in the /plugins dialog — only a single log line.

Plugins

Any two plugins exporting the same id.

OpenCode version

v2 (next), reproduced on origin/v2 @ aa8c1f6da

Steps to reproduce
  1. Configure two plugins whose modules export the same id, e.g. two local files:
    export default { id: "probe.dup", effect: () => Effect.void }
    
  2. Start opencode (TUI or serve).
  3. Observe: server hangs on any path awaiting plugin readiness; log shows only failed to reload plugins with Duplicate plugin ID.
Screenshot and/or share link

No response

Operating System

Linux (Ubuntu), but platform-independent

Terminal

No response

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.