Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Claude Workflow  ›  Lesson

Permission Modes and Shift+Tab

Permission Modes 15 minPermission modes and allow, ask and deny rules control what Claude may do without asking, and they should be loosened only as far as a mistake could be undone.

Permission Modes and Shift+Tab

The permission prompt is your seatbelt. Clicking "yes" fifty times an hour gets tiring, so Claude Code lets you loosen it, both by mode and by rules. The skill is loosening it only where a mistake is cheap to undo.

The rule

Loosen permissions only as far as you can undo.

Modes set the overall level. Names vary a little between versions, but the main ones are:

  • Default: Claude asks before editing files and before running commands. Reading is free.
  • Accept edits: file edits go through without asking; commands still ask. Useful on a clean git tree, where you will review the whole diff at the end.
  • Plan: read-only. Claude researches and proposes but changes nothing (next lesson).
  • Skip all prompts: turned on with a launch flag whose name contains the word "dangerously". Only for a throwaway container or virtual machine with no secrets and nothing you would miss.

Some versions offer further modes in between. Shift+Tab cycles through the everyday modes, and the current one is shown near the prompt.

Rules give finer control: lists of tools and commands to allow, to always ask about, or to deny. /permissions shows and edits them. They live in settings files: your personal ~/.claude/settings.json, the project's .claude/settings.json (committed and shared with the team), and .claude/settings.local.json (yours, for this project only). A deny rule beats an allow rule.

{
  "permissions": {
    "allow": ["Bash(pytest:*)", "Bash(git diff:*)"],
    "deny": ["Read(./.env)", "Bash(git push:*)"]
  }
}

The pattern syntax has changed between versions, so let /permissions show you the exact form yours expects.

Two safety habits go with this. Keep secrets out of reach, which is why .env is denied above. And remember that text Claude reads, such as a web page or a stranger's file, can contain instructions aimed at it. Prompts are what stop that text turning into actions.

The shortcut

Measure the undo radius: if Claude gets this wrong, can git put it back? Edits to tracked files on a clean tree: yes, so accept-edits is fine. Deleting untracked data, pushing, deploying or spending money: no, so keep asking, or deny.

Setting up permissions for tiffinStep 1 of 5
  1. Start in the default mode

    For your first few sessions, watch every prompt to learn what Claude actually does.

Drills

Answer fast — trust the rule.

quick drill

Which mode should you never use on your everyday laptop?

quick drill

In accept-edits mode, what still asks for permission?

quick drill

The rules allow Bash(pytest:*) and deny Bash(git push:*). Claude tries git push origin main. What happens?

quick drill

Where should a permission rule that the whole team shares go?

Remember

  • Loosen permissions only as far as you can undo.
  • Shortcut: measure the undo radius; local and tracked is cheap, shared or external is not.
  • Trap: skipping all prompts on a machine with real secrets and real data.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainDesign tiffin's permissions

Design the permission setup for the tiffin repository: which mode you would use and when, and which allow and deny rules you would add. Explain each choice in terms of what could and could not be undone.