← All guides

Guide · Permissions · ★☆☆☆☆

Claude Code permissions: what to allow and what to refuse

"Is it safe to let it run commands?" is the first worry, and the constant prompts are the first annoyance. Both have the same answer: know what each prompt is asking, and choose the mode on purpose.

By Arthur Hsiao · Last updated · 5 min read

The rule to remember. Claude Code, not the AI, decides what runs. Anthropic's docs: "Permission rules are enforced by Claude Code, not by the model." Writing "never delete files" in a prompt or CLAUDE.md shapes what Claude tries. It doesn't block anything. Rules and modes do. Checked against the permissions docs on 15 Nov 2026, Claude Code 2.1.325.

1Read what the prompt is asking

A permission prompt names the tool, then the exact action. For a command it shows a short description, the command itself, and your choices:

Do you want to proceed?
  1. Yes
  2. Yes, and don't ask again for: npm test *
  3. Yes, and switch to auto mode
  4. No

Read the command line, not the description. The description is Claude's summary; the command is what runs. If you don't know what a command does, pick No and ask: "what does that command do?"

Choosing No without a comment stops Claude's turn. To say why, move to No and press Tab, type the reason, then Enter. Claude gets the reason and carries on.

2Know what needs a prompt

Action Asks? "Don't ask again" lasts
Reading files in your project No
Running a command Yes, except a built-in set of read-only ones For good, in this project
Editing or creating a file Yes Until the session ends
Fetching a web page Yes, except some documentation sites For good, for that site

So "don't ask again" on a file edit only lasts this session, while on a command it is saved.

3Switch modes with Shift+Tab

A mode decides how much asks you. Press Shift+Tab to move through them; the current one shows under the input box. In the order the docs give for v2.1.325:

Mode Label you see What it does
Manual ⏸ manual mode on Asks before edits and most commands
Accept edits ⏵⏵ accept edits on Edits files and runs simple file commands (mkdir, mv, cp) without asking
Plan ⏸ plan mode on Reads and plans, edits nothing. See plan mode
Auto ⏵⏵ auto mode on No routine prompts; a background check reviews commands first

From Auto, the first press goes back to Manual. Bypass permissions only joins the cycle if you turn it on with a start-up flag or setting. On Windows, if Shift+Tab does nothing, the docs give Alt+M instead.

New sessions start in Auto (since v2.1.283), in the terminal and in VS Code. In the VS Code panel, click the mode name at the bottom of the prompt box to pick Auto, Manual, Plan or Edit automatically.

I didn't record the cycle on this PC with a screen capture. The order above is from the docs for this version; your label under the input box is the final word.

4Allow once, or always

  • Yes for anything you haven't seen before.
  • Don't ask again only for commands you'd happily run yourself, every time, in this project. A build or test command is a good example.

"Don't ask again" saves a rule in .claude\settings.local.json. On Windows it goes in the folder you started Claude Code from. That file is yours: Claude Code keeps it out of Git.

To see and remove saved rules, type:

/permissions

It lists every allow, ask and deny rule and which settings file it came from.

5Write rules by hand, if you want to

Rules live under permissions in a settings file. This is the real file from my home page playground. The built-in /fewer-permission-prompts skill scanned my past sessions and added five read-only browser tools I approve all the time:

{
  "permissions": {
    "allow": [
      "mcp__claude-in-chrome__tabs_context_mcp",
      "mcp__claude-in-chrome__find",
      "mcp__claude-in-chrome__read_page",
      "mcp__claude-in-chrome__read_console_messages",
      "mcp__claude-in-chrome__get_page_text"
    ]
  }
}

My own user settings (C:\Users\<you>\.claude\settings.json) have no allow list at all. I answer prompts as they come.

The docs' example shows the other side, a deny rule that stops Claude reading secrets:

{
  "permissions": {
    "allow": ["Bash(npm run lint)", "Bash(npm run test *)"],
    "deny": ["Read(./.env)", "Read(./.env.*)"]
  }
}

Deny always wins: Claude Code checks deny, then ask, then allow.

6Know what to refuse

Say No, or at least stop and read twice, when you see:

  • Deleting: rm, rmdir, del, Remove-Item, especially with -r, -rf or -Recurse.
  • Rewriting history: git push --force, git reset --hard, git clean.
  • Secrets: anything that reads or prints .env, keys, tokens or passwords, or sends them to a website.
  • Outside your project: paths in your home folder, system folders, or another project.
  • Installs you didn't ask for: a new package or a script piped from the internet.

Writes to some folders always ask in Manual and Accept edits, even with rules: .git, .claude, .vscode and a few others. That is on purpose.

Don't skip permissions as a beginner. --dangerously-skip-permissions turns the prompts off. The docs say to use it "only in isolated environments like containers or VMs where Claude Code can't cause damage". If the prompts annoy you, allow the few safe commands you see every day, or try Auto mode. To block something with code instead of a prompt, a hook can refuse a command before it runs.

Next: when you said yes and it went wrong anyway, see how to undo changes in Claude Code. New here? Start with Claude Code for beginners.