Fresh Windows repro on 1.18.30: the published opencode.ai/config.json produces zero diagnostics in the standard JSON language server, even when explicitly enabling validation — so unknown keys in opencode.jsonc/omo.jsonc are never caught (no VS-Code-style squiggles).
Environment
opencode 1.18.30 (Windows 11)
plugins: oh-my-openagent 4.19.4, @cortexkit/opencode-antigravity-auth 2.2.1
lsp (in ~/.config/opencode/opencode.jsonc):
"global-json-schema": {
"command": ["cmd", "/c", "vscode-json-language-server", "--stdio"],
"extensions": [".json", ".jsonc"],
"initialization": { "json": { "validate": { "enable": true } } }
}
server binary: vscode-json-language-server ([email protected])
Repro
- Create a directory with no repo markers (no lockfile/biome.json).
probe.json:
{"$schema":"https://opencode.ai/config.json","bogusKey":1}
- Write it through opencode and read the write tool result's
<diagnostics>.
Expected vs actual
Expected: a schema violation for bogusKey (Additional properties are not allowed ('bogusKey' was unexpected)), i.e. the same squiggle VS Code shows.
Actual: no diagnostics block for probe.json at all. Verified twice (two separate writes, server warm). The same directory does produce diagnostics for other servers, so the LSP pipeline itself works:
# control — same bare dir, same session:
<diagnostics file="...\global-lsp-probe\probe2.py">
ERROR [1:6] "(" was not closed
...
Mechanism
The published schema's root is a $ref into top-level $defs:
{ "$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "#/$defs/Config",
"$defs": { "Config": { ... }, ... } }
vscode-json-language-server (and neovim jsonls) resolve a document's schema from its $schema URI but do not dereference a bare top-level $ref + $defs the way ajv/opencode's own validator does, so the document ends up with no effective schema and no diagnostics. That matches the report in this issue; the fresh part here is that it also fails with json.validate.enable: true and the exact VS Code server, not just neovim.
Suggested fix direction: publish the schema with $defs inlined (or wrap it as {"type":"object","properties":{...}} with no top-level $ref), or serve a JSON-LS-compatible variant at a documented secondary URL.
Note (separate, already tracked elsewhere): .jsonc additionally never reaches the server with the right languageId because .jsonc is missing from LANGUAGE_EXTENSIONS (packages/opencode/src/lsp/language.ts:53 has ".json": "json", no .jsonc; client.ts:560 falls back to "plaintext"). Cross-ref: #15859 (comment added).
Verified 2026-09-13.