How permission prompts work
When Claude wants to use a tool that hasn’t been pre-approved, it pauses and shows you:- What tool it wants to use and with what input
- An explanation of what the action does and why
- A risk level assessment (Low / Medium / High)
Permission prompts come from
/permissions (run it to view and manage rules) and from the settings permissions key.Permission rule syntax
Rules use aTool(pattern) syntax. The tool name can be combined with a glob-style pattern that matches the tool’s primary input.
Configuring permissions in settings
Thepermissions key in any settings file accepts three lists of rules:
Rules for actions Claude may take without prompting. Rules are matched against the tool name and primary input argument.
Rules for actions Claude is never allowed to take, even if the user approves interactively.
Rules that always require confirmation, overriding any
allow rules at a lower-priority settings scope.Default behavior when a tool use doesn’t match any
allow or deny rule."default"— ask for each individual action (default behavior)"acceptEdits"— auto-approve file edits, ask for shell commands"bypassPermissions"— skip all permission checks (requires explicit opt-in)
Extra directories outside the project root that Claude Code is allowed to read from and write to.
Permission levels
Claude Code evaluates rules in this order, where later sources win:Policy settings (managed-settings.json)
Set by enterprise administrators. Users cannot override these rules. When
allowManagedPermissionRulesOnly is set in policy settings, rules from all other sources are ignored.Sandbox mode
Sandbox mode runs shell commands inside an OS-level sandbox that restricts filesystem writes and network access. It provides a harder boundary than permission rules alone.Enable sandboxing for shell commands. When
true, Bash commands run inside a restricted environment.Abort if the sandbox cannot be activated on this system (e.g. missing kernel support). Default:
false.Specific commands that are allowed to run outside the sandbox when sandboxing is enabled.
Network policy inside the sandbox (allowed hostnames, ports, etc.).
Commands that bypass the sandbox entirely.
Enterprise permission controls
For organizations managing Claude Code at scale, policy settings expose additional controls:When
true (set in managed settings), only permission rules from managed settings are respected. User, project, local, and CLI argument rules are ignored.Set to
"disable" to prevent users from entering bypass-permissions mode.Common permission patterns
Allow all reads, prompt for writes and shell
Allow all reads, prompt for writes and shell
Allow safe development workflow
Allow safe development workflow
Read-only mode (no writes or shell)
Read-only mode (no writes or shell)