DEV Community

aicoding-guide
aicoding-guide

Posted on Originally published at aicoding-guide.com

Claude Code permission modes compared: default, acceptEdits, plan, auto, dontAsk, bypassPermissions

Originally published at https://aicoding-guide.com.

A permission mode sets what Claude can do in a session without asking you first. It is the baseline that applies to anything your allow and deny rules don't already decide.

There are six modes. Two of them cannot be set from project settings at all, which is the detail that most often explains "my defaultMode isn't doing anything".

Key point
What you will learn

  • What each of the six modes runs without asking
  • Which mode a session starts in, and the order that decides it
  • The two values that silently do not apply in project settings

The six modes

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) 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 Reads and pre-approved tools; anything that would prompt is denied Locked-down CI and scripts
bypassPermissions Everything Isolated containers and VMs only

The mode that reviews every action is labelled Manual in the CLI, the VS Code and JetBrains extensions and the desktop app. Its config value is default, and the CLI also accepts manual as an alias (v2.1.200 or later).

Modes set the baseline only. Deny rules block in every mode, including bypassPermissions, and allow rules have no effect in bypassPermissions. The mode decides what happens to everything your rules don't match.

Which mode a session starts in

On Pro, Max and Team plans the built-in starting permission mode is auto. For a new terminal session, Claude Code takes the mode from the first of these that applies:

  1. The --permission-mode flag, or --dangerously-skip-permissions
  2. permissions.defaultMode in a settings file
  3. The built-in default

Two values silently don't apply in project settings
Set "auto" in .claude/settings.json or .claude/settings.local.json and it does not take effect — and Claude Code then uses the built-in default rather than a defaultMode from ~/.claude/settings.json. Set "bypassPermissions" in those two files and it doesn't take effect either: the session starts in Manual mode. Every other value applies from any settings file.

Writing the setting

{
  "permissions": {
    "defaultMode": "acceptEdits"
  }
}
Enter fullscreen mode Exit fullscreen mode

Put it in ~/.claude/settings.json for a personal default across projects, .claude/settings.json to share with the project, or .claude/settings.local.json for yourself in this repository — keeping the exception above in mind.

Picking one

  • Everyday development: acceptEdits. Edits stop interrupting you, and you review them together with git diff afterwards
  • An unfamiliar codebase, or design work: plan. Nothing is changed, so you can hand over investigation safely, then switch once you agree with the plan
  • Shared project settings: stay on the cautious side. Anyone who wants to move faster can override in their own settings.local.json
  • CI and disposable containers: dontAsk for a strict allowlist, or bypassPermissions only where Claude Code cannot damage anything

For what bypassPermissions actually turns off and the conditions the documentation sets for it, see When bypassPermissions is safe to use. For non-interactive runs, see Running Claude Code headless in CI.

Switching temporarily

How Scope
Shift+Tab The current session; cycles through the available modes
claude --permission-mode plan The starting mode for that session
claude -p ... --permission-mode acceptEdits One non-interactive run

None of these rewrite a settings file. "Normally acceptEdits, today just investigating" is a Shift+Tab or a flag, not a config change.

Summary

  • Six modes: default (Manual), acceptEdits, plan, auto, dontAsk, bypassPermissions
  • Deny rules apply in every mode; allow rules do nothing in bypassPermissions
  • On Pro, Max and Team plans, sessions start in auto unless a flag or defaultMode says otherwise
  • auto and bypassPermissions do not take effect from .claude/settings.json or .claude/settings.local.json
  • Shift+Tab and --permission-mode switch temporarily without touching your settings

Top comments (0)