Skip to content
zero2vibecodelearn vibe coding
Level 3 · Making it yours 8 min Reviewed by the author · Oct 22, 2026

Permissions, and being honest about the risk

An agent with file access and a shell can do real damage. The controls are simple and worth understanding on the day you install it, not the day something goes wrong.

Level 3 · 0 / 4 lessons0%
In this lesson

No hands-on task in this lesson — just read it through and answer the questions.

Everything useful about this tool comes from one fact: it can act. Everything dangerous comes from the same fact. Let us be specific rather than vague.

What it can actually do wrong

Delete or overwrite the wrong thing. A command with a wrong path is one character away from a correct one, and it does not hesitate the way you would.

Expose a secret. Reading a key is harmless. Pasting it into a file, a log, or a commit is not, and any of those can happen inside one helpful-looking change.

Commit and publish. If it can run git, it can commit. If it can push, what is on your machine can leave it.

Follow instructions that were not yours. Text it reads — a fetched web page, an issue description, a file in a dependency — can contain something shaped like an instruction. This is , and the defence is that the resulting action is still visible to you, if you are looking.

The honest sentence

The permission prompt is the review

By default, Claude Code asks before it does things that matter. The prompt tells you the action; your answer is yes, yes-and-stop-asking-for-this, or no.

That prompt is not an annoyance to click through. It is the single moment where you can still say no. Read the command. If you do not understand it, ask what it does before approving it — asking is free.

Yes-and-stop-asking is genuinely useful for the boring repeats: running your test suite forty times in an afternoon. It is a bad answer for anything that deletes, publishes, or reaches outside the project.

Quick check

The agent asks to run a command you do not recognise. What is the right response?

Rules that persist

Settings files let you decide once instead of every time. They live in your project’s .claude folder — one committed for the team, one local and untracked for your own overrides — and there is a personal one in your home directory that applies everywhere.

The two useful shapes:

  • Allow the safe and frequent, so you are not interrupted forty times a day. Your test command is the obvious candidate.
  • Deny the genuinely dangerous, so it cannot happen even if you are tired and clicking fast. Paths holding secrets, commands that publish, anything touching production.

Deny rules matter more than allow rules. An allow rule saves you time; a deny rule saves you an incident.

Instructions are not enforcement

Skipping permissions

There is a that turns off the prompts entirely. It exists because there are legitimate uses: an isolated container, a throwaway virtual machine, an automated run where nobody is watching a terminal.

It is not a productivity setting for your laptop. Turning it off is removing the review step from a system whose main failure mode is confident, well-formatted wrongness. Claude Code also has sandboxing options for running commands with limited filesystem and network access — better tools for the same goal, and worth reading about before you reach for the blunt one.

The three things that actually protect you

  1. Git. A committed project turns almost every mistake into git restore. This is the big one.
  2. Scoped credentials. Whatever key the agent could reach, assume it could be used. Read-only where read-only will do. Never a production key in a development folder.
  3. Reading what it does. Not skimming. Reading. This is the control that catches the things the other two cannot.

A reasonable starting posture

Is it safe to let it run commands at all?

Yes, with prompts on and a committed project — and it is where most of the value is, since an agent that can run your tests catches its own mistakes. The risk is in turning the prompts off before you know what normal looks like.

What if I approved something I should not have?

Check `git status` immediately and restore from your last good commit. If a secret was exposed, rotate it — deleting the file does not un-expose a key that reached a log or a remote.

Try it yourself

A permission prompt, and the three answers you can give it.

Check your understanding

Answered 0/3
Mode:

What is the honest risk of an agent that can edit files and run commands?

What is the safest default for a beginner?

Where do allow and deny rules for a project live?

Finish the task in the terminal and answer the questions to complete the lesson.

📝 My notes

Saved automatically in this browser · shows up on the Notes page.

Lesson Q&A

What is the honest risk of an agent that can edit files and run commands?

It can delete, overwrite, expose or publish things — and it will do so confidently — Every risk here comes from the same source as every benefit: it can act. There is no version of this tool that acts and cannot act wrongly.

What is the safest default for a beginner?

Approve actions as they come up, in a project that is committed to Git — The prompts are the review. Turning them off before you know what normal looks like removes your only chance to say no.

Where do allow and deny rules for a project live?

In a settings file in the project's `.claude` folder, alongside your own local overrides — CLAUDE.md is instructions, which are advisory. Permissions are settings, and settings are enforced.

The agent asks to run a command you do not recognise. What is the right response?

You are allowed to ask. A one-line explanation costs nothing and is the entire point of the prompt existing.

Terms in this lesson

Move between lessons with ← → · search with ⌘K

Written and reviewed by Mikhail Kuzmitskii