Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/web/src/content/docs/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ mode: subagent
permission:
edit: deny
bash:
"*": ask
"git diff": allow
"git log*": allow
"*": ask
webfetch: deny
---

Expand Down Expand Up @@ -470,7 +470,7 @@ This can take a glob pattern.
```

And you can also use the `*` wildcard to manage permissions for all commands.
Where the specific rule can override the `*` wildcard.
Since the last matching rule takes precedence, put the `*` wildcard first and specific rules after.

```json title="opencode.json" {8}
{
Expand All @@ -479,8 +479,8 @@ Where the specific rule can override the `*` wildcard.
"build": {
"permission": {
"bash": {
"git status": "allow",
"*": "ask"
"*": "ask",
"git status": "allow"
}
}
}
Expand Down