Understanding Permissions
Claude Code can do a lot - read files, write code, run commands. But YOU are always in control.
The Permission System
Every action Claude takes requires your approval:
Claude: I need to create these files:
๐ Create: src/App.js
๐ Create: src/styles.css
Allow? [Y/n/e]
โ
| Option | Meaning |
|---|
Y or y | Yes, proceed |
n | No, cancel |
e | Edit - modify before running |
โTip
Pressing Enter without typing anything usually means "Yes" (the capital Y indicates the default).
Types of Permissions
File Operations
Claude: I'll make these changes:
๐ Edit: package.json (add dependencies)
๐ Create: src/utils/api.js
๐๏ธ Delete: src/old-file.js
Allow? [Y/n]
โ
Running Commands
Claude: I need to run:
$ npm install axios lodash
This will install packages. Allow? [Y/n]
โ
Sensitive Operations
Claude is extra careful with:
โ Warning
- Deleting files
- Running shell commands
- Installing packages
- Accessing system files
Claude: โ ๏ธ This command will delete files:
$ rm -rf node_modules
Are you sure? [y/N]
โ
Notice the N is capitalised - Claude defaults to "No" for risky actions.
Auto-Accept Mode
For experienced users, you can reduce prompts:
$ claude --auto-accept files
# Automatically accepts file changes, still asks for commands
โ
โ Warning
Only use auto-accept when you trust the task and understand what Claude is doing. Not recommended for beginners!
Reviewing Changes
Before accepting, you can ask Claude:
> What changes will this make to my existing code?
> Show me a diff of the changes
> Explain why you're deleting that file
โ
The Safety Net
Claude Code has guardrails:
- Can't access files outside your project without explicit paths
- Won't run dangerous commands without clear warnings
- Asks twice for destructive operations
- Logs everything so you can review
๐ฆ๐บAussie Note
Think of it like a contractor asking before renovating your house. "Righto mate, gonna knock down this wall - that alright?" ๐๏ธ
Best Practices
- โ
Read what Claude is about to do
- โ
Ask questions if unsure
- โ
Start with small changes
- โ
Use git to track changes
- โ
Don't auto-accept until comfortable
Key Takeaways
- You approve every file change and command
- Risky operations default to "No"
- Review changes before accepting
- Auto-accept is optional and for experienced users
- Claude explains what it's doing if you ask