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
schema: published config.json uses permission (singular), should be permissions (plural) for V2 #48812
The published JSON schema at https://opencode.ai/config.json defines the permissions key as permission (singular) with additionalProperties: false on the root Config object. OpenCode V2 documents and accepts permissions (plural). Editors validating against the published schema therefore flag the documented permissions key as an unknown property, producing red squiggles on a valid V2 config.
Environment
opencode version: 2.0.2
OS: Darwin 25.6.0 (darwin arm64)
Terminal: Unavailable: terminal environment variables are not set
Shell: /bin/zsh
Install/channel: latest release (brew)
Active plugins: None configured
Reproduction
Create or open an opencode.jsonc with the published schema and a permissions block:
Open the file in VS Code (or any editor using JSON Schema for validation).
VS Code flags "permissions" as an unknown property on the root object.
Expected Behavior
The published schema should match the V2 runtime shape. The top-level Config object should define permissions (plural) — matching both the V2 docs (Config > Permissions) and the runtime schema in packages/core/src/config.ts — so editors do not produce false validation errors on documented V2 config.
Actual Behavior
The schema defines permission (singular) at Config.permission with "additionalProperties": false. Since permissions (plural) is not in the schema's property list, JSON Schema validation flags it as an unknown property. The V2 runtime ignores $schema and validates against its own Effect Schema types (which use permissions plural), so the guardrails work at runtime — but editor validation is broken.
Additional Context
The V2 runtime source confirms the plural field name:
The published schema also defines permission (singular) inside AgentConfig.permission — which should likewise be permissions (plural) to match the runtime and docs.
The schema may be auto-generated from types and was not updated after the field was renamed from singular to plural during the V1→V2 transition.
The issue is cosmetic (runtime behavior is unaffected) but causes persistent editor validation noise for anyone following the V2 docs. I will attach a screenshot of VS Code flagging the error.
If your report adds value not covered there (e.g. specifically tracking the AgentConfig.permission singular field as a separate regression), please link back to those issues. Otherwise, adding a comment or a 👍 on #43748 helps consolidate tracking.
Activity
FernandoMiguel commentedon Sep 13, 2026
github-actions commentedon Sep 13, 2026
This issue might be a duplicate of existing issues. Please check:
opencode.ai/config.jsondoes not match the V2 runtime shape, specifically rejectingpermissions(plural) among other documented V2 fields.opencode.ai/config.jsonschema problems breaking autocomplete/validation in editors (VS Code, Neovim jsonls).If your report adds value not covered there (e.g. specifically tracking the
AgentConfig.permissionsingular field as a separate regression), please link back to those issues. Otherwise, adding a comment or a 👍 on #43748 helps consolidate tracking.HugeLetters commentedon Sep 22, 2026
I'm pretty sure the issue is that published json schema is still for opencode v1, there isnt opencode v2 version