Text of code.claude.com › docs › en › permissions as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Configure permissions - 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. Claude Code supports fine-grained permissions so that you can specify exactly what the agent is allowed to do and what it can’t. You can check permission settings into version control to share them with every developer in your organization, and each developer can customize their own.

Permission system Claude Code uses a tiered permission system to balance power and safety. The table shows, for each tool type, whether Manual mode asks before the action runs. The other permission modes change which of these ask you; in auto mode a classifier reviews actions instead of you, and how the classifier evaluates actions lists which ones it sees. Tool type Example Approval required ”Yes, and don’t ask again” behavior Read-only File reads, Grep No, within the working directory and additional directories N/A Bash commands Shell execution Yes, except a built-in set of read-only commands Permanently per repository and command File modification Edit/write files Yes, except files such as Claude Code’s own plan and auto memory files Until session end Web fetch WebFetch Yes, except a built-in set of preapproved documentation domains Permanently per repository and domain Web search WebSearch Yes Permanently per repository A permission prompt shows what Claude is about to do, followed by your options.

This example is the prompt for a Bash command, from a session in Manual mode: The third option, Yes, and switch to auto mode , doesn’t appear on every prompt . When you choose “Yes, and don’t ask again” and the approval saves permanently, such as for a Bash command or a WebFetch domain, Claude Code saves the rule to .claude/settings.local.json at the root of the git repository, resolved through worktrees to the main checkout.

The rule applies to future sessions anywhere in that repository, including sessions started in subdirectories and in worktrees. A file-modification approval isn’t saved to the file: as the table shows, it lasts until the session ends. In some cases, such as outside a git repository or on Windows, Claude Code doesn’t use the repository root; Where Claude Code looks for each file lists those cases and where it saves the rule instead.

Sometimes a permission prompt offers only a one-time approval, with no “don’t ask again” option and no option to allow the action for the rest of the session. Claude Code offers those options only when the prompt can show you everything they would allow, so a rule you save from a prompt covers only what its option named. When a prompt offers only the one-time approval, approve the action once, or add the rule yourself in /permissions .

To stop the prompts for a command that starts with an exec wrapper such as watch , or for a find command with an action such as -delete , see Exec wrappers and find actions . Add a comment when you answer a permission prompt You can attach a note to Claude when you approve or deny a single action. On most permission prompts, including Bash, PowerShell, file, and MCP tool prompts, move to Yes or No and press Tab to open a comment field on that option.

WebFetch and browser prompts don’t offer the field. The options that allow the action for the rest of the session or save a rule don’t take one either. With the field open, type the comment and then press one of these keys: Enter : submits your answer with the comment attached. If you leave the field empty, Claude Code submits the answer without a comment. Tab : closes the field without answering. To send the text you typed, press Tab again before you answer.

Shift+Tab : on a file prompt, such as an Edit or Write prompt, closes the field the same as Tab . Before v2.1.235, pressing Shift+Tab inside the field instead selected the option that allows the action for the rest of the session, so Claude Code approved the action for the rest of the session and discarded the comment. Claude Code delivers the comment differently depending on how you answered: Yes : Claude Code runs the action, then sends your comment to Claude after the result.

No : Claude Code sends your comment to Claude as the reason for the denial, and Claude continues working. If you select No without a comment on a prompt from the main conversation, Claude Code stops the turn. Manage permissions You can view and manage Claude Code’s tool permissions with /permissions . The dialog lists all permission rules and the settings.json file each rule comes from. You can open the dialog while Claude is working: when you add or remove a rule, Claude Code applies the change starting with Claude’s next tool call in the same turn.

Before v2.1.234, Claude Code queued the command until the turn finished. Allow rules let Claude Code use the specified tool without manual approval. Ask rules prompt for confirmation when Claude tries to use the specified tool. Deny rules prevent Claude Code from using the specified tool. Rules are evaluated in order: deny, then ask, then allow. The first match in that order determines the outcome, and rule specificity doesn’t change the order.

A broad deny rule like Bash(aws *) blocks every matching call, including calls that also match a narrower allow rule like Bash(aws s3 ls) . An allow rule can’t carve an exception out of a deny rule. The same precedence applies between ask and allow: a matching ask rule prompts even when a more specific allow rule also matches the same call. Deny rules behave differently depending on whether they name a tool or scope a pattern within one.

A bare tool name like Bash removes the tool from Claude’s context entirely, so Claude never sees it. If you add such a rule mid-session, Claude can’t call the tool from its next tool call on; Denying an entire tool covers what happens to a definition Claude has already seen. A scoped rule like Bash(rm *) leaves the tool available and blocks matching calls when Claude attempts them. Bare-name removal applies to every tool except EndConversation : a deny rule can’t remove it while any other tool remains, and an ask rule never prompts for it.

Permission rules are enforced by Claude Code, not by the model. Instructions in your prompt or CLAUDE.md shape what Claude tries to do, but they don’t change these rules. To grant or revoke access, use /permissions , the rules described here, a permission mode , or a PreToolUse hook . When auto mode is available to your session, the dialog also includes the auto mode classifier rules . Select the Auto mode tab to view them.

Permission modes Claude Code supports several permission modes that control how it approves tool calls. See Permission modes for when to use each one. To change the default permission mode for new sessions, set defaultMode in your settings files . Which mode a session starts in covers the built-in default for each plan and what the VS Code extension reads. Mode Description default Prompts before most edits, shell commands, and network requests.

Labeled Manual in the CLI, the VS Code and JetBrains extensions, and the desktop app, and Claude Code accepts manual as an alias acceptEdits Automatically accepts file edits and common filesystem commands such as mkdir , touch , mv , and cp for paths in the working directory or additionalDirectories plan Claude reads files and runs read-only shell commands to explore but doesn’t edit your source files; with auto mode available, classifier-approved commands also run.

Labeled Plan in the CLI and the VS Code extension auto Runs without routine prompts; before actions such as shell commands and network requests run, a background classifier checks that they align with your request dontAsk Auto-denies every call that would otherwise prompt, though in some setups a mod you installed can still approve some of those calls. F

The rest of this page is on the live site.