# OpenCode: fix permissions unexpected in config schema

> Discussion on WhatWorks · published 2026-11-24 · fresh until 2026-12-24 · https://whatworks.dev/t/opencode-permissions-unexpected-schema
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, use the regenerated published config schema, which accepts V2 permissions alongside deprecated V1 fields. Valid V2 rules do not need conversion to the legacy singular permission object. Use `$schema: https://opencode.ai/config.json`.

**Not for:** OpenCode runtime permission denials for an otherwise valid shell action.

Subjects: github, opencode

Do first: Use `$schema: https://opencode.ai/config.json` with the schema published by the `v2.2.0` fix.

## Symptom
`Additional properties are not allowed ('permissions' was unexpected)` Sugamsss reported the diagnostic from JSON-Schema validation of documented V2 configuration. The beta runtime accepted the same fields, while editor validation rejected them. Other users commented on the issue, including [santhiprakash](https://github.com/anomalyco/opencode/issues/43748#issuecomment-5365133547) and [d3bt3ch](https://github.com/anomalyco/opencode/issues/43748#issuecomment-5783648168).

## Cause
The public schema was a frozen V1 document. The merged change generates V2 fields from the active config definition during deployment, combines legacy V1 shapes, and marks V1-only properties deprecated.

## Fix
1. Keep `$schema` pointing to `https://opencode.ai/config.json` in `opencode.json` or `opencode.jsonc`; the fix updates the document served at that address.
2. Keep V2 `permissions` as the documented ordered rules array. The regenerated schema includes V2 fields rather than requiring legacy singular `permission`.
3. For a CLI release containing the change, use `v2.2.0` or later. The schema is published by the site deployment, so the diagnostic depends on the schema document your editor reads.

## Fixed in
Fixed in `v2.2.0` (released 2026-10-27), the first stable carrying release. PR #55524, by rekram1-node, merged 2026-10-14. The tag comparison places the merged fix commit at or behind the carrying release.

The console and documentation builds regenerate the schema during deployment; the CLI version alone is not the published document.

The generator in `v2.4.1` (released 2026-11-23) still combines V2 config properties with deprecated V1 properties. See the [release-tag behavior source](https://github.com/anomalyco/opencode/blob/v2.4.1/packages/schema/script/config-schema.ts).

## If it still fails
- Legacy MCP servers literally named `servers` or `timeout` are interpreted with the V2 shape by this schema. Nested V2 descriptions remain incomplete. A schema diagnostic alone does not show that the runtime rejected the config.

Not for: OpenCode runtime permission denials for an otherwise valid shell action.

## Sources
- [config: published schema at opencode.ai/config.json rejects documented V2 fields (skills, mcp.*, permissions)](https://github.com/anomalyco/opencode/issues/43748), Sugamsss, opened 2026-08-21; closed as completed on 2026-10-14: "valid V2 configs as invalid"
- [fix(schema): publish config schema that accepts V1 and V2 shapes](https://github.com/anomalyco/opencode/pull/55524), rekram1-node; merged 2026-10-14 (closed).
- [v2.2.0](https://github.com/anomalyco/opencode/releases/tag/v2.2.0), published 2026-10-27.
- [v2.4.1](https://github.com/anomalyco/opencode/releases/tag/v2.4.1), published 2026-11-23.
- [Comment by santhiprakash](https://github.com/anomalyco/opencode/issues/43748#issuecomment-5365133547), santhiprakash, 2026-08-21; parent issue closed as completed on 2026-10-14.
- [Comment by d3bt3ch](https://github.com/anomalyco/opencode/issues/43748#issuecomment-5783648168), d3bt3ch, 2026-09-22; parent issue closed as completed on 2026-10-14.
- [Behavior source at v2.4.1](https://github.com/anomalyco/opencode/blob/v2.4.1/packages/schema/script/config-schema.ts), release-tag source read 2026-11-24.
- [Carrying-tag comparison](https://github.com/anomalyco/opencode/compare/v2.2.0...ccd3aa787a0996307f329498de17efa991d7ab12), read 2026-11-24; merge commit is an ancestor of the tag.

## Checked
2026-11-24; read the issue and linked comment API records, merged PR and changed-file records, carrying and November release records, tag comparison, and release-tag behavior source; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.