Skip to main content

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​

QuestionAnswer
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 (bypassPermissions) or lock it down (dontAsk, --restricted, managed settings). You cannot remove it. The sandbox is off by default, and sandbox.enabled turns it on.
Where does it live?The permissions, sandbox, and autoMode keys in settings files, plus CLI flags.
StatusDocumented Undocumented Differs Gated

Pages in This Section​

PageWhat it covers
Permission ModesThe six modes, how a mode is chosen, decision reasons, and safety checks.
Permission RulesRule syntax, the permissions.* keys, related flags and hooks, and permission updates.
SandboxEvery sandbox.* key and its environment variables.
Auto ModeThe classifier, the autoMode setting, and the claude auto-mode commands.
Auto Mode Default RulesEach default allow, hard deny, environment, and soft deny rule.
Permission FlowThe 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.