plugins silently fail to load with bad syntax in opencode.json #7939

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

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

Originally assigned to: @thdxr on GitHub.

Description

I was using the opencode-gemini-auth plugin successfully, with this config

{
"$schema": "https://opencode.ai/config.json",
"plugin": "opencode-gemini-auth@latest"
}

then I added another plugin to my opencode.json, and opencode-gemini-auth stopped working.
{
"$schema": "https://opencode.ai/config.json",
"plugin": "opencode-gemini-auth@latest",
"plugin": "@franlol/opencode-md-table-formatter@0.0.3"
}

my mistake, that config syntax is incorrect. opencode-gemini-auth works again if I change it to:

"plugin": [
"opencode-gemini-auth@latest",
"@franlol/opencode-md-table-formatter@0.0.3"
],

it seems to me that opencode should barf if the config syntax is bad, instead of silently fail to load plugins

Plugins

opencode-gemini-auth opencode-md-table-formatter

OpenCode version

1.1.41

Steps to reproduce

add two plugins in opencode.json with improper syntax
{
"$schema": "https://opencode.ai/config.json",
"plugin": "opencode-gemini-auth@latest",
"plugin": "@franlol/opencode-md-table-formatter@0.0.3"
}

  1. try opencode auth login and the oauth option for Google will be missing

Screenshot and/or share link

No response

Operating System

No response

Terminal

Ghostty

Originally created by @bdwelle on GitHub (Jan 29, 2026). Originally assigned to: @thdxr on GitHub. ### Description I was using the opencode-gemini-auth plugin successfully, with this config { "$schema": "https://opencode.ai/config.json", "plugin": "opencode-gemini-auth@latest" } then I added another plugin to my opencode.json, and opencode-gemini-auth stopped working. { "$schema": "https://opencode.ai/config.json", "plugin": "opencode-gemini-auth@latest", "plugin": "@franlol/opencode-md-table-formatter@0.0.3" } my mistake, that config syntax is incorrect. opencode-gemini-auth works again if I change it to: "plugin": [ "opencode-gemini-auth@latest", "@franlol/opencode-md-table-formatter@0.0.3" ], it seems to me that opencode should barf if the config syntax is bad, instead of silently fail to load plugins ### Plugins opencode-gemini-auth opencode-md-table-formatter ### OpenCode version 1.1.41 ### Steps to reproduce 1. add two plugins in opencode.json with improper syntax { "$schema": "https://opencode.ai/config.json", "plugin": "opencode-gemini-auth@latest", "plugin": "@franlol/opencode-md-table-formatter@0.0.3" } 2. try `opencode auth login` and the oauth option for Google will be missing ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal Ghostty
yindo added the bug label 2026-02-16 18:08:43 -05:00
Author
Owner

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

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

  • #10115: Only the last plugin loads in OpenCode - Multiple plugins not supported
  • #10063: Plugin OAuth auth methods silently ignored (shadowed by other plugins)
  • #8297: Plugin installation failures are silent, causing OAuth options to disappear
  • #4850: Plugin syntax errors are handled poorly

All of these issues relate to plugins failing silently when there are configuration or syntax problems. Your specific case (bad JSON syntax with duplicate keys) appears to be a manifestation of the broader issue with poor error handling for plugin configuration errors.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 29, 2026): This issue might be a duplicate of existing issues. Please check: - #10115: Only the last plugin loads in OpenCode - Multiple plugins not supported - #10063: Plugin OAuth auth methods silently ignored (shadowed by other plugins) - #8297: Plugin installation failures are silent, causing OAuth options to disappear - #4850: Plugin syntax errors are handled poorly All of these issues relate to plugins failing silently when there are configuration or syntax problems. Your specific case (bad JSON syntax with duplicate keys) appears to be a manifestation of the broader issue with poor error handling for plugin configuration errors. Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7939