Skip to content

config: published JSON schema at opencode.ai/config.json describes V1, flags valid V2 fields #53398

Closed

Description

@iamamutt

Summary

The published JSON schema at https://opencode.ai/config.json (referenced by $schema in opencode.jsonc and by the V2 config docs as the source of truth) describes the V1 configuration shape. With additionalProperties: false, editors flag every valid V2-only field as an error.

Environment

  • opencode version: v2.0.23
  • OS: Linux 6.8.0-139-generic (linux x64)
  • Terminal: TERM_PROGRAM=tmux, TERM=tmux-256color, COLORTERM=truecolor
  • Shell: /bin/bash
  • Install/channel: latest
  • Active plugins: subagent-sidebar (local TUI plugin, auto-discovered under ~/.config/opencode/plugins/)

Reproduction

  1. Add "$schema": "https://opencode.ai/config.json" to opencode.jsonc.
  2. Use any documented V2 fields, e.g.:
    {
      "update": "auto",
      "warming": true,
      "snapshots": false,
      "worktree": { "directory": "../worktrees" },
      "agents": { "reviewer": { "mode": "subagent" } },
      "permissions": [{ "action": "read", "resource": "*", "effect": "allow" }],
      "providers": { "openai": { "settings": { "timeout": 1800000 } } }
    }
  3. Open the file in an editor with JSON Schema validation.

Expected Behavior

The schema accepts all fields documented in the V2 config guide (/v2/docs/config), since that guide names opencode.ai/config.json as the complete schema.

Actual Behavior

The served schema's root Config definition contains V1-only properties (autoupdate, permission, provider, plugin, agent, command, snapshot, tools, mode, small_model, disabled_providers, …) and is missing V2 properties (agents, permissions, providers, update, warming, worktree, snapshots, commands, …). Combined with additionalProperties: false, every V2-only field is reported as invalid even though the V2 runtime accepts them (no server-side normalization warnings; MCP/providers/agents all load).

Additionally, there is no versioned alternative: https://opencode.ai/v2/config.json returns 404 (unlike https://opencode.ai/v2/cli.json, which exists and validates correctly).

Additional Context

  • Consistently reproducible; purely a schema-content issue, no runtime impact.
  • Related docs bug: /v2/docs/config points at this URL as the source of truth for available fields.
  • Suggested fix: publish the actual V2 schema at https://opencode.ai/config.json (or add https://opencode.ai/v2/config.json and update the docs/$schema guidance accordingly).

Activity

  1. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

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

    • #50852: reports that the published schema is V1 and flags valid V2 configs.
    • #43748: reports the same schema URL rejecting documented V2 fields.
    • #50724: reports that the published configuration schema is out of sync with V2.
    • #48812: reports a specific V2 permissions field mismatch in the published schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions