You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Configuration schema is not in sync with the v2 configuration #50724
Configuration schema https://opencode.ai/config.json is not in sync with the v2 configuration parameters. Is https://opencode.ai/config.json is the schema for v2 configuration?
Confirming this from the V1 side (opencode 1.18.34), where the V2→V1 bridge is visible in code, in case it helps narrow the root cause.
Two shapes both work on this build, and the schema only describes the first:
// V1 — validates against the published schema
{ "mcp": { "madrid": { "type": "local", "command": ["npx","-y","pkg"], "enabled": true } } }
// V2 — accepted by the runtime, rejected by the schema
{ "mcp": { "servers": { "madrid": { "type": "local", "command": ["npx","-y","pkg"], "disabled": false } } } }
ConfigV2Compat.lower() normalizes the second into the first. For each entry it detects native V2 fields (disabled, codemode, object-valued timeout, snake_case oauth) and rewrites them; enabled/disabled are handled as an inversion:
The visibility gap is the part worth adding to this issue. A malformed V2 entry is discarded rather than rejected, so opencode mcp list exits 0 and simply omits it. The only signal is a WARN in the log:
level=WARN message="configuration compatibility diagnostic" source=~/.config/opencode/opencode.json
path="[\"mcp\",\"servers\",\"madrid\"]" kind=invalid
action="Native setting could not be lowered because it is malformed"
config.ts:190 pushes that through Effect.logWarning, which never reaches stdout. So the combination that hurts is exactly this one: no published V2 schema (editor gives nothing) + malformed V2 entries discarded instead of failing (runtime gives nothing on the terminal). The user is left to grep logs.
That discard is deliberate — v2-compat.ts comments "Keep invalid flat entries for the final V1 decoder rather than sanitizing them" — so the fix is likely about surfacing it, not about keeping the entry. Not proposing a patch here, just noting the mechanism and the reproduction in case it helps.
Activity
github-actions commentedon Sep 22, 2026
This issue might be a duplicate of existing issues. Please check:
d3bt3ch commentedon Oct 1, 2026
when to expect a sanitized
v2config schema?Addin commentedon Oct 1, 2026
Confirming this from the V1 side (opencode 1.18.34), where the V2→V1 bridge is visible in code, in case it helps narrow the root cause.
Two shapes both work on this build, and the schema only describes the first:
ConfigV2Compat.lower()normalizes the second into the first. For each entry it detects native V2 fields (disabled,codemode, object-valuedtimeout, snake_caseoauth) and rewrites them;enabled/disabledare handled as an inversion:The visibility gap is the part worth adding to this issue. A malformed V2 entry is discarded rather than rejected, so
opencode mcp listexits 0 and simply omits it. The only signal is a WARN in the log:config.ts:190pushes that throughEffect.logWarning, which never reaches stdout. So the combination that hurts is exactly this one: no published V2 schema (editor gives nothing) + malformed V2 entries discarded instead of failing (runtime gives nothing on the terminal). The user is left to grep logs.That discard is deliberate —
v2-compat.tscomments "Keep invalid flat entries for the final V1 decoder rather than sanitizing them" — so the fix is likely about surfacing it, not about keeping the entry. Not proposing a patch here, just noting the mechanism and the reproduction in case it helps.