Plugin deduplication incorrectly removes plugins with index.js entry points #7962

Open
opened 2026-02-16 18:08:47 -05:00 by yindo · 1 comment
Owner

Originally created by @guazi04 on GitHub (Jan 29, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Bug Description
When multiple plugins have entry points named index.js or index.ts, only the last one is loaded. Earlier plugins are silently removed.
Root Cause
getPluginName() returns only the filename for file:// URLs. Since most plugins use index.js/index.ts as entry points, they all return "index" and get deduplicated.
Reproduction
Config with two plugins:
"plugin": ["oh-my-opencode", "file:///path/to/my-plugin/src/index.ts"]
Result: oh-my-opencode is removed because both resolve to name "index".
Environment

  • OpenCode v1.1.42
  • Windows 11

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @guazi04 on GitHub (Jan 29, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Bug Description When multiple plugins have entry points named `index.js` or `index.ts`, only the last one is loaded. Earlier plugins are silently removed. Root Cause `getPluginName()` returns only the filename for `file://` URLs. Since most plugins use `index.js`/`index.ts` as entry points, they all return `"index"` and get deduplicated. Reproduction Config with two plugins: "plugin": ["oh-my-opencode", "file:///path/to/my-plugin/src/index.ts"] Result: oh-my-opencode is removed because both resolve to name "index". Environment - OpenCode v1.1.42 - Windows 11 ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the windowsbug labels 2026-02-16 18:08:47 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 29, 2026):

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

  • #8759: Bug: file:// plugins with same filename incorrectly deduplicated
  • #10115: [Bug]: Only the last plugin loads in OpenCode 1.1.32 - Multiple plugins not supported
  • #10063: Plugin OAuth auth methods silently ignored (shadowed by other plugins)

These issues all describe the same root cause: plugin deduplication logic that doesn't properly account for multiple local plugins or plugins with identical entry point filenames.

Feel free to ignore if your specific case differs from these.

@github-actions[bot] commented on GitHub (Jan 29, 2026): This issue might be a duplicate of existing issues. Please check: - #8759: Bug: file:// plugins with same filename incorrectly deduplicated - #10115: [Bug]: Only the last plugin loads in OpenCode 1.1.32 - Multiple plugins not supported - #10063: Plugin OAuth auth methods silently ignored (shadowed by other plugins) These issues all describe the same root cause: plugin deduplication logic that doesn't properly account for multiple local plugins or plugins with identical entry point filenames. Feel free to ignore if your specific case differs from these.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7962