docs: fix permission docs

This commit is contained in:
Jay V
2025-10-08 12:13:38 -04:00
parent a63fa64dec
commit 1d621260ff
4 changed files with 189 additions and 167 deletions

View File

@@ -249,7 +249,9 @@ You can configure code formatters through the `formatter` option.
### Permissions
You can configure permissions to control what AI agents can do in your codebase through the `permission` option.
By default, opencode **allows all operations** without requiring explicit approval. You can change this using the `permission` option.
For example, to ensure that the `edit` and `bash` tools require user approval:
```json title="opencode.json"
{
@@ -261,11 +263,6 @@ You can configure permissions to control what AI agents can do in your codebase
}
```
This allows you to configure explicit approval requirements for sensitive operations:
- `edit` - Controls whether file editing operations require user approval (`"ask"` or `"allow"`)
- `bash` - Controls whether bash commands require user approval (can be `"ask"`/`"allow"` or a pattern map)
[Learn more about permissions here](/docs/permissions).
---