Dangerously Skip Permissions

Dangerously Skip Permissions

--dangerously-skip-permissions is a setting that tells Claude for a session to stop prompting you to ask for permissions.

# Interactive session with no permission prompts
claude --dangerously-skip-permissions

# One-shot headless task (no interactivity at all)
claude --dangerously-skip-permissions -p "Fix all lint errors"

Equivalent via settings.json:

{ "permissions": { "defaultMode": "bypassPermissions" } }

Why would you use it? (but shouldn't) Because you are getting annoyed that when you walk away and come back your task is not completed due to a hanging permission request. You should avoid using --dangerously-skip-permissions because as it says it's dangerous.

When should you use it?

How can you make it safer? Run within a /sandbox which will limit the amount of risk on a host machine where serious damage could be done.

Dangerous scenario: npx can download and execute arbitrary code from the internet on the fly. Even if you've carefully locked down which commands Claude can run locally, npx is essentially a trapdoor that renders those restrictions meaningless. A developer configures Claude Code with a deny rule blocking npx and enables the bubblewrap sandbox, believing these two layers together will prevent Claude from downloading and executing arbitrary code from the internet. The sandbox cannot protect you when Claude actively reasons that the sandbox is the obstacle and decides to remove it. Because --dangerously-skip-permissions auto-approves that request, the sandbox becomes something Claude can simply opt out of whenever completing a task requires it.

Related: Sandboxing, Permission Modes, Dev Containers