Skip to content

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

Closed

Description

@fQwQf

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 @ aa8c1f6

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

Activity

  1. github-actions commented on Aug 25, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    This is fixed in v2: the first plugin with a given ID remains active, and later duplicates are recorded as failed plugins with a “Duplicate plugin ID” error. Plugin readiness also settles after activation errors instead of leaving startup blocked. If you still see this on v2, please open a new issue with the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions