OpenCode · Coding agent · checked 2026-12-01
Ordered rules with effect allow, deny or ask. The last matching rule wins. If no rule matches, OpenCode asks. For an operation that touches several resources, any deny denies it, otherwise any ask asks.
No sandbox described on the permissions page checked.
Controlled by read, edit and external_directory rules, matched with whole-value wildcards.
Controlled by webfetch and websearch rules. Not an OS-level network boundary.
opencode.jsonc: permissions array of {action, resource, effect}. Actions include read, edit, glob, grep, shell, subagent, skill, webfetch, websearch, external_directory. Agent rules are appended last.
Rule order matters (last match wins), the reverse of tools that use first-match or deny-first. V1 used different field names than V2.
Facts come from each vendor's public documentation, linked on every row, and were read on 2026-12-01. Docs change often, so check the source before you rely on a setting. This is information, not security advice, and no setting here guarantees safety.