DontAsk & BypassPermissions: Automation
These modes are for advanced automation and CI/CD pipelines where a human is not present.
DontAsk Mode
Behavior: All tools that would normally prompt are automatically denied.
- Requirement: You must pre-approve tools via
permissions.allowrules. - Use Case: Headless CI runs where you only want specific tasks (like
npm test) to execute.
BypassPermissions Mode
Behavior: Skips all safety checks and prompts. Everything runs immediately.
- Protected Paths: As of v2.1.126, even protected paths are skipped.
- Catastrophic Protection: Only
rm -rf /andrm -rf ~still prompt. - DANGER: Never use this on your primary dev machine. Only use it in isolated containers or VMs.
Access
These modes cannot be toggled via Shift+Tab by default. You must start Claude Code with a flag:
claude --permission-mode dontAsk
claude --permission-mode bypassPermissions