Choose a permission mode - Claude Code Docs
Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. A permission mode sets which actions Claude can take in a session without asking you first. In Manual mode, Claude Code stops and asks you before most actions that edit files, run shell commands, or reach the network.
In auto mode , a second model, the classifier, reviews actions instead of you; how the classifier evaluates actions lists which actions it reviews and which skip it. With Claude Code v2.1.283 or later, auto mode is the built-in starting permission mode for interactive terminal and VS Code sessions. On earlier versions, it’s the built-in starting permission mode only on Pro, Max, Ultra, and Team plans. Which mode a session starts in covers the surfaces and settings that change the starting permission mode.
You can also change a running session’s permission mode at any time. Available modes Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode. Manual mode appears under its config value, default . Mode What runs without asking Best for default Reads only Reviewing every action yourself, sensitive work acceptEdits Reads, file edits, and common filesystem commands ( mkdir , touch , mv , cp , etc.) Iterating on code you’re reviewing plan Reads, plus classifier-approved commands when auto mode is available Exploring a codebase before changing it auto Everything, with background safety checks Long tasks, reducing prompt fatigue dontAsk File reads inside your working directories and pre-approved tools; anything that would prompt is denied, though a mod you installed can still approve some of those calls Locked-down CI and scripts bypassPermissions Everything Isolated containers and VMs only The mode that reviews every action is named Manual in the CLI, in claude --help , in the VS Code and JetBrains extensions, and in the desktop app.
Its config value is default , which is what hooks and SDK integrations use. The CLI accepts manual as an alias wherever you type the value, for example claude --permission-mode manual or "defaultMode": "manual" . Each mode has its own rule for writes to protected paths . Modes set the baseline. Layer permission rules on top to pre-approve or block specific tools. Deny rules block in every mode, including bypassPermissions .
Deny and ask rules don’t apply to EndConversation as long as Claude still has at least one other tool it can call. Allow rules have no effect in bypassPermissions . Actions no mode auto-approves Claude Code doesn’t auto-approve the following in any mode, including bypassPermissions , though you can turn off the prompt for dangerous rm commands in bypassPermissions mode. Each bullet links to the section that says what happens instead in each mode: Tools matched by an explicit ask rule Connector tools your organization set to ask , in sessions where that setting reaches Claude Code Tools that require user interaction: the built-in AskUserQuestion tool and MCP tools marked requiresUserInteraction Recognized rm and rmdir critical-path removals , which no allow rule or PreToolUse hook "allow" approves, and Bash commands flagged Dangerous rm operation not ruled out The cross-session messaging safeguards Reads outside the working directories while permissions.blockReadsOutsideWorkingDirectories is on: recognized file-reading Bash commands prompt even in auto mode and bypassPermissions mode, and so does any unsandboxed retry that needs approval to run outside the sandbox.
Requires Claude Code v2.1.257 or later. A command the shell parser can’t trace, such as one that changes directory more than once or runs a subshell, prompts the same way even when it names no outside path. This prompt doesn’t apply when the command runs in the sandbox and the sandbox enforces the block. Writes outside the working directories while permissions.blockWritesOutsideWorkingDirectories is on: Claude Code refuses Write , Edit , and NotebookEdit calls there, apart from some of its own files .
The key doesn’t limit shell commands, MCP tools, or the programs hooks run, so use sandboxing to limit where shell commands write. Requires Claude Code v2.1.314 or later. Claude Code doesn’t auto-approve PowerShell commands flagged could not fully check your permission rules either. Approve the prompt if you trust the command. If Claude Code denies the command, ask Claude to reword it. Common setups Permission modes decide whether Claude asks before an action, and the Bash sandbox and outer isolation boundaries decide what an action can reach once it runs.
Each row below pairs a goal with the flags or settings that get you there and the isolation it needs, as a starting point. Available modes lists what runs without a prompt in each mode. You want to Start with Isolation needed Notes Review every action yourself Manual mode: claude --permission-mode default None Sensitive work, unfamiliar code Iterate locally with fewer prompts, without a classifier Manual mode plus the Bash sandbox in auto-allow mode : claude --permission-mode default , then run /sandbox and select auto-allow The built-in Bash sandbox, on macOS, Linux, and WSL2 Deny rules still apply, and ask rules that name a command, such as Bash(git push *) , still prompt.
Auto-allow mode covers other commands that can prompt. To turn the sandbox on from a settings file instead, set sandbox.enabled and sandbox.autoAllowBashIfSandboxed to true Explore before changing anything claude --permission-mode plan None Claude Code blocks edits until you approve a plan Work hands-off in auto mode claude --permission-mode auto , the built-in starting permission mode with v2.1.283 or later None; a sandbox or container adds defense in depth Requires a supported model , and your organization can turn auto mode off Run in CI with an exact allowlist claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read" None beyond what your CI runner provides Cloud sessions ignore dontAsk from settings files Run fully unattended inside a container claude -p "<prompt>" --dangerously-skip-permissions Required: a container, VM, or the sandbox runtime ; on Linux and macOS, run it as a non-root user Cloud sessions ignore this mode from settings files.
In this -p run, the few calls that would still prompt are denied instead The Bash sandbox and auto mode work independently and combine, with the exceptions listed under Sandbox modes . For the full interaction, see How sandboxing relates to permissions and permission modes and How isolation relates to permission modes . Which mode a session starts in When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies: The --permission-mode flag, or --dangerously-skip-permissions permissions.defaultMode in a settings file If you set "auto" in .claude/settings.json or .claude/settings.local.json , the value doesn’t take effect, and Claude Code then uses the built-in default rather than a defaultMode from ~/.claude/settings.json .
If you set "bypassPermissions" in those two files, it doesn’t take effect either, and the session starts in Manual mode. The other values apply from any settings file. The built-in default Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes . For the permission mode Claude Code starts a resumed session in, see permission mode on resume . The built-in auto default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows.
On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code. The first row that matches your session applies. The table covers sessions you
The rest of this page is on the live site.