Learn how to configure user authentication, authorization, and access controls for Claude Code in your organization.
Tool Type | Example | Approval Required | ”Yes, don’t ask again” Behavior |
---|---|---|---|
Read-only | File reads, LS, Grep | No | N/A |
Bash Commands | Shell execution | Yes | Permanently per project directory and command |
File Modification | Edit/write files | Yes | Until session end |
/permissions
. This UI lists all permission rules and the settings.json file they are sourced from.
Tool
or Tool(optional-specifier)
A rule that is just the tool name matches any use of that tool. For example, adding Bash
to the list of allow rules would allow Claude Code to use the Bash tool without requiring user approval.
defaultMode
in settings files:
Mode | Description |
---|---|
default | Standard behavior - prompts for permission on first use of each tool |
acceptEdits | Automatically accepts file edit permissions for the session |
plan | Plan mode - Claude can analyze but not modify files or execute commands |
bypassPermissions | Skips all permission prompts (requires safe environment - see warning below) |
--add-dir <path>
CLI argument/add-dir
slash commandadditionalDirectories
in settings filesBash(npm run build)
Matches the exact Bash command npm run build
Bash(npm run test:*)
Matches Bash commands starting with npm run test
.&&
) so a prefix match rule like Bash(safe-cmd:*)
won’t give it permission to run the command safe-cmd && other-cmd
Edit
rules apply to all built-in tools that edit files. Claude will make a best-effort attempt to apply Read
rules to all built-in tools that read files like Grep, Glob, and LS.
Read & Edit rules both follow the gitignore specification. Patterns are resolved relative to the directory containing .claude/settings.json
. To reference an absolute path, use //
. For a path relative to your home directory, use ~/
.
Edit(docs/**)
Matches edits to files in the docs
directory of your projectRead(~/.zshrc)
Matches reads to your ~/.zshrc
fileEdit(//tmp/scratch.txt)
Matches edits to /tmp/scratch.txt
WebFetch(domain:example.com)
Matches fetch requests to example.commcp__puppeteer
Matches any tool provided by the puppeteer
server (name configured in Claude Code)mcp__puppeteer__puppeteer_navigate
Matches the puppeteer_navigate
tool provided by the puppeteer
server/Library/Application Support/ClaudeCode/managed-settings.json
/etc/claude-code/managed-settings.json
C:\ProgramData\ClaudeCode\managed-settings.json
.claude/settings.local.json
).claude/settings.json
)~/.claude/settings.json
)apiKeyHelper
setting can be configured to run a shell script that returns an API key.apiKeyHelper
is called after 5 minutes or on HTTP 401 response. Set CLAUDE_CODE_API_KEY_HELPER_TTL_MS
environment variable for custom refresh intervals.