Skip to the workspace
Pebellslearn by building
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.

claude code / Permission Modes and Shift+Tab

Explore each scene at your own pace.

01 · The rule

The rule

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.

Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.