[PR #12361] fix(plugin): user plugins override built-in plugins for same provider #14188

Closed
opened 2026-02-16 18:18:59 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12361

State: closed
Merged: Yes


Fixes #12223

BUILTIN plugins are appended after user plugins in plugin/index.ts. Since ProviderAuth.state() uses fromEntries() (last-write-wins), built-ins silently override user plugins targeting the same provider. The only workaround is OPENCODE_DISABLE_DEFAULT_PLUGINS=1.

This swaps the order so BUILTIN loads first and user plugins load after, giving user plugins natural priority via last-write-wins.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12361 **State:** closed **Merged:** Yes --- Fixes #12223 BUILTIN plugins are appended after user plugins in `plugin/index.ts`. Since `ProviderAuth.state()` uses `fromEntries()` (last-write-wins), built-ins silently override user plugins targeting the same provider. The only workaround is `OPENCODE_DISABLE_DEFAULT_PLUGINS=1`. This swaps the order so BUILTIN loads first and user plugins load after, giving user plugins natural priority via last-write-wins.
yindo added the pull-request label 2026-02-16 18:18:59 -05:00
yindo closed this issue 2026-02-16 18:19:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14188