little cups of claude

tips and techniques for Claude and Claude Code

#8: Permission Modes šŸŽšļø

Today we'll look at permission modes in Claude Code, which set how much Claude can do in a session before it stops to ask us.

Where permission rules handle individual tools, a mode sets the baseline for the whole session. Picking the right one for the job saves a lot of prompts, or adds a few where we want them.

Let's dive in.

The Modes

Here's what runs without a prompt in each one:

  • default: reads only. The CLI labels it Manual, and manual works as an alias.
  • acceptEdits: reads, file edits, and common filesystem commands like mkdir, mv, and cp, for paths in our working directory.
  • plan: reads and exploring. Claude researches and writes a plan, but doesn't edit our source.
  • auto: everything, with a background classifier checking actions against what we asked for.
  • dontAsk: only pre-approved tools. Anything that would prompt is denied instead.
  • bypassPermissions: everything. For isolated containers and VMs only.

Our deny rules still block in every mode, bypassPermissions included.

Switching Mid-Session

Pressing Shift+Tab cycles through modes, and the status bar shows which one we're in:

āø manual mode on
āµāµ accept edits on
āø plan mode on
āµāµ auto mode on

The cycle runs default, acceptEdits, plan, then any optional modes. auto joins the cycle when it's available to our session. bypassPermissions only shows up if we started with it, and dontAsk never appears in the cycle at all.

Picking One at Startup

The --permission-mode flag starts a session in any mode:

claude --permission-mode plan

To make a mode the default, we set defaultMode in a settings file:

{
  "permissions": {
    "defaultMode": "acceptEdits"
  }
}

One gotcha: auto and bypassPermissions don't take effect from a project's .claude/settings.json or .claude/settings.local.json. For auto, the docs say to put it in ~/.claude/settings.json instead.

Plan Mode

Plan mode is great for unfamiliar code or big changes. Besides Shift+Tab, we can put /plan in front of a single prompt:

/plan Move Samantha's settings screen to the new layout system

When the plan is ready, Claude asks how to continue. We can approve it and let Claude work in auto mode, approve it and review each edit by hand, or keep planning. Pressing Ctrl+G opens the plan in our text editor so we can change it first. Neat!

Auto and dontAsk

In auto mode, a separate classifier model reviews actions before they run and blocks anything that goes beyond our request. Recent versions of Claude Code start interactive terminal sessions in auto mode by default. Explicit ask rules still force a prompt.

dontAsk is the opposite: nothing prompts, and anything not pre-approved is denied. That makes it a good fit for CI, paired with an exact allowlist:

claude -p "run the test suite" \
  --permission-mode dontAsk \
  --allowedTools "Bash(npm test)" "Read"

Bypass Permissions

bypassPermissions skips permission prompts entirely, including for writes to protected paths like .git and .claude. The docs are clear that this belongs only in containers or VMs where Claude Code can't do damage:

claude -p "<prompt>" --dangerously-skip-permissions

To make sure nobody turns it on by accident, we can disable it in settings:

{
  "permissions": {
    "disableBypassPermissionsMode": "disable"
  }
}

That works from any settings file, and in managed settings it can't be overridden.

More info about permission modes can be found at the Claude Code docs.

Share

Share on Threads

Similar Cups