Permissions and sandbox
Allow, ask or deny tools per target, understand how rules are matched and approved, and restrict shell commands with the macOS sandbox.
Rules
A rule is TOOL or TOOL:TARGET, in one of three lists:
| List | Effect |
|---|---|
allow | Runs without asking |
ask | Always asks, even with --yes or --allow-shell |
deny | Never runs |
Deny beats ask, and ask beats allow.
Matching
- File targets are relative to the CLI's working folder.
./prefixes are normalized. - A trailing
*matches a prefix for non-shell tools:read_file:private/*. - Shell rules match the whole command exactly.
shell:npm testdoesn't allownpm test; rm -rf /. - A bare
shellrule applies to every shell command. - Rules are per tool. To protect a file from both edits and rewrites, add rules for
edit_fileandwrite_file.
Manage rules
/permissions # show the effective policy and file locations
/permissions allow shell:npm test
/permissions ask write_file
/permissions deny read_file:private/*
/permissions remove shell:npm test
/permissions reload # re-read the files
/permissions trust # review and approve local settings
/permissions reset # restore local defaultsAdding a rule to one list removes the same rule from the other local lists. Invalid tool names and empty targets are rejected.
Effect on reads
Files denied for read_file are also left out of automatic context and search. Files with an ask rule aren't added to context automatically.
How local grants are approved
Your approvals are recorded for your account and this project folder, under ~/.coaade/cli/projects/. A settings.local.json only grants access when it matches that record.
That means a checked-out or hand-edited settings.local.json doesn't grant anything by itself. Until you review it:
- Its allow rules are inactive
- Automatic memory is off
- Your earlier restrictions stay in place
Run /permissions trust to see the proposed settings and confirm them. The CLI refuses a file that changes while you're reviewing it. Changes you make through /permissions, /sandbox and /memory auto update both the file and your record.
The CLI re-reads permission files before collecting context, before each model round and before each tool call. Malformed, oversized, symlinked or hard-linked settings files are rejected.
Automation flags
| Flag | Approves |
|---|---|
-y, --yes | File edits |
--allow-shell | Shell commands |
Deny rules, ask rules and the sandbox still apply. Without these flags, non-interactive runs deny edits and commands.
macOS sandbox
/sandbox on
/sandbox offWith the sandbox on, shell commands and hooks run inside the native macOS sandbox. They can:
- Write inside the project
- Read what developer tools normally need
They can't:
- Write anywhere else
- Use the network
- Read common credential paths
On other platforms, asking for the sandbox fails closed: commands are refused rather than run unsandboxed. The sandbox isn't a container, and it doesn't cover MCP servers, which you configure separately.
Subagents
Read-only workers started with the delegate tool can't open approval prompts, so reads that need approval are denied for them. See Workers.