# opencode · Declarative configuration

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [opencode](https://ai-agents-review.com/runtime/opencode.md)
- Column: [Declarative configuration](https://ai-agents-review.com/column/declarative-configuration.md) (Product integration)
- Mark: 2 s
- Default deployment: 2
- Best supported configuration: 2
- Page: https://ai-agents-review.com/cell/opencode/declarative-configuration

## Rationale

Effect Schema type decode, but `onExcessProperty: "ignore"`; a malformed document is dropped with a warning

## Rubric criteria for this column

- 0: Configuration only through code or flags
- 1: Config file(s), no validation: unknown keys and wrong types silently ignored
- 2: Config file(s) with type validation, but unknown keys ignored or warning only by default
- 3: Schema-validated config where unknown keys are rejected, **or** strict mode available and documented
- 4: Level 3 by default, plus semantic checks (limits, references) **and** a published machine-readable schema

## Review finding

Built in: layered JSONC (`opencode.json[c]`) from global, `.opencode`, `.claude`, `.agents`, project, env and macOS MDM; Effect Schema decode. Unknown keys silently ignored; a malformed document is dropped with a warning log. Hot reload. Some parsed keys unused (`lsp`). [I99][I100][I101]

## Evidence cited by the mark

- [I99] opencode — https://github.com/anomalyco/opencode/blob/2204311ec6e966db8d67988ab3638ad95a811a46/packages/core/src/config.ts#L148-L182 — decode with `onExcessProperty: "ignore"`; parse/decode failures logged as warnings and document dropped — [S]

## Evidence also cited by the review finding

- [I100] opencode — https://github.com/anomalyco/opencode/blob/2204311ec6e966db8d67988ab3638ad95a811a46/packages/core/src/config/discovery.ts#L13-L93 — config file names, directories, macOS MDM plist paths — [S]
- [I101] opencode — https://github.com/anomalyco/opencode/blob/2204311ec6e966db8d67988ab3638ad95a811a46/packages/core/src/config/normalize.ts#L551-L558 — `lsp` key normalized but not consumed — [S]

## Grading record

- Grader A (default / best): 2 / 2
- Grader B (default / best): 2 / 2
