agent wants to run a command │ ▼ ┌──────────┐ ┌────────────────┐ ┌────────┐ │ Accept │ │ Accept Always │ │ Deny │ └──────────┘ └────────────────┘ └────────┘ │ │ │ run once remember rule reject + tell agent
12345678910111213{ "$schema": "https://opencode.ai/config.json", "permission": { "bash": { "*": "ask", "git status": "allow", "pnpm test*": "allow" }, "external_directory": { "~/.ssh/*": "deny" } } }
permission format. See the OpenCode permissions docs for every action and pattern.1234567--- description: Build agent that does not ask before running tests mode: primary permission: bash: 'pnpm test*': allow ---
kimaki send, add rules for that session only with repeatable --permission tool[:pattern]:allow|deny|ask flags:1234# Read-only review session kimaki send -c <channel-id> -p 'Review this code' \ --permission 'shell:deny' \ --permission 'edit:deny'
shell (it was bash in OpenCode 1), and edit also covers file writes and patches. --permission only works for new sessions. This is ideal for CI, routines, or sandboxed runs; see CI & Automation.