Repository navigation
Description
Description
Problem
When built-in OAuth plugins (opencode-copilot-auth, opencode-anthropic-auth) fail to install from npm, the error is logged but execution continues silently. Users are left without OAuth authentication options and no indication of what went wrong.
Impact
- User confusion: OAuth options mysteriously missing for GitHub Copilot, Anthropic, etc.
- Enterprise environments: Particularly affects users with corporate npm proxies (JFrog, Artifactory, Nexus)
- Silent failures: Users have no visibility into why authentication methods are unavailable
Root cause
Location: packages/opencode/src/plugin/index.ts:58-75
plugin = await BunProc.install(pkg, version).catch((err) => {
if (!builtin) throw err
const message = err instanceof Error ? err.message : String(err)
log.error("failed to install builtin plugin", {
pkg,
version,
error: message,
})
Bus.publish(Session.Event.Error, {
error: new NamedError.Unknown({
message: `Failed to install built-in plugin ${pkg}@${version}: ${message}`,
}).toObject(),
})
return "" // ⚠️ Returns empty string on failure
})
if (!plugin) continue // ⚠️ Silently skips failed pluginWhen builtin plugins fail to install:
- Error is logged to console (users rarely see this)
- Session.Event.Error is published (not displayed in UI)
- Plugin is silently skipped with continue
- ProviderAuth.methods() returns no OAuth methods for that provider
- UI falls back to API key only with no explanation
Plugins
opencode-copilot-auth, opencode-anthropic-auth
OpenCode version
1.1.17
Steps to reproduce
Reproduction Steps
-
Set up environment to cause npm install failure:
Example: point to invalid registry
npm config set registry https://invalid-registry.example.com/
-
Start OpenCode:
opencode -
Try to authenticate with GitHub Copilot:
opencode auth loginSelect "github-copilot"
Only see "API key" option, no OAuth
You might need to clear old auth configs
-
No error message or indication of why OAuth is missing
Expected Behavior
When plugins fail to install, users should:
- See a clear warning message explaining the problem
- Get actionable steps to fix the issue
- Have diagnostic tools to troubleshoot
- Understand which authentication methods are unavailable and why
Screenshot and/or share link
Operating System
No response
Terminal
No response
Activity
github-actions commentedon Jan 13, 2026
This issue might be a duplicate of existing issues. Please check:
skills/Directory, Ignoringskill/Path #8054: Skill Discovery Only Checksskills/Directory, Ignoringskill/Path (similar silent failure pattern)Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Jan 13, 2026
@Barneyjm I believe this is because the server is emitting events before any subscribers can read them
Barneyjm commentedon Jan 14, 2026
Clicked the wrong thing and closed this issue, sorry
Barneyjm commentedon Jan 14, 2026
@rekram1-node Ah ok interesting. I had Claude make a new endpoint for plugin errors so they could be inspected as needed. Would you prefer I add a wait or retry?
Barneyjm commentedon Jan 20, 2026
@rekram1-node @thdxr please let me know if more changes are needed in this PR or if this is good to merge: #8319
manascb1344 commentedon Feb 8, 2026
Facing the same issue!
github-actions commentedon Apr 10, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.