Skip to content
Academy ofAI Learning

~/academy $ claude learn permission-modes

Permission modes and rules

The six Claude Code permission modes, how allow, ask and deny rules work, the /permissions dialog, and when auto or bypass mode is the wrong choice. 8 min

Watch it done: choose a permission mode and set rules

Note: The status bar shows the mode: ⏸ manual mode on, ⏵⏵ accept edits on, ⏸ plan mode on or ⏵⏵ auto mode on.

Step 1 of 6

Press Shift+Tab during a session to cycle through the modes. From auto, the first press goes to Manual.

  1. Press Shift+Tab during a session to cycle through the modes. From auto, the first press goes to Manual. The status bar shows the mode: ⏸ manual mode on, ⏵⏵ accept edits on, ⏸ plan mode on or ⏵⏵ auto mode on.
  2. Start in a chosen mode for one session. manual is another name for the default mode. Type: claude --permission-mode manual. The session starts in Manual mode: only reads run without asking, and you approve every edit and command.
  3. To start every terminal session in Manual, set defaultMode in your user settings. On Windows, ~/.claude is the .claude folder in your user profile. Create ~/.claude/settings.json containing: { "permissions": { "defaultMode": "default" } }
  4. Rules sit on top of any mode. Deny is checked first, then ask, then allow, and deny rules block in every mode. Commit this file so the team shares it. Create .claude/settings.json containing: { "permissions": { "allow": ["Bash(npm run *)"], "ask": ["Bash(git push *)"], "deny": ["Read(./.env)", "Read(./secrets/**)"] } }
  5. Check which rules are active, all in one place. Type: /permissions. A dialog lists every rule and the settings file it came from. You can add or remove rules here, and see what auto mode blocked recently.
  6. Approve a safe command once and for all from the prompt itself. That rule is personal to you and stays out of your commits. Choosing Yes, and don't ask again on a command prompt saves an allow rule to .claude/settings.local.json for you.

Commands from the official Claude Code docs, checked 18 November 2026. Lines marked Note describe what happens and are not real output.

Step 1 of 6

$ Read

The six modes

A permission mode decides what Claude may do without asking you first. Press Shift+Tab to cycle through them, or start with claude --permission-mode <mode>. The status bar always shows the current one.

Checked 18 November 2026: from Claude Code v2.1.283, interactive terminal and VS Code sessions start in auto mode by default when your model supports it. If you see ⏵⏵ auto mode on and did not choose it, that is why. On earlier versions only Pro, Max, Ultra and Team plans started in auto, and any session where auto is unavailable starts in Manual.

Manual (default)
Only reads run without asking. You approve every edit and command.
acceptEdits
File edits and common file commands (mkdir, mv, cp...) inside your project run without asking.
plan
Explores and proposes, no edits until you approve the plan.
auto
Runs without routine prompts. A separate classifier model checks actions first.
dontAsk
Reads and pre-approved tools run. Anything that would prompt is refused. For CI and scripts.
bypassPermissions
Skips prompts and safety checks. Isolated containers and VMs only.

Lesson notes: Permission modes and rules

Everything in this lesson as text, for revision or to read without the interactive steps. By the end you will be able to: You can pick the right permission mode for a job and set rules that hold whatever mode you are in.

  1. Step 1 of 6 · Read

    The six modes

    A permission mode decides what Claude may do without asking you first. Press Shift+Tab to cycle through them, or start with claude --permission-mode <mode>. The status bar always shows the current one.

    Checked 18 November 2026: from Claude Code v2.1.283, interactive terminal and VS Code sessions start in auto mode by default when your model supports it. If you see ⏵⏵ auto mode on and did not choose it, that is why. On earlier versions only Pro, Max, Ultra and Team plans started in auto, and any session where auto is unavailable starts in Manual.

    Manual (default)
    Only reads run without asking. You approve every edit and command.
    acceptEdits
    File edits and common file commands (mkdir, mv, cp...) inside your project run without asking.
    plan
    Explores and proposes, no edits until you approve the plan.
    auto
    Runs without routine prompts. A separate classifier model checks actions first.
    dontAsk
    Reads and pre-approved tools run. Anything that would prompt is refused. For CI and scripts.
    bypassPermissions
    Skips prompts and safety checks. Isolated containers and VMs only.
  2. Step 2 of 6 · Read

    What auto mode does, and does not, promise

    In auto mode a second model reviews actions before they run and blocks the ones you would want a person to stop: piping a download straight into a shell, production deploys and migrations, force pushes, sensitive data sent outside, and actions that look driven by something Claude read rather than by you.

    It is a judgement, not a guarantee. After three blocks in a row, or twenty in total, it pauses and goes back to asking you. Blocked actions appear under Recently blocked in /permissions.

    You can say "do not push until I have reviewed" in the chat and the classifier takes it into account, but that sentence can be lost when a long conversation is summarised. Anything that must never happen belongs in a deny rule.

  3. Step 3 of 6 · Read

    Allow, ask and deny rules

    Rules sit on top of whichever mode you are in. Allow runs without a prompt, ask always prompts, deny blocks. They are checked in the order deny, ask, allow, and the first match wins. Deny rules hold in every mode, including bypass.

    A rule is a tool name with an optional pattern: Bash(npm run *) covers every npm script, Read(./.env) covers one file. Put the * after the subcommand: Bash(git log *) allows only git log, while Bash(git *) allows every git command.

    Team rules go in .claude/settings.json (commit it). Your own go in ~/.claude/settings.json for every project or .claude/settings.local.json for this one. Choosing "Yes, and don't ask again" on a command prompt saves an allow rule to .claude/settings.local.json for you.

    .claude/settings.json
    {
      "permissions": {
        "allow": ["Bash(npm run *)", "Bash(npm test *)"],
        "ask": ["Bash(git push *)"],
        "deny": ["Read(./.env)", "Read(./secrets/**)"]
      }
    }
  4. Step 4 of 6 · Try it in the terminal

    See every rule in one place

    You want to check which rules are active, which settings file each came from, and what auto mode has blocked recently. Type the command that opens that dialog.

    Hint: It is a slash command named after what it manages.

    Show the command
    $ /permissions
    Permissions
      Allow   Bash(npm run *)        .claude/settings.json
      Ask     Bash(git push *)       .claude/settings.json
      Deny    Read(./.env)           .claude/settings.json
      Recently blocked: 0
  5. Step 5 of 6 · Sort

    Allow rule or deny rule?

    For each wish, would you write an allow rule or a deny rule?

    • Stop being asked every time it runs the test suite
    • Never let it open anything in the secrets folder
    • Let it run any npm script without asking
    • Make sure it can never read .env.local
    • Let the typecheck run without a prompt
    • Block every curl command
    Show the answers
    • Stop being asked every time it runs the test suite: Allow rule. An allow rule such as Bash(npm test *) removes the prompt for that one family of commands.
    • Never let it open anything in the secrets folder: Deny rule. Read(./secrets/**) as a deny rule blocks it in every mode, and also catches cat on those files.
    • Let it run any npm script without asking: Allow rule. Bash(npm run *) as an allow rule covers build, lint, test and the rest.
    • Make sure it can never read .env.local: Deny rule. A deny rule is enforced by Claude Code, not left to the model to remember.
    • Let the typecheck run without a prompt: Allow rule. A specific allow rule for the exact typecheck command is safe and saves interruptions.
    • Block every curl command: Deny rule. Bash(curl *) as a deny rule. Note that a script that fetches a URL another way is not caught; the sandbox covers that.
  6. Step 6 of 6 · Quiz

    Check your understanding

    When is bypassPermissions mode the right choice?

    • On your work laptop, to stop the prompts slowing you down.
    • When auto mode keeps blocking something routine in your setup.
    • Inside a disposable container or virtual machine with nothing you care about on it.
    • On a production server, so a fix goes out quickly.
    Show the answer

    Inside a disposable container or virtual machine with nothing you care about on it. Right. The docs say isolated environments only, ideally without internet access, where Claude cannot damage your real system.