How to always allow commands in Claude Code (without allowing everything)
Short answerHow to always allow certain Bash commands, file edits and tools in Claude Code with permission rules, where they are saved, and how to keep it safe.
Claude Code asks before it runs commands or edits files. You can tell it to always allow the ones you trust, so it stops asking about them and only asks about the rest. This page covers how, as of November 2026. Check the official Claude Code permissions documentation for the latest syntax.
Three ways to always allow
- From the prompt. When Claude Code asks, choose the "Yes, and don't ask again" option. It saves a rule for that command in the project's
.claude/settings.local.json. - With
/permissions. Type/permissionsin Claude Code to see every rule, which file it comes from, and to add or remove rules. - In a settings file. Add rules to the
permissions.allowlist in.claude/settings.json(this project, shared with your team) or~/.claude/settings.json(every project).
Rule examples
| Rule | What it allows |
|---|---|
| `Bash(npm run test:*)` | Running your test scripts |
| `Bash(git diff:*)` | Looking at changes with git diff |
| `Bash(git status)` | Checking git status |
| `Edit` | Editing files in the project without asking |
| `WebSearch` | Searching the web |
Rules are checked in the order deny, then ask, then allow, so a deny rule always wins. You can add a permissions.deny list for commands that should never run, such as reading .env files.
What not to always allow
If you are tempted to allow everything, read why skipping permissions is risky first.
Bash(*)or plainBash: this allows every command, which is close to turning permissions off.- Anything that deletes, pushes or deploys, such as
rm,git pushor deploy scripts. - Network tools like
curlwith any address, which can send your code elsewhere.
Always allow from anywhere with Herdbell
Herdbell shows each Claude Code, Codex and Cursor permission request as a card at your cursor in any app. Press Return to allow once, D to deny, or A to always allow that exact command for that project. Risky commands are never remembered, and you can remove any rule in Settings → Approvals. See how to approve Claude Code permissions without switching windows.
Common questions
How do I always allow Bash commands in Claude Code?
Choose "Yes, and don't ask again" when it asks, or add a rule such as Bash(npm run test:*) to permissions.allow in .claude/settings.json.
Where are Claude Code always-allow rules saved?
Rules from the prompt go to .claude/settings.local.json in your project. You can also put them in .claude/settings.json or ~/.claude/settings.json. Type /permissions to see them all.
How do I always allow everything in Claude Code?
It is possible, but it means commands run without you seeing them. A safer option is to allow the safe commands you use most and answer the rest quickly.
How do I undo an always-allow rule?
Type /permissions and remove it, or delete the line from the settings file.