Permissions Overview
Permissions decide which tool calls Claude Code may run, which need a prompt, and which it must refuse.
The sandbox adds a second wall around Bash commands, enforced by the operating system.
For example, an allow rule for Bash(bun test) runs the tests with no prompt, and the sandbox still limits what that command can reach.
At a Glance
| Question | Answer |
|---|---|
| Can you use it? | ✅ Yes. It is always on. You see it as prompts, or as silent allows and denies. |
| Can you change it? | ✅ Yes. Use rules, a permission mode, hooks, the sandbox, or the auto mode classifier. |
| Can you turn it on or off? | You can loosen it (bypass) or lock it down (dont, --, managed settings). You cannot remove it. The sandbox is off by default, and sandbox. turns it on. |
| Where does it live? | The permissions, sandbox, and auto keys in settings files, plus CLI flags. |
| Status | Documented Undocumented Differs Gated |
Pages in This Section
| Page | What it covers |
|---|---|
| Permission Modes | The six modes, how a mode is chosen, decision reasons, and safety checks. |
| Permission Rules | Rule syntax, the permissions. keys, related flags and hooks, and permission updates. |
| Sandbox | Every sandbox. key and its environment variables. |
| Auto Mode | The classifier, the auto setting, and the claude auto- commands. |
| Auto Mode Default Rules | Each default allow, hard deny, environment, and soft deny rule. |
| Permission Flow | The order in which Claude Code applies all of the above. |
Example
.claude/settings.json
{
"permissions": {
"defaultMode": "default",
"allow": ["Bash(bun test)", "Read(src/**)"],
"deny": ["Bash(git push:*)"]
},
"sandbox": { "enabled": true }
}
bun test runs without a prompt. git push is blocked. Other commands prompt you, and Bash runs in the sandbox.
Marks and Sources
Official pages: Configure Permissions, Choose a Permission Mode, Configure Auto Mode, and Configure the Sandboxed Bash Tool. Badges follow How to Read These Docs.
Related Pages
- Settings Files and Scopes explains the scopes and the order of settings files.
- All Flags lists
--permission-mode,--allowedTools, and the others. - Output Styles and Memory and Rules shape behavior, but do not enforce it.