GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — schema: published config.json uses permission (singular), should be permissions (plural) for V2 · Issue #48812 · anomalyco/opencode

schema: published config.json uses permission (singular), should be permissions (plural) for V2 #48812

New issue
Copy link
New issue
Copy link
Closed
#55524
Closed
schema: published config.json uses permission (singular), should be permissions (plural) for V2#48812
#55524
Copy link
Assignees
rekram1-node

Description

@FernandoMiguel
FernandoMiguel
opened on Sep 13, 2026
Issue body actions

Summary

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

  1. Create or open an opencode.jsonc with the published schema and a permissions block:
{
  "$schema": "https://opencode.ai/config.json",
  "permissions": [
    { "action": "shell", "resource": "git push *", "effect": "ask" }
  ]
}
  1. Open the file in VS Code (or any editor using JSON Schema for validation).
  2. 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:

    // packages/core/src/config.ts
    permissions: Permission.Ruleset.pipe(Schema.optional).annotate({
      description: "Ordered tool permission rules applied to agent tool use",
    }),
  • 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.

Activity

  1. FernandoMiguel commented on Sep 13, 2026

    @FernandoMiguel
    FernandoMiguel
    on Sep 13, 2026
    Author
    More actions
    No description provided.
  2. github-actions
    assigned
    rekram1-node
    on Sep 13, 2026
  3. github-actions commented on Sep 13, 2026

    @github-actions
    github-actionsBot
    on Sep 13, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • config: published schema at opencode.ai/config.json rejects documented V2 fields (skills, mcp.*, permissions) #43748: Same root cause — the published schema at opencode.ai/config.json does not match the V2 runtime shape, specifically rejecting permissions (plural) among other documented V2 fields.
    • opencode.ai/config.json schema uses top-level $ref/$defs, which breaks autocomplete/validation in the standard JSON LSP (neovim jsonls / VS Code) #41014: Also reports opencode.ai/config.json schema problems breaking autocomplete/validation in editors (VS Code, Neovim jsonls).

    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.

  4. HugeLetters commented on Sep 22, 2026

    @HugeLetters
    HugeLetters
    on Sep 22, 2026
    More actions

    I'm pretty sure the issue is that published json schema is still for opencode v1, there isnt opencode v2 version

  5. rekram1-node
    closed this as completedin #55524on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.