Permission modes: how much freedom to give

10 min read text
Course contents (20 lessons)
  1. Meet Claude Code
  2. What Claude Code is and how it differs from a chat window
  3. Installing Claude Code and signing in
  4. Your first session: explore, ask, change
  5. Asking well and staying in control
  6. Asking for changes: context, goal, constraints and acceptance criteria
  7. Reading and approving edits
  8. Permission modes: how much freedom to give
  9. Project memory and slash commands
  10. CLAUDE.md: teaching the tool about your project
  11. Slash commands and custom commands
  12. Everyday coding workflows
  13. The plan-first workflow
  14. Understanding unfamiliar code
  15. Debugging with Claude Code
  16. Refactoring safely
  17. Writing tests with Claude Code
  18. Git, small changes, cost and security
  19. Git workflows: branches, commits and pull request descriptions
  20. Keeping changes small and reviewable
  21. Context and cost awareness
  22. Security habits: secrets, commands and untrusted input
  23. Extending the tool, teamwork and a final project
  24. Hooks and MCP servers explained
  25. Team practices for AI-assisted coding
  26. Final project: building a small app step by step

Why permissions exist

A tool that can edit files and run commands can also do damage. Permissions are the brake. By default Claude Code asks before it does things that change your files or run commands. You answer yes or no. Over a day, that becomes many small questions, so there are ways to adjust how much it asks.

The details of the modes, their names, and the key that switches between them have changed between versions. So I describe the ideas. Use the official documentation and the in-app help for the current names.

The ideas behind the modes

IdeaWhat it meansWhen I use it
Ask for each actionThe default. You approve edits and commands one by one.New projects, new tools, risky work.
Auto-accept file editsEdits are applied without asking, commands still ask.A well-defined task in a clean git branch, when I will review the whole diff after.
Plan onlyThe tool reads and plans but does not change anything.Starting a bigger task, or exploring unfamiliar code.
Skip all checksNothing asks. There is a flag for this with a deliberately scary name.Almost never, and only in a throwaway sandbox with nothing valuable in reach.

In the interactive session there is usually a keyboard shortcut to cycle through the common modes. The footer of the screen shows which mode is active. Look at it. Many mistakes come from forgetting the mode that you left on.

Allowing safe commands once

When the tool asks to run a command, you often have the option to approve it just this once, or to allow that kind of command from now on. For a command you know is harmless and frequent, such as your test command, allowing it permanently removes a lot of noise. For anything broad, do not.

The rules you create are stored in settings files. There is typically a settings file for the project that you can share with your team and a local one for your own preferences. The in-app permission commands show and edit them. Read the official page on settings before you edit them by hand.

Good rules to allow: running the test suite, the linter, git status, git diff. Be careful with rules that allow a whole program with any arguments, such as "any shell command" or "any package manager command". A wide rule is the same as turning the check off for that program.

Plan mode in practice

We want to add rate limiting to the login endpoint. Do not edit files. Read the relevant code and propose a plan: which files change, what approach you recommend, what could go wrong, and how we would test it.

Why it works

The words "do not edit files" back up the mode. Asking for risks and testing forces the plan to be more than a list of steps. You can then argue with the plan, which is much cheaper than arguing with code.

A way to choose

  1. Is the task risky or unfamiliar? Plan only first, then ask for each action.
  2. Is the task clear and the branch clean? Auto-accept edits is reasonable, then review the complete diff.
  3. Does the task need commands with side effects, such as deployments, database changes or deleting files? Keep asking for approval.

Sandboxes and containers

If you ever want to give a tool more freedom, give it a smaller world first. A disposable container or virtual machine, with a copy of the project, no production credentials and limited network access, makes mistakes cheap. Freedom without a boundary is how stories end up on the internet.

The common mistake

The common mistake is turning off checks because the prompts are annoying. If the prompts are annoying, fix the cause: allow the specific safe commands, give larger tasks with clear acceptance criteria, or review the final diff instead of each edit. Do not remove the brake.

Try it yourself

Run a small task three times in the same project on separate git branches: once asking for every action, once with edits auto-accepted, and once starting in plan-only mode. Compare how many interruptions each had, how comfortable you felt with the result and how much time you spent reviewing. Decide which mode suits which kind of task for you.

This course is free to read. Create a free account to enrol, save your progress and pick up where you left off.

Sign up free I already have an account