# How to always allow commands in Claude Code (without allowing everything)

> How 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.

Canonical: https://herdbell.com/blog/claude-code-always-allow
Author: Herdbell team
Published: 2026-11-25
Last updated: 2026-11-25

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

1. **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`.
2. **With `/permissions`.** Type `/permissions` in Claude Code to see every rule, which file it comes from, and to add or remove rules.
3. **In a settings file.** Add rules to the `permissions.allow` list 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](https://herdbell.com/blog/claude-code-dangerously-skip-permissions-alternative) first.

- **`Bash(*)` or plain `Bash`**: this allows every command, which is close to turning permissions off.
- **Anything that deletes, pushes or deploys**, such as `rm`, `git push` or deploy scripts.
- **Network tools** like `curl` with 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](https://herdbell.com/blog/approve-claude-code-permissions).

## 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.

## Related
- [Herdbell: pricing](https://herdbell.com/#pricing)
- [All posts](https://herdbell.com/blog)
- [How to stop Claude Code and Codex asking for permission every time (safely)](https://herdbell.com/blog/stop-ai-coding-agent-asking-permission)
- [How to approve Claude Code permissions without switching windows](https://herdbell.com/blog/approve-claude-code-permissions)
- [Skipping Claude Code permissions is risky: a safer way to move faster](https://herdbell.com/blog/claude-code-dangerously-skip-permissions-alternative)
- [Who should approve an AI coding agent's permissions, and how to prove who did](https://herdbell.com/blog/who-approves-ai-agent-permissions)
