Skip to content
BENIBIX Learn

Don't Ask Mode

AI⌨️ Claude CodeClaude Code Concepts

Also known as dontAsk, --permission-mode dontAsk, dontAsk mode

Claude never asks. Anything not allowed up front is turned down at once.

Think of it like

It is like a party door. Only names on the list get in.

Example

Emma's CI job should only run the tests. She uses don't ask mode with one allowed command, so any other command fails at once.

Why it matters

An unattended job can never be talked into doing more than you listed.

Definition

Don't ask mode never stops to ask you. Instead, anything that would need a yes is turned down. Claude can read files in your working folders and use the tools you allowed in advance, and nothing else. Its value in settings files is dontAsk. It is made for locked-down scripts and CI jobs, where nobody is there to answer and you want an exact list of what may run.

Example code

bash
claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"
A CI run that may only read and run the tests.
Don't ask mode never asks. It turns down what you did not allow.

Common mistake

Forgetting a tool the job needs. It will not ask, it will just fail, so test the allowed list before you rely on it.

Key takeaways

  1. 1
    Never asks. Denies instead.
  2. 2
    Allow list only. Set it up front.
  3. 3
    For CI. Locked-down runs.

Compare

Learn it properly