Permission Modes as Delegation Dials
Module 2 · Delegation

Permission Modes as Delegation Dials

Match autonomy to risk. Learn Claude Code's permission modes, allow/ask/deny rules, and sandboxing, and how to choose a setting for each task instead of leaving one on all the time.

Delegation Has a Volume Knob

In the last lesson you decided what to delegate. Claude Code also asks how much: may the agent edit files without asking? Run any command? Only the ones you’ve listed?

Your answer is set by permission modes and permission rules. Fluent users treat them as a dial they turn for each task, not a setting they choose once and forget.


The Modes

As of late 2026, Claude Code offers these main modes. In the terminal, Shift+Tab cycles through the everyday ones. The desktop app and IDE extensions have a mode picker.

  1. 1 Plan

    Research and propose; no edits

  2. 2 Default

    Ask before edits and new commands

  3. 3 Accept edits

    File edits auto-approved

  4. 4 Auto

    A safety check approves or blocks

  5. 5 Bypass

    No prompts at all

ModeWhat the agent can do without askingGood fit
Plan modeRead, search, and think. It proposes a plan and makes no changes until you approve.Unfamiliar code, big changes, anything where you want to agree on the approach first.
DefaultRead files. It asks before editing files and before running commands that aren’t already allowed.Learning the tool, sensitive repos, work you want to watch step by step.
Accept editsEdit files in the project without asking. It still asks before commands that aren’t allowed.You’ve agreed on a plan and will review the diff at the end.
AutoMost actions. A separate safety check reviews each action and blocks ones that look risky or off-task.Longer runs where constant prompts would wear you down, on a repo where mistakes are recoverable.
Bypass permissionsEverything, with no prompts. Started with a flag whose name says it all: --dangerously-skip-permissions.Only inside an isolated container or VM with nothing valuable in reach.

The exact list and names change between versions, so check the docs for yours. The reasoning carries over: each step to the right trades a human checkpoint for speed. Make that trade on purpose.


Rules: Fine-Grained Delegation

Modes are broad. Permission rules let you be specific. In a settings file (for example, the project’s .claude/settings.json), you list tools and commands as allow, ask, or deny:

{
  "permissions": {
    "allow": [
      "Bash(npm run test:*)",
      "Bash(npm run lint)",
      "Bash(git diff:*)"
    ],
    "ask": [
      "Bash(git push:*)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./secrets/**)",
      "Bash(curl:*)"
    ]
  }
}

When the agent wants to use a tool, Claude Code checks the rules first and only then the mode:

Claude wants to use a toolMatches a deny rule?Matches an ask rule?Matches an allow rule?No rule matches:the mode decidesnononoyesyesyesBlockedAsks youRunsDefault: asksAccept edits: file edits runAuto: a safety check decidesDeny always wins. A sandbox can still limit what a running command reaches.

A few principles:

  • Deny wins. If a rule denies something, no other setting can allow it.
  • Allow the boring, safe, frequent things. Running tests and linters thousands of times shouldn’t require thousands of clicks. Allowing them lets you keep default mode on without prompt fatigue.
  • Deny reads of secrets. Keeping .env files and credential folders out of the agent’s reach is simpler than trusting yourself to notice.
  • Share project rules with your team. A committed .claude/settings.json gives everyone the same guardrails. Personal tweaks go in a local settings file that stays out of git.

Run /permissions in a session to see and edit the active rules.


Sandboxing: A Boundary That Doesn’t Depend on Judgment

Permission prompts depend on someone making the right call. A sandbox limits what commands can reach at the operating-system level: which folders they can write, which network hosts they can contact. Claude Code includes sandboxing for its shell commands (/sandbox), and you can also run the whole agent inside a container or VM.

A sandbox is what makes higher-autonomy modes reasonable. Inside one, a mistaken command can damage the sandbox, but not your home folder, SSH keys, or cloud credentials.

⚠️ Common Pitfall: Prompt Fatigue → Bypass Everything

Common mistake: getting annoyed by approval prompts on day two and switching to bypass mode on your laptop, permanently.

That swaps a small, constant cost (clicking “allow”) for a rare, large one (an agent deleting files, pushing to the wrong branch, or running a command a malicious README suggested). The fix for fatigue is better rules: allow the safe, repetitive commands, so that the prompts you still see are the ones worth reading.


Choosing a Setting per Task

TaskSensible settingWhy
Exploring an unfamiliar repoPlan or defaultNothing should change yet.
Implementing an approved plan in a feature branchAccept edits, with test and lint commands allowedYou’ll review the diff; edits are reversible.
Overnight refactor in a disposable containerAuto or bypass, inside the sandboxIsolation contains the blast radius.
Touching deploy scripts or infrastructure configDefault, with ask rules on deploy commandsIrreversible actions need a human every time.
A repo you just cloned from a strangerPlan or default, sandbox onYou don’t yet know what its files will tell the agent to do (more in module 5).
🧪 Try It: Write Your Project's Rules

For a project you work on:

  1. List the five commands you run most (tests, lint, build, type check, dev server).
  2. List anything the agent should never read or run (secrets files, deploy commands, rm -rf, network tools).
  3. Draft a .claude/settings.json with allow and deny rules for them. Check the docs for the exact rule syntax your version supports.
  4. Start a session, run /permissions, and confirm your rules loaded.
  5. Ask the agent to do a small task and notice how many prompts disappear and which ones remain.
🧠 Knowledge Check

1. You've agreed on a plan and will review the full diff at the end. Which mode fits best?

2. What's the best fix for prompt fatigue?

3. Why does sandboxing make higher-autonomy modes more reasonable?

4. A deny rule blocks reading .env, and a broader allow rule permits reading all files. What happens?


Up Next

Module 3 turns to Description: how to brief an agent so it builds the right thing, and how to make that context last across sessions.