anomalyco / anomalyco/opencode
v2: duplicate plugin ID hangs the server — activation defect never opens readiness latch
@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
- Configure two plugins whose modules export the same
id, e.g. two local files:export default { id: "probe.dup", effect: () => Effect.void } - Start opencode (TUI or serve).
- Observe: server hangs on any path awaiting plugin readiness; log shows only
failed to reload pluginswithDuplicate plugin ID.
Screenshot and/or share link
No response
Operating System
Linux (Ubuntu), but platform-independent
Terminal
No response
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.