CONCEPT A mode is the session-wide baseline for "does Claude ask first?"
A permission mode sets how often Claude Code pauses to ask you before it edits a file, runs a shell command, or makes a network request. The mode is the baseline; you then layer allow / ask / deny rules (3.2) on top of it. The four modes the exam cares about:
| Mode | Runs without asking | Best for |
|---|---|---|
default (labeled Manual) | Reads only — prompts on first use of each editing/exec tool | Getting started, sensitive work |
acceptEdits | Reads, file edits, and common filesystem Bash (mkdir, touch, rm, mv, cp, sed) inside the working dir | Iterating on code you review after |
plan | Reads and read-only exploration only — never edits source | Exploring a codebase before changing it |
bypassPermissions | Everything — skips prompts and safety checks | Isolated containers / VMs only |
auto (auto-approves with a background safety
classifier) and dontAsk (auto-denies anything not pre-allowed). They aren't in the default
Shift+Tab cycle. The four above are the core ones to know cold.bypassPermissions, writes to
protected paths (.git, .claude, .vscode,
.bashrc, .npmrc, .mcp.json, …) are never auto-approved — they prompt
even in acceptEdits. An allow rule does not override this.CONCEPT Three ways to set the mode
You choose the mode through the harness, never by asking Claude in chat:
- Mid-session: press Shift+Tab to cycle
default→acceptEdits→plan. The current mode shows in the status bar. You can also prefix a single prompt with/plan. - At startup: pass the
--permission-mode <mode>flag, e.g.claude --permission-mode plan. Same flag works with-pfor headless runs. - As a persistent default: set
permissions.defaultModein a settings file.
bypassPermissions by cycling from a normal session. You must
start with --permission-mode bypassPermissions or the equivalent
--dangerously-skip-permissions. Claude Code refuses this mode when running as root/sudo (unless
inside a recognized sandbox).DIAGRAM How a tool call flows through the mode
🔴 Edits blocked until plan approved"] M -->|"default (Manual)"| D["Reads auto
🟠 Edit/exec → prompt"] M -->|"acceptEdits"| E["Reads + in-scope edits auto
🟠 Other Bash / out-of-scope → prompt"] M -->|"bypassPermissions"| B["🔴 Everything runs
(ask rules + rm -rf / still gate)"] P --> PP{"Protected path write?"} D --> PP E --> PP PP -->|"yes"| PR["🟠 Prompt anyway
(allow rule can't bypass)"] classDef ok fill:#d4edda,stroke:#28a745,color:#155724; classDef gate fill:#ffe8cc,stroke:#ff9f40,color:#9a4a0a; classDef bad fill:#f8d7da,stroke:#dc3545,color:#721c24; class P ok; class D gate; class E gate; class B bad; class PR gate;
CODE Setting the mode three ways
# 1. At startup — start in plan mode to explore before editing claude --permission-mode plan # 2. Skip all prompts for an isolated container run (dangerous) claude --dangerously-skip-permissions # == --permission-mode bypassPermissions # 3. Persistent default in .claude/settings.json { "permissions": { "defaultMode": "acceptEdits" } }
default, acceptEdits, and plan.TRADE-OFFS Oversight vs. flow
✅ Tighter modes (default / plan)
- You review each edit / command as it happens
- Plan mode lets Claude research without touching source
- Safest for unfamiliar or sensitive repos
⚠️ Looser modes (acceptEdits / bypass)
- Long uninterrupted stretches, fewer prompts
- But:
acceptEditsstill gates out-of-scope Bash & protected paths bypassPermissionsoffers no protection against prompt injection — containers only
EXAM TRAPS
acceptEdits auto-runs every Bash command." → No. It auto-approves file
edits and a fixed set of filesystem commands (mkdir, touch, rm,
mv, cp, sed) for in-scope paths only. Other Bash commands and
out-of-scope paths still prompt.bypassPermissions." → The default
cycle is only default → acceptEdits → plan. Bypass must be enabled at
launch with --permission-mode bypassPermissions / --dangerously-skip-permissions.allow rule for .claude/** lets edits skip prompts in
every mode." → Protected-path writes are checked before allow rules, so they still prompt in
default/acceptEdits/plan. Only bypassPermissions lets them
through.PRACTICE
Q1 · A teammate wants Claude to freely edit code but still confirm anything outside the repo. Which mode?
acceptEdits. It auto-approves edits and common filesystem commands for paths
inside the working directory (and additionalDirectories), while out-of-scope paths, other Bash
commands, and protected paths still prompt.
Q2 · What are the three ways to set a permission mode, and which one cannot reach bypassPermissions?
Shift+Tab cycling mid-session, the --permission-mode startup flag, and
permissions.defaultMode in settings. The Shift+Tab cycle cannot reach
bypassPermissions — you must start with the enabling flag.
Q3 · In plan mode, Claude proposes edits. Why don't they apply immediately?
Plan mode blocks source edits by design — Claude only reads and explores. Edits stay blocked until you approve the plan, which exits plan mode and switches the session to an editing mode.