agent wants to run a command │ ▼ ┌──────────┐ ┌────────────────┐ ┌────────┐ │ Accept │ │ Accept Always │ │ Deny │ └──────────┘ └────────────────┘ └────────┘ │ │ │ run once remember rule reject + tell agent
deny or ask rules to your opencode.json. Your project config is merged after Kimaki's defaults and the last matching rule wins, so your rules take priority:12345678910{ "$schema": "https://opencode.ai/config.json", "permission": { "external_directory": { "~/.ssh": "deny", "~/.ssh/*": "deny", "~/Documents/*": "ask" } } }
"external_directory": { "*": "allow" }, so the keys above merge on top of that wildcard. Paths you don't list stay allowed.--restrict-directories:1kimaki --restrict-directories
/tmp, ~/.config/opencode, ~/.opensrc, ~/.kimaki, and common toolchain caches). Anything else raises an approval prompt in the thread.opencode.json. See the OpenCode Permissions docs for the full schema, pattern matching, and per-agent overrides.1234567--- description: Build agent that never stalls on prompts mode: primary permission: question: allow plan_enter: allow ---
kimaki send, restrict tools for that session only with repeatable --permission rules:1234# Read-only review session kimaki send -c <channel-id> -p 'Review this code' \ --permission 'bash:deny' \ --permission 'edit:deny'
--permission reference.opencode.json. The only way to override it is an explicit --permission 'external_directory:allow' on that session.