Skip to content
AgentAtlas

How to allow Claude Code to run all commands: permission modes, allow rules and skip permissions

How do I stop Claude Code asking for permission every time?

Press Shift+Tab to cycle permission modes, start with claude --permission-mode <mode>, or pre-approve specific commands with permissions.allow rules such as Bash(npm run *) in .claude/settings.json. Auto mode runs without routine prompts while a classifier reviews actions; --dangerously-skip-permissions is meant only for containers or VMs.

Also in: 简体中文 · 日本語 · 한국어 · Español · Português (Brasil)

Compare: allow all commands in every AI coding agent →

Permission modes

  • default (labeled Manual): prompts on first use of each tool.
  • acceptEdits: auto-accepts file edits and common filesystem commands such as mkdir, touch, mv and cp in your working directories.
  • plan: explores and runs read-only commands but doesn't edit your source files.
  • auto: no routine prompts; a background classifier checks shell commands and network requests against your request. It is the built-in starting mode from v2.1.283.
  • dontAsk: denies anything that would prompt, except tools you pre-approved.
  • bypassPermissions: skips prompts, including writes to protected paths like .git and .claude. Only for isolated containers or VMs.

Switch modes

  • During a session: press Shift+Tab to cycle default → acceptEdits → plan (and other enabled modes).
  • For one session: claude --permission-mode plan (or default, acceptEdits, auto, dontAsk).
  • As a default: set permissions.defaultMode in ~/.claude/settings.json.

Pre-approve exact commands instead

Allow rules are safer than skipping all checks. Put the * after the subcommand: Bash(git log *) allows only git log, while Bash(git *) allows every git command. Deny rules always win.

.claude/settings.json

{
  "permissions": {
    "allow": ["Bash(npm run *)", "Bash(git commit *)"],
    "deny": ["Bash(git push *)"]
  }
}

Use /permissions inside Claude Code to see every rule and which settings file it comes from.

Fully unattended runs

Only inside a container or VM, as a non-root user

claude -p "run the test suite and fix failures" --dangerously-skip-permissions

Allowed tools: --allowedTools and permissions.allow

--allowedTools (also spelled --allowed-tools) lists tools that run without a prompt for one session. It takes the same rule syntax as permissions.allow in settings.json. --disallowedTools adds deny rules, and a bare tool name such as Edit removes that tool from the session.

One session with git read commands pre-approved

claude --allowedTools "Bash(git log *)" "Bash(git diff *)" "Read"
  • Rules are checked deny first, then ask, then allow. A broad deny such as Bash(aws *) blocks a call even when a narrower allow rule also matches.
  • Bash rules understand shell operators: Bash(safe-cmd *) does not approve safe-cmd && other-cmd. Each subcommand has to match on its own.
  • Bash(ls:*) is the same as Bash(ls *). The :* form only works at the end of a pattern.
  • MCP tools: mcp__puppeteer allows every tool from the puppeteer server and mcp__puppeteer__puppeteer_navigate allows one tool. Allow globs need a literal server name, so an allow rule of mcp__* is skipped with a warning.
  • Web fetches: WebFetch(domain:example.com) matches example.com only. Add WebFetch(domain:*.example.com) to cover subdomains.
  • To limit which built-in tools exist at all, use --tools "Bash,Edit,Read" instead of an allow list.

Sources

More Claude Code guides

Reviewed Oct 23, 2026. Settings change often; the linked vendor docs are the source of truth.

Built an MCP server? Get it listed everywhere →

Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →