Skip to content

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

@guazi04

Description

@guazi04

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions