Permission Modes Comparison — Claude Cert Academy

Permission Modes Comparison

Claude Code has three permission modes that control when it asks for human approval before running tools. Choose based on your risk tolerance and environment.

Three Modes at a Glance

# Mode          | Prompts for approval? | Can block tools? | Use case                    | Risk
# --------------|----------------------|------------------|-----------------------------|------
# default       | Yes (per tool call)  | Yes              | Interactive dev, new tasks  | Low
# auto (--auto) | No                   | No               | Trusted scripts, CI basics  | Medium
# plan (--plan) | Plan shown, no exec  | N/A (no tools run)| Review before committing   | None

Default Mode

Auto Mode

Plan Mode

--dangerously-skip-permissions

# Safe usage: inside a Docker container in CI
docker run --rm -e ANTHROPIC_API_KEY=$KEY my-sandbox-image \
  claude --dangerously-skip-permissions -p "run the test suite and fix failures"

# NEVER do this on a machine with prod access
claude --dangerously-skip-permissions -p "clean up old files" # DANGEROUS

settings.json Allow/Deny Patterns

Fine-grained tool control supplements the mode selection. Allow and deny rules use tool names and optional glob patterns on inputs.

{
  "permissions": {
    "mode": "default",
    "allow": [
      "Read",
      "Bash(npm test)",
      "Bash(npm run lint)"
    ],
    "deny": [
      "Bash(rm -rf *)",
      "Write(migrations/**)",
      "Bash(git push*)"
    ]
  }
}

Decision Guide

Combine modes: use --plan in your PR review workflow to show reviewers what Claude would do, then use --auto in CI after the plan is approved. Default mode stays on during interactive development.

Continue to Claude Cert Academy