Skip to contentমূল লেখায় যান

Part 03পর্ব 03 · Getting Started

Permission Modes

Before Claude reads a test log, edits a test suite, or runs a query on a shared database, decide how much it can do without asking you. Permission modes and permission rules make that decision for Claude Code.

11 min read11 মিনিটে পড়া যায় · 8 sections8টি সেকশন · 6 sources6টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Six modes, one tool callছয়টা মোড, একটা টুল কল

Send the same four calls through each mode and see ask, run, or deny. Then add a deny rule.একই চারটা কল প্রতিটা মোডে পাঠান আর দেখুন জিজ্ঞেস, চলা, না বাতিল। তারপর একটা deny রুল যোগ করুন।

2 min2 মিনিট8 steps8টি ধাপ
  • Asks youজিজ্ঞেস করে2 / 4
  • Runsচলে2 / 4
  • Deniedবাতিল0 / 4
youআপনিClaude CodeClaude CodeManualম্যানুয়াল⏸ manual mode on⏸ ম্যানুয়াল মোড চালুRead notes.mdপড়া notes.mdrunsচলে✓Edit login.spec.tsএডিট login.spec.tsasks you firstআগে জিজ্ঞেস করে?Run npm testচালান npm testasks you firstআগে জিজ্ঞেস করে?Read ./.envপড়া ./.envrunsচলে✓Permission modeপারমিশন মোডManualম্যানুয়ালAccept editsএডিট গ্রহণPlanপ্ল্যানAutoঅটোDon't askজিজ্ঞেস নয়Bypassবাইপাসno deny ruleকোনো deny রুল নেই

You’ll learnআপনি শিখবেন

  • What each of the six modes runs without askingছয়টা মোডের কোনটা প্রশ্ন ছাড়া কী চালায়
  • Why dontAsk suits locked-down CIlocked-down CI-তে dontAsk কেন কাজের
  • Why bypassPermissions needs a containerbypassPermissions-এর জন্য কেন container লাগে
  • Deny rules block in every modedeny রুল সব মোডে আটকায়
  • CLAUDE.md cannot change what is allowedCLAUDE.md অনুমতি বদলাতে পারে না

What a permission mode is

A permission mode sets which actions Claude can take in a session without asking you first. Source 1সোর্স 1 Claude Code has six modes: Source 1সোর্স 1

ModeWhat runs without askingStatus bar
default (Manual)Reads only Source 1সোর্স 1⏸ manual mode on
acceptEditsReads, file edits, and common filesystem commands (mkdir, touch, mv, cp, etc.) Source 1সোর্স 1⏵⏵ accept edits on
planReads and read-only shell commands; the classifier approves other commands when auto mode is available Source 1সোর্স 1⏸ plan mode on
autoEverything, with background safety checks Source 1সোর্স 1⏵⏵ auto mode on
dontAskReads and pre-approved tools; anything that would prompt is denied Source 1সোর্স 1⏵⏵ don't ask on
bypassPermissionsEverything Source 1সোর্স 1⏵⏵ bypass permissions on

Suggestion: pick the mode by the risk of the task

This is the tutorial's suggestion. Use plan to read requirements or an unfamiliar test suite. Use acceptEdits while you change test files and review each change with git diff. Use dontAsk with an allowlist in CI. Keep bypassPermissions for throwaway containers.

সহজ English

A permission mode controls what Claude can do in a session before it asks you. Source 1সোর্স 1 Claude Code has six modes: Source 1সোর্স 1

  • default (Manual): only reads run without a question.
  • acceptEdits: reads, file edits, and common file commands, such as mkdir, touch, mv, and cp, run without a question.
  • plan: reads and read-only shell commands run. When auto mode is available, the classifier approves other commands.
  • auto: everything runs, and safety checks run in the background.
  • dontAsk: reads and pre-approved tools run. Claude Code denies each action that would ask you.
  • bypassPermissions: everything runs.

The tutorial suggests that you choose the mode by the risk of the task. Use plan to read requirements or an unknown test suite. Use acceptEdits to change test files, and check each change with git diff. Use dontAsk with an allowlist in CI. Use bypassPermissions only in throwaway containers.

বাংলা ব্যাখ্যা

Permission mode ঠিক করে, একটি session-এ Claude আপনাকে জিজ্ঞেস না করে কোন কোন কাজ করতে পারবে। Source 1সোর্স 1 Claude Code-এ ছয়টি mode আছে: Source 1সোর্স 1

  • default (Manual): শুধু read-এর কাজ জিজ্ঞেস ছাড়া চলে।
  • acceptEdits: read, file edit এবং সাধারণ filesystem command (mkdir, touch, mv, cp ইত্যাদি) জিজ্ঞেস ছাড়া চলে।
  • plan: read এবং read-only shell command চলে। auto mode available থাকলে অন্য command-গুলো classifier approve করে।
  • auto: সব কাজ জিজ্ঞেস ছাড়া চলে, আর background-এ safety check চলে।
  • dontAsk: read এবং আগে থেকে approve করা tool চলে। যে কাজে prompt আসত, Claude Code সেটি deny করে।
  • bypassPermissions: সব কাজ জিজ্ঞেস ছাড়া চলে।

এই tutorial-এর পরামর্শ: task-এর risk দেখে mode বেছে নিন। requirement বা অচেনা test suite পড়তে plan ব্যবহার করুন। test file বদলানোর সময় acceptEdits ব্যবহার করুন এবং প্রতিটি পরিবর্তন git diff দিয়ে দেখুন। CI-তে allowlist সহ dontAsk ব্যবহার করুন। bypassPermissions শুধু throwaway container-এর জন্য রাখুন।

The six modes

Manual (default)

The CLI, claude --help, the VS Code and JetBrains extensions, and the desktop app call this mode Manual. Its config value is default. Source 1সোর্স 1 You can also pass manual as an alias, for example claude --permission-mode manual or "defaultMode": "manual". Source 1সোর্স 1 The manual alias needs Claude Code v2.1.200 or later. Source 2সোর্স 2

In Manual mode, Claude Code asks before most actions that edit files, run shell commands, or reach the network. Source 1সোর্স 1

Accept edits (acceptEdits)

What runs. acceptEdits runs reads, file edits, and common filesystem commands without a prompt. The filesystem commands include mkdir, touch, mv, cp, rm, rmdir, and sed, but only for paths inside the working directory or additionalDirectories. Source 1সোর্স 1

What still prompts. These actions still prompt in acceptEdits: paths outside that scope, writes to protected paths, rm and rmdir on a critical path, and all other Bash commands except the built-in read-only set. Source 1সোর্স 1

Protected paths. Protected directories include .git, .vscode, .idea, .husky, .devcontainer, and .claude (with some exceptions). Protected files include .gitconfig, shell rc files, .npmrc, .mcp.json, and .claude.json. Source 1সোর্স 1 permissions.allow rules do not pre-approve writes to protected paths. Source 1সোর্স 1

Plan (plan)

Plan mode tells Claude to research and propose changes without making them. Claude reads files, runs shell commands to explore, and writes a plan, but does not edit your source. Source 1সোর্স 1

In plan mode, shell commands outside the built-in read-only set prompt for approval. If auto mode is available and the useAutoModeDuringPlan setting is on (the default), the auto mode classifier reviews those commands instead of you. Source 1সোর্স 1

Common mistake: plan mode runs no commands

Plan mode does run shell commands to explore. It does not edit your source until you approve the plan. Source 1সোর্স 1

Plan mode with bypass permissions available

In interactive terminal sessions with bypass permissions available, Claude Code does not enforce plan mode's blocks. Claude is still told to plan without edits, but a file edit or shell command that it tries during planning runs without a prompt. Source 1সোর্স 1 Explicit ask rules and rm or rmdir on a critical path still prompt. Source 1সোর্স 1 Plan mode keeps its blocks in non-interactive runs with -p. Source 1সোর্স 1

Approving the plan. When the plan is ready, Claude Code asks you to approve it. The options are "Yes, and use auto mode", "Yes, manually approve edits", and "No, keep planning". Approval exits plan mode. If auto mode is not available, the first option reads "Yes, auto-accept edits". Press Ctrl+G to open the plan in your text editor. Source 1সোর্স 1

Example: ask for a test plan for a payment module before Claude writes any test.

/plan Read src/payment.js and propose unit tests for refunds, including negative amounts and currency rounding

/plan enters plan mode from the prompt. With a description, it also starts that task. Source 3সোর্স 3

সহজ English

Claude Code has six permission modes. A mode decides when Claude Code asks you first.

Manual (default): Claude Code asks before most actions. These actions edit files, run shell commands, or use the network. Source 1সোর্স 1 A shell command is a command typed in a terminal.

You can also write manual instead of default. This needs Claude Code v2.1.200 or later. Source 2সোর্স 2

Accept edits (acceptEdits): Claude edits files without asking. It also runs common file commands without asking. Source 1সোর্স 1 This works only inside the working directory or additionalDirectories. Source 1সোর্স 1

Claude Code still asks in these cases:

Plan (plan): Claude reads files, explores, and writes a plan. It does not edit your source. Source 1সোর্স 1 Approving the plan ends plan mode. Source 1সোর্স 1 Type /plan at the prompt to start plan mode. Source 3সোর্স 3

বাংলা ব্যাখ্যা

Manual (default): file edit, shell command চালানো বা network-এ যাওয়ার বেশিরভাগ কাজের আগে Claude Code আপনাকে জিজ্ঞেস করে। Source 1সোর্স 1 default-এর বদলে manual লিখতে পারেন; এর জন্য Claude Code v2.1.200 বা তার পরের version লাগে। Source 2সোর্স 2

Accept edits (acceptEdits): working directory বা additionalDirectories-এর ভেতরে Claude জিজ্ঞেস ছাড়া file edit করে এবং সাধারণ filesystem command চালায়। .git বা .claude-এর মতো protected path-এ write করার আগে, আর built-in read-only set-এর বাইরের Bash command-এর আগে, এখনও prompt আসে। Source 1সোর্স 1

Plan (plan): Claude file পড়ে, explore করে এবং একটি plan লেখে, কিন্তু আপনার source edit করে না। plan approve করলে plan mode শেষ হয়। Source 1সোর্স 1 /plan দিয়ে prompt থেকে plan mode-এ যাওয়া যায়। Source 3সোর্স 3

Auto (auto)

In auto mode, a second model, the classifier, reviews actions instead of you. Source 1সোর্স 1 Auto mode is available on all plans. Source 1সোর্স 1

Auto mode needs a supported model: Source 1সোর্স 1

  • On the Anthropic API, Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed): Opus 4.6 or later, Sonnet 4.6 or later, Haiku 5.5, or a Fable model.
  • On Bedrock, Agent Platform, Foundry, and signed-in Claude apps gateway sessions: only Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, or Fable.
  • Older models, including Sonnet 4.5, Opus 4.5, Haiku 4.5, and claude-3 models, are not supported on any provider.

Auto mode is not a review

The docs say: "Auto mode reduces permission prompts but does not guarantee safety. Use it for tasks where you trust the general direction, not as a replacement for review on sensitive operations." Source 1সোর্স 1

By default, auto mode blocks these actions: Source 1সোর্স 1

  • curl | bash
  • Sending sensitive data out
  • Production deploys
  • Force push
  • Mass deletion on cloud storage
  • Granting IAM permissions
  • git reset --hard
  • Merging a pull request that nobody approved

By default, it allows these actions: Source 1সোর্স 1

  • Local file operations in the working directory
  • Installing dependencies from lock files and manifests
  • Read-only HTTP requests
  • Pushes to any branch of the current repository, except branches whose names mark a deploy target, such as production or gh-pages

To print the full default rules as JSON, run claude auto-mode defaults. Source 2সোর্স 2

If the classifier blocks an action 3 times in a row or 20 times in total, auto mode pauses and Claude Code goes back to prompts. You cannot change these limits. Source 1সোর্স 1

On Team and Enterprise, admins can turn auto mode off with permissions.disableAutoMode: "disable". Source 1সোর্স 1

Don't ask (dontAsk)

dontAsk runs reads and pre-approved tools. Anything that would prompt is denied. The docs recommend it for locked-down CI and scripts. Source 1সোর্স 1

dontAsk also denies explicit ask rules, AskUserQuestion, and rm or rmdir on a critical path such as rm -rf / or rm -rf ~, even when an allow rule matches. Source 1সোর্স 1

Example from the docs: run the test suite in CI with an exact allowlist. Source 1সোর্স 1

claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"

Bypass permissions (bypassPermissions)

bypassPermissions disables permission prompts and safety checks, so tool calls run immediately, including writes to protected paths. Source 1সোর্স 1

Use bypassPermissions only in isolation

Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system. Source 1সোর্স 1 bypassPermissions offers no protection against prompt injection or unintended actions. If you want fewer prompts with safety checks, use auto. Source 1সোর্স 1

  • --dangerously-skip-permissions is the same as --permission-mode bypassPermissions. Source 1সোর্স 1
  • You cannot enter bypassPermissions from a session that you started without it. Source 1সোর্স 1
  • Even in this mode, explicit ask rules, rm or rmdir on a critical path, and tools that need user input still prompt. Source 1সোর্স 1
  • On Linux and macOS, bypass mode refuses to run as root or under sudo, with the error --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons. Run Claude Code as a non-root user, for example in a dev container. Source 1সোর্স 1
  • Admins can block the mode with permissions.disableBypassPermissionsMode: "disable". Source 1সোর্স 1

সহজ English

Auto (auto): a second model reviews actions instead of you. This second model is called the classifier. Source 1সোর্স 1 Auto mode needs a supported model. Source 1সোর্স 1

By default, auto mode blocks risky actions. Two examples are force push and git reset --hard. Source 1সোর্স 1 Auto mode does not guarantee safety. Source 1সোর্স 1

Don't ask (dontAsk): Claude Code denies every action that would ask you. Use it for locked-down CI. Source 1সোর্স 1 CI means the automatic runs of your tests.

Bypass permissions (bypassPermissions): permission prompts and safety checks are off. Source 1সোর্স 1 Use it only in an isolated container or VM. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Auto (auto): আপনার বদলে একটি দ্বিতীয় model, অর্থাৎ classifier, action-গুলো review করে। এর জন্য একটি supported model লাগে। ডিফল্ট হিসেবে এটি force push বা git reset --hard-এর মতো ঝুঁকিপূর্ণ কাজ block করে। Auto mode safety-র guarantee দেয় না। Source 1সোর্স 1

Don't ask (dontAsk): যে কাজে prompt আসত, Claude Code সেটি deny করে। Docs এটি locked-down CI-র জন্য recommend করে। Source 1সোর্স 1

Bypass permissions (bypassPermissions): permission prompt এবং safety check বন্ধ থাকে। এটি শুধু container বা VM-এর মতো isolated environment-এ ব্যবহার করুন। Source 1সোর্স 1

Which mode you start in

Claude Code picks the starting mode in this order: Source 1সোর্স 1

  1. --permission-mode or --dangerously-skip-permissions on the command line
  2. permissions.defaultMode in a settings file
  3. The built-in default

With Claude Code v2.1.283 or later, auto is the built-in starting mode for interactive terminal and VS Code sessions. Source 1সোর্স 1 Claude Code starts in Manual if auto mode is not available to the session. Source 1সোর্স 1 This applies when the flag, a settings file, or the built-in default selects auto. Source 1সোর্স 1

claude -p and the Agent SDK start in Manual (default) when you set no permission mode. This applies from Claude Code v2.1.302 or later. Before v2.1.302, these runs could start in auto in sessions that did not fetch feature flags, such as on a third-party provider or with telemetry off. Source 1সোর্স 1

Always set the mode in CI

A -p run where nothing sets a permission mode starts in Manual from v2.1.302. Calls that need approval are denied, and the run cannot ask you. Pass the mode you want, plus an allowlist. Source 1সোর্স 1

To set your own default, add permissions.defaultMode to ~/.claude/settings.json: Source 1সোর্স 1

{
  "permissions": {
    "defaultMode": "default"
  }
}

A project can set plan in .claude/settings.json to make plan mode the default for its terminal sessions. Source 1সোর্স 1 A value of "auto" or "bypassPermissions" in .claude/settings.json or .claude/settings.local.json does not take effect. To default to auto, set it in ~/.claude/settings.json. Source 1সোর্স 1

সহজ English

Claude Code picks the mode to start in. It checks these places in this order: Source 1সোর্স 1

  1. The command-line flag.
  2. permissions.defaultMode in a settings file.
  3. The built-in default.

From Claude Code v2.1.283, the built-in start mode is auto. This is for interactive terminal and VS Code sessions. Source 1সোর্স 1 If auto mode is not available to the session, Claude Code starts in Manual. Source 1সোর্স 1

claude -p and the Agent SDK work differently. From v2.1.302 they start in Manual (default) when no mode is set. Before v2.1.302 they could start in auto in some sessions. Source 1সোর্স 1

So always set the mode in CI. From v2.1.302, a -p run with no mode starts in Manual and denies calls that need approval. Source 1সোর্স 1

To set your own default, add permissions.defaultMode to ~/.claude/settings.json. Source 1সোর্স 1

A project can set plan in .claude/settings.json. Source 1সোর্স 1 The value "auto" or "bypassPermissions" in .claude/settings.json or .claude/settings.local.json has no effect. Source 1সোর্স 1

বাংলা ব্যাখ্যা

Claude Code শুরুর mode এই ক্রমে বেছে নেয়: প্রথমে command line-এর --permission-mode বা --dangerously-skip-permissions, তারপর settings file-এর permissions.defaultMode, তারপর built-in default। Source 1সোর্স 1

Claude Code v2.1.283 বা তার পরের version-এ interactive terminal এবং VS Code session-এর built-in শুরুর mode হলো auto। শুরুর mode auto হলেও session-এ auto mode available না থাকলে Claude Code Manual mode-এ শুরু হয়। Source 1সোর্স 1

v2.1.302 বা তার পরের version-এ claude -p এবং Agent SDK কোনো mode সেট না করলে Manual (default) mode-এ শুরু হয়; তার আগের version-এ কিছু session-এ এরা auto-তে শুরু হতে পারত। Source 1সোর্স 1 তাই CI-তে সবসময় নিজে mode দিন। Source 1সোর্স 1

নিজের default ঠিক করতে ~/.claude/settings.json-এ permissions.defaultMode যোগ করুন। কোনো project তার .claude/settings.json-এ plan দিতে পারে। কিন্তু .claude/settings.json বা .claude/settings.local.json-এ "auto" বা "bypassPermissions" দিলে তা কাজ করে না। auto default করতে এটি ~/.claude/settings.json-এ দিন। Source 1সোর্স 1

Switch modes

In the CLI

Press Shift+Tab to cycle through the modes. From auto, the first press switches to default, and the cycle then runs default → acceptEdits → plan. Source 1সোর্স 1

  • auto joins the cycle when it is available. Source 1সোর্স 1
  • bypassPermissions joins the cycle only when you start with --permission-mode bypassPermissions, --dangerously-skip-permissions, --allow-dangerously-skip-permissions, or defaultMode: "bypassPermissions" in user, --settings, or managed settings. Source 1সোর্স 1
  • --allow-dangerously-skip-permissions adds bypassPermissions to the cycle without starting in it. Source 2সোর্স 2
  • dontAsk never joins the cycle. Start it with --permission-mode dontAsk. Source 1সোর্স 1

To start in a mode, pass --permission-mode. The flag also works with -p. Source 1সোর্স 1

claude --permission-mode plan

The flag accepts default, acceptEdits, plan, auto, dontAsk, bypassPermissions, or manual as an alias for default. Source 2সোর্স 2

In VS Code

In VS Code, use the mode indicator at the bottom of the prompt box to switch modes. Source 1সোর্স 1

VS Code labelMode
Manualdefault Source 1সোর্স 1
Edit automaticallyacceptEdits Source 1সোর্স 1
Planplan Source 1সোর্স 1
Autoauto Source 1সোর্স 1
Bypass permissionsbypassPermissions Source 1সোর্স 1

To set the starting mode, set claudeCode.initialPermissionMode to default, manual, acceptEdits, plan, or bypassPermissions. The setting does not accept auto. To start in Auto, leave the setting unset and pick Auto once. Source 1সোর্স 1

The extension does not read a project's .claude/settings.json for the starting mode. Bypass needs the "Allow dangerously skip permissions" toggle in the extension settings. Source 1সোর্স 1

In JetBrains IDEs

The JetBrains plugin runs Claude Code in the IDE terminal. Press Shift+Tab to cycle, or pass --permission-mode when you start Claude Code. Source 1সোর্স 1

JetBrains: IDE config files can run code

In acceptEdits mode, Claude may be able to modify IDE configuration files that your IDE can run automatically. The JetBrains docs suggest that you consider Manual mode for edits. Source 5সোর্স 5

সহজ English

In the CLI, press Shift+Tab to go through the modes. The order is default → acceptEdits → plan. Source 1সোর্স 1

Some modes join this cycle only in certain cases:

To start in a mode, use --permission-mode. One example is claude --permission-mode plan. The flag also works with -p. Source 1সোর্স 1

In VS Code, use the mode indicator at the bottom of the prompt box. Source 1সোর্স 1 To set the start mode, use claudeCode.initialPermissionMode. This setting does not accept auto. Source 1সোর্স 1

In JetBrains IDEs, press Shift+Tab. You can also use --permission-mode when you start Claude Code. Source 1সোর্স 1

Be careful with acceptEdits in JetBrains. Claude may change IDE configuration files. Your IDE can run these files automatically. Source 5সোর্স 5 The JetBrains docs suggest Manual mode for edits. Source 5সোর্স 5

বাংলা ব্যাখ্যা

CLI-তে Shift+Tab চাপলে mode-গুলো পালাক্রমে আসে: default → acceptEdits → plan। Source 1সোর্স 1 auto mode available থাকলে auto এই cycle-এ যোগ হয়। bypassPermissions যোগ হয় শুধু তখন, যখন আপনি bypass-এর কোনো flag বা setting দিয়ে শুরু করেন, যেমন --dangerously-skip-permissions দিয়ে। dontAsk কখনও cycle-এ আসে না; এটি --permission-mode dontAsk দিয়ে শুরু করুন। Source 1সোর্স 1

কোনো mode-এ শুরু করতে --permission-mode দিন, যেমন claude --permission-mode plan। এই flag -p-এর সাথেও কাজ করে। Source 1সোর্স 1

VS Code-এ prompt box-এর নিচের অংশে থাকা mode indicator দিয়ে mode বদলান। শুরুর mode ঠিক করতে claudeCode.initialPermissionMode ব্যবহার করুন; এই setting auto নেয় না। Source 1সোর্স 1

JetBrains IDE-তে Shift+Tab চাপুন, অথবা Claude Code শুরু করার সময় --permission-mode দিন। Source 1সোর্স 1 সাবধান: acceptEdits mode-এ Claude হয়তো এমন IDE configuration file বদলাতে পারে, যা আপনার IDE নিজে থেকে চালাতে পারে। JetBrains docs edit-এর জন্য Manual mode বিবেচনা করার পরামর্শ দেয়। Source 5সোর্স 5

Allow, ask, and deny rules

Permission rules work next to the mode. There are three types: Source 6সোর্স 6

  • Allow rules let Claude Code use a tool without manual approval.
  • Ask rules make Claude Code ask you to confirm.
  • Deny rules block the tool.

Claude Code checks the rules in the order deny, ask, allow. The first match decides the outcome. Source 6সোর্স 6 So an allow rule cannot make an exception to a deny rule. Source 6সোর্স 6

A rule has the format Tool or Tool(specifier), for example Bash(npm run build), Read(./.env), or WebFetch(domain:example.com). A bare tool name matches all uses of the tool. Source 6সোর্স 6

Example: rules for a test project.

RuleTypeEffect
Read(./.env)denyClaude cannot read the file with test credentials
Bash(npm test)allowClaude runs the test suite without a prompt
Bash(git diff *)allowClaude runs git diff with any arguments without a prompt

The space before the star. In Bash(git diff *), the space before * is important. It is part of the rule. The docs give this example: Bash(ls *) does not match lsof, but Bash(ls*) does. Source 6সোর্স 6 By the same logic, Bash(git diff*) has no space and also matches git diff-index. The docs also warn that Bash patterns that try to constrain command arguments are fragile. Source 6সোর্স 6

Commands without a prompt. Some commands run without a prompt in every mode: ls, cat, echo, pwd, head, tail, grep, find, wc, which, diff, stat, du, cd, and read-only forms of git. You cannot configure this set. To change it, add an ask or deny rule. Source 6সোর্স 6

Where rules live

  • Settings files keep rules under permissions.allow, permissions.ask, and permissions.deny. Rules follow the same settings precedence as all other settings, with managed settings highest. Source 6সোর্স 6 The Settings page lists the settings files.
  • /permissions shows and edits the rules, with the settings file each rule comes from. Its alias is /allowed-tools. Source 3সোর্স 3Source 6সোর্স 6
  • You can open /permissions while Claude works. The change applies from Claude's next tool call (Claude Code v2.1.234 or later). Source 6সোর্স 6
  • --allowedTools and --disallowedTools set rules for one run. A bare tool name in --disallowedTools removes the tool from Claude's context. Source 2সোর্স 2

Rules beat modes and instructions

  • Deny rules block in every mode, including bypassPermissions. Allow rules have no effect in bypassPermissions. Source 1সোর্স 1
  • If a tool is denied at any settings level, no other level can allow it, and --allowedTools cannot allow it either. Source 6সোর্স 6
  • Claude Code enforces the rules, not the model. Instructions in your prompt or CLAUDE.md shape what Claude tries to do, but they do not change what Claude Code allows. Source 6সোর্স 6
  • A PreToolUse hook cannot bypass deny or ask rules. A hook that exits with code 2 stops the tool call before Claude Code checks the permission rules. Source 6সোর্স 6 See Hooks.

সহজ English

Rules work together with the mode. There are three types. An allow rule lets a tool run without approval. An ask rule makes Claude Code ask you. A deny rule blocks the tool. Source 6সোর্স 6

Claude Code checks deny rules first, then ask rules, then allow rules. The first rule that matches decides. Thus an allow rule cannot make an exception to a deny rule. Source 6সোর্স 6

A rule looks like Tool or Tool(specifier), for example Read(./.env) or Bash(npm test). In Bash(git diff *), keep the space before *. The space is part of the rule: Bash(ls *) does not match lsof, but Bash(ls*) does. Source 6সোর্স 6

Settings files keep rules under permissions.allow, permissions.ask, and permissions.deny. Use /permissions to see and edit them. Source 6সোর্স 6

Deny rules block in every mode, also in bypassPermissions. Source 1সোর্স 1 Claude Code enforces the rules, not the model. Text in your prompt or in CLAUDE.md does not change what Claude Code allows. Source 6সোর্স 6

বাংলা ব্যাখ্যা

Permission rule mode-এর পাশাপাশি কাজ করে। rule তিন রকম। Allow rule থাকলে tool approval ছাড়া চলে। Ask rule থাকলে Claude Code আপনার confirm চায়। Deny rule tool-টি block করে। Source 6সোর্স 6

Claude Code rule-গুলো এই ক্রমে দেখে: deny, ask, allow। প্রথম যে rule মেলে, সেটিই ফল ঠিক করে। তাই allow rule দিয়ে deny rule-এর ব্যতিক্রম করা যায় না। Source 6সোর্স 6

Rule-এর format Tool বা Tool(specifier), যেমন Read(./.env) বা Bash(npm test)। Bash(git diff *)-এ *-এর আগের space জরুরি; space rule-এরই অংশ: Bash(ls *) lsof-এর সাথে মেলে না, কিন্তু Bash(ls*) মেলে। Source 6সোর্স 6

Settings file-এ rule থাকে permissions.allow, permissions.ask এবং permissions.deny-এর নিচে। /permissions দিয়ে rule দেখা ও বদলানো যায়। Source 6সোর্স 6

Deny rule সব mode-এ block করে, bypassPermissions-এও। Source 1সোর্স 1 Rule enforce করে Claude Code, model নয়। prompt বা CLAUDE.md-এর instruction Claude Code কী allow করে, তা বদলায় না। Source 6সোর্স 6

Run unattended safely

For CI and scripts, combine a strict mode with an exact allowlist. The docs call dontAsk useful for locked-down CI runs. Source 4সোর্স 4

When nobody can answer a prompt in a -p run, pass --permission-prompts none. Claude Code then denies anything that would prompt and tells Claude not to retry. The permission mode still decides everything else. Source 4সোর্স 4 This flag needs Claude Code v2.1.259 or later. Source 2সোর্স 2

claude -p "Run the API tests and summarize the failures" --permission-mode auto --permission-prompts none

If you must skip all checks, do it only inside isolation. The docs require a container, a VM, or the sandbox runtime, and on Linux and macOS a non-root user: Source 1সোর্স 1

claude -p "Run the full regression suite and fix flaky selectors" --dangerously-skip-permissions

Permission modes decide whether Claude asks before an action. The Bash sandbox and outer isolation decide what an action can reach once it runs. Source 1সোর্স 1 Use /sandbox to turn sandbox mode on or off. Source 3সোর্স 3

The full CI setup is on the Headless & CI page. For how subagents and plugins fit with permissions, see Subagents and Plugins & Marketplaces.

সহজ English

For CI and scripts, use a strict mode together with an exact allowlist. The docs say that dontAsk is useful for locked-down CI runs. Source 4সোর্স 4

If nobody can answer a prompt in a -p run, add --permission-prompts none. Claude Code then denies each action that would ask, and tells Claude not to try again. The permission mode still decides all other actions. Source 4সোর্স 4 This flag needs Claude Code v2.1.259 or later. Source 2সোর্স 2

If you must skip all checks, do it only inside isolation: a container, a VM, or the sandbox runtime. On Linux and macOS, use a non-root user. Source 1সোর্স 1

The permission mode decides if Claude asks before an action. The Bash sandbox and outer isolation decide what the action can reach when it runs. Source 1সোর্স 1 Use /sandbox to turn sandbox mode on or off. Source 3সোর্স 3

বাংলা ব্যাখ্যা

CI এবং script-এর জন্য একটি strict mode এবং একটি exact allowlist একসাথে ব্যবহার করুন। Docs বলে, locked-down CI run-এর জন্য dontAsk উপযোগী। Source 4সোর্স 4

-p run-এ prompt-এর উত্তর দেওয়ার কেউ না থাকলে --permission-prompts none দিন। তখন prompt আসার মতো সব কাজ Claude Code deny করে এবং Claude-কে আবার চেষ্টা না করতে বলে। বাকি সব কিছু permission mode-ই ঠিক করে। Source 4সোর্স 4 এই flag-এর জন্য Claude Code v2.1.259 বা তার পরের version লাগে। Source 2সোর্স 2

সব check বাদ দিতেই হলে তা শুধু isolation-এর ভেতরে করুন। Docs অনুযায়ী একটি container, VM বা sandbox runtime লাগবে, আর Linux ও macOS-এ একটি non-root user লাগবে। Source 1সোর্স 1

Permission mode ঠিক করে, কোনো action-এর আগে Claude জিজ্ঞেস করবে কি না। action চলার পর সেটি কী কী reach করতে পারবে, তা ঠিক করে Bash sandbox এবং বাইরের isolation। Source 1সোর্স 1 sandbox mode চালু বা বন্ধ করতে /sandbox ব্যবহার করুন। Source 3সোর্স 3

Safety checklist

This checklist is the tutorial's summary of the rules above.

Doকরুন: Plan first, then approve

Start risky or unfamiliar work in plan. Read the plan, then approve it to leave plan mode. Source 1সোর্স 1

Don'tকরবেন না: Rely on CLAUDE.md to block actions

Instructions in CLAUDE.md do not change what Claude Code allows. Use deny rules instead. Source 6সোর্স 6

Doকরুন: Deny secrets with rules

Add deny rules such as Read(./.env). Deny rules block in every mode. Source 1সোর্স 1

Don'tকরবেন না: Use auto mode as your review

Auto mode reduces prompts but does not guarantee safety. Review sensitive operations yourself. Source 1সোর্স 1

Doকরুন: dontAsk plus an allowlist in CI

Set the mode in every CI run, and allow only the commands the job needs. Source 1সোর্স 1

Don'tকরবেন না: Bypass on a laptop with production credentials

bypassPermissions offers no protection against prompt injection or unintended actions. Use it only in an isolated container or VM. Source 1সোর্স 1

সহজ English

This list is the tutorial's own summary of the rules above.

Do these things:

Do not do these things:

  • Do not use CLAUDE.md to block actions. Its instructions do not change what Claude Code allows. Use deny rules. Source 6সোর্স 6
  • Do not use auto mode as your review. It does not guarantee safety. Review sensitive operations yourself. Source 1সোর্স 1
  • Do not use bypassPermissions on a laptop with production credentials. It gives no protection against prompt injection or unintended actions. Use it only in an isolated container or VM. Source 1সোর্স 1

বাংলা ব্যাখ্যা

এটি উপরের rule-গুলোর tutorial-এর নিজের সারাংশ।

যা করবেন:

  • ঝুঁকিপূর্ণ বা অচেনা কাজ plan mode-এ শুরু করুন। plan পড়ুন, তারপর approve করে plan mode থেকে বের হন। Source 1সোর্স 1
  • Read(./.env)-এর মতো deny rule যোগ করুন। Deny rule সব mode-এ block করে। Source 1সোর্স 1
  • CI-তে allowlist সহ dontAsk ব্যবহার করুন। প্রতিটি CI run-এ mode দিন, আর শুধু job-এর দরকারি command allow করুন। Source 1সোর্স 1

যা করবেন না:

  • action block করতে CLAUDE.md-এর উপর ভরসা করবেন না। এর instruction Claude Code কী allow করে, তা বদলায় না। deny rule ব্যবহার করুন। Source 6সোর্স 6
  • auto mode-কে আপনার review হিসেবে ব্যবহার করবেন না। এটি prompt কমায়, কিন্তু safety-র guarantee দেয় না। sensitive কাজ নিজে review করুন। Source 1সোর্স 1
  • production credential থাকা laptop-এ bypassPermissions ব্যবহার করবেন না। এটি prompt injection বা অনিচ্ছাকৃত action থেকে কোনো সুরক্ষা দেয় না। এটি শুধু isolated container বা VM-এ ব্যবহার করুন। Source 1সোর্স 1
  1. [1]
    Choose a permission mode

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  2. [2]
    CLI reference

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  3. [3]
    Commands

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  4. [4]
    Run Claude Code programmatically

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  5. [5]
    JetBrains IDEs

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10

  6. [6]
    Configure permissions

    Anthropic (Claude Code docs) · accessed 2026-10-10দেখা হয়েছে: 2026-10-10