How to enable --dangerously-skip-permissions in Claude Code (and where to run it)

Last updated

What bypass mode turns off, and what still applies

What bypass mode turns off, and what still applies
Permission promptsGap: OffTool calls execute immediately
Protected pathsGap: Writable.git, .claude/ and shell startup files
Prompt injectionGap: No protectionAnthropic: "offers no protection"
rm -rf / and rm -rf ~Partial: Still promptOr a denial; you can turn that prompt off
Explicit ask rulesStrength: Still promptOr are denied in -p runs
Deny rulesStrength: Still blockIn every mode. Allow rules have no effect
Root or sudoStrength: RefusedOn Linux and macOS: run it as a normal user
Claude Code with --dangerously-skip-permissions, per Anthropic's permission modes docs, checked on 5 November 2026.

To skip every permission prompt in Claude Code, start it with:

claude --dangerously-skip-permissions

It is the same as claude --permission-mode bypassPermissions. Claude Code refuses it as root or under sudo, so run it as a normal user. Anthropic says to run it only inside a container, a VM or its sandbox runtime. Below: every way to turn it on, the errors that keep it off, what it disables, and how to run it in a throwaway VM.

Quick answer

Where How to turn on bypass mode
Terminal (CLI flag) claude --dangerously-skip-permissions, or claude --permission-mode bypassPermissions
Default for every session "permissions": {"defaultMode": "bypassPermissions"} in your user settings, ~/.claude/settings.json. A project's .claude/settings.json can't set it
VS Code extension Turn on Allow dangerously skip permissions (allowDangerouslySkipPermissions) in the extension settings, then pick Bypass permissions in the mode indicator
Desktop app Turn on Allow bypass permissions mode in Settings > Code (Pro, Max and Ultra plans; on Team and Enterprise, organization policy decides)

Checked on 5 November 2026 against Anthropic's permission modes, CLI reference, VS Code and Desktop docs, and claude --help from Claude Code 2.1.318.

Turn it on in the terminal

There are three launch options, and all three must be passed when the session starts: you can't switch into bypass mode in a session that started without it enabled.

# Start in bypass mode
claude --dangerously-skip-permissions

# The same, with the mode named
claude --permission-mode bypassPermissions

# Start in another mode, and keep bypass one Shift+Tab away
claude --permission-mode plan --allow-dangerously-skip-permissions

--allow-dangerously-skip-permissions "adds the permission mode to the cycle without activating it". Press Shift+Tab during the session to cycle modes: bypass sits after plan. When it is on, the status bar shows ⏵⏵ bypass permissions on.

The first time you start an interactive session in this mode, Claude Code shows a warning and asks you to accept responsibility. If you accept, it writes skipDangerousModePermissionPrompt: true to ~/.claude/settings.json and doesn't ask again; if you decline, it exits.

For a one-shot run with no prompts at all:

claude -p "fix the failing tests and commit" --dangerously-skip-permissions

Anthropic's own table lists that exact pattern for "fully unattended" work, with one requirement next to it: "a container, VM, or the sandbox runtime". The CLI's help says the same thing more bluntly: "Recommended only for sandboxes with no internet access."

Make it the default

Put this in ~/.claude/settings.json:

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

Where it works and where it doesn't:

  • User settings (~/.claude/settings.json), a file passed with --settings, and managed settings: honored.
  • Project settings (.claude/settings.json) and local settings (.claude/settings.local.json): ignored for this value. Anthropic's docs: it "doesn't take effect either, and the session starts in Manual mode". So a repository you clone can't turn your prompts off.
  • The Desktop app reads the same settings files as the CLI for new local sessions.
  • Cloud sessions don't honor defaultMode: "bypassPermissions" from your settings.

A safer pattern for a machine you also use for other work: leave the default alone, and alias the flag only inside the VM or container you run agents in.

VS Code extension and Desktop app

VS Code. Open the settings (Cmd+, on macOS, Ctrl+, on Windows and Linux), go to Extensions > Claude Code, and turn on Allow dangerously skip permissions. Then pick Bypass permissions in the mode indicator under the prompt box. To start every new conversation in it, set claudeCode.initialPermissionMode to bypassPermissions in your VS Code user settings; the extension ignores workspace values, and never reads a project's .claude/settings.json for the starting mode. Without the toggle, the mode doesn't appear, and a bypassPermissions value starts the conversation in Manual instead.

Desktop app. On Pro, Max and Ultra plans, turn on Allow bypass permissions mode in Settings > Code (or Settings > Claude Code). On Team and Enterprise plans, organization policy controls it. Bypass permissions then appears in the mode selector. The Code tab has its own confirmation for this mode. Bypass permissions isn't available in cloud sessions.

It won't turn on: common errors

  • --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons. On Linux and macOS, Claude Code refuses bypass mode as root or under sudo. The check is skipped inside a sandbox it recognizes. Fix: run as a normal user. In a container, set a non-root user (remoteUser in a dev container); in a flockvm VM, the Agent image logs you in as user, which is not root.
  • The project's settings file is ignored. defaultMode: "bypassPermissions" only works from user, --settings or managed settings (above). The session starts in Manual mode instead.
  • The mode is missing from the Shift+Tab cycle. The session started without any of the three flags or the default. Restart it with one.
  • Your organization disabled it. permissions.disableBypassPermissionsMode: "disable" in managed settings blocks the mode for everyone. Ask your administrator; there is no local override.
  • --restricted sessions. Claude Code refuses bypassPermissions in a session started with --restricted (v2.1.248 or later).
  • VS Code shows Manual. The Allow dangerously skip permissions toggle is off.

What it turns off, and what still applies

Anthropic's wording: bypassPermissions "disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths" such as .git, .claude/ and shell startup files.

What still applies, per the permission modes docs:

  • Deny rules still block "in every mode, including bypassPermissions". Allow rules have no effect. So deny rules for git push --force or your production CLI keep working.
  • Explicit ask rules still prompt, or are denied in -p runs.
  • Recognized rm and rmdir removals of critical paths (rm -rf /, rm -rf ~) still get a prompt or a denial, though you can turn that prompt off. A command the check doesn't recognize gets no special handling.
  • Nothing against prompt injection. Anthropic: bypassPermissions "offers no protection against prompt injection or unintended actions".

Is auto mode a safer alternative?

Often, on your own machine. In auto mode, "a separate classifier model reviews actions before they run", blocking actions that go beyond your request or look driven by hostile content. Anthropic adds that it "does not guarantee safety". The difference that matters: auto mode is a per-action check, bypass mode is no check. Anthropic recommends an isolation boundary with auto mode and requires one with bypass: "Always run --dangerously-skip-permissions sessions inside a container, a VM, or the sandbox runtime" (sandbox environments). Start auto mode with claude --permission-mode auto.

What can go wrong

Without prompts, whatever the agent can reach, it can change or send:

  1. Destruction. A wrong path, a bad glob, a git reset --hard. In issue #10077 (October 2025), a user reports that Claude Code ran a recursive delete from / that removed every file in their home directory except dotfiles, and adds that they did not run it with --dangerously-skip-permissions. Bypass mode removes the prompt where you could have said no.
  2. Secret exfiltration. The agent can read environment variables, .env files, ~/.ssh, ~/.aws/credentials and its own login (~/.claude/.credentials.json on Linux). One curl or git push sends them out.
  3. Prompt injection. Issues, READMEs, web pages and MCP results can carry instructions, and nothing in bypass mode filters them.
  4. Persistence. A write to .git/hooks, ~/.bashrc, .mcp.json or .claude/ runs code later, outside the session.

The first is about what the agent can touch on disk. The other three are about the network and where secrets live.

Run it in a disposable VM

The simplest boundary is a machine you can throw away: the agent can wreck it, not your laptop. On flockvm, each agent gets its own Firecracker microVM in France, with Claude Code preinstalled. Five steps:

  1. Create a VM from your laptop. The Agent image is the default.

    flockvm vm create claude-1 --size default --wait
    
  2. SSH in. You land as user, who has passwordless sudo but is not root, so bypass mode is allowed.

    flockvm vm ssh claude-1
    
  3. Sign Claude Code in, inside the VM. Run claude and use /login: press c to copy the login URL, open it in your laptop's browser, and paste the code back at Paste code here if prompted. Or use an organization API key: set ANTHROPIC_API_KEY from the Claude Console, ideally in a workspace with a spend limit, or turn on Agent credentials in your organization's environment so new VMs get the key. Don't copy credentials from your laptop into the VM.

  4. Clone and run. Clone with a deploy key scoped to one repository, then start the agent in tmux so it survives a dropped connection:

    tmux new -s claude
    claude --dangerously-skip-permissions
    
  5. Pause or delete it when the run is done, and revoke the key if anything looked wrong:

    flockvm vm pause claude-1      # keep it, memory included
    flockvm vm delete claude-1 --yes
    

The full walkthrough, with the deploy key and the tmux settings, is in the Claude Code docs. You can click through the dashboard first in the demo.

What this protects, and what it doesn't. Your laptop, your home directory and your other projects aren't in the VM. Each agent has its own kernel and its own VM, so one agent can't reach another. But outbound IPv4 is open (except private ranges, cloud metadata, other VMs, the host and SMTP port 25), and v1 has no per-VM egress allowlist and no secrets proxy. So the login or key you put in the VM can still leave with a followed injection: use one you can revoke. More in Claude Code in a VM.

What the agent can reach, on your laptop and in a VM

On your laptop

In a disposable VM

its own kernel

On your laptop The agent, no prompts

Without prompts, whatever the agent can reach, it can change or send. Bypass mode removes the prompt where you could have said no.

On your laptop Your files

A wrong path, a bad glob, a git reset --hard. A write to .git/hooks, ~/.bashrc, .mcp.json or .claude/ runs code later, outside the session.

On your laptop Your secrets

The agent can read environment variables, .env files, ~/.ssh, ~/.aws/credentials and its own login. One curl or git push sends them out.

On your laptop The network

Issues, READMEs, web pages and MCP results can carry instructions, and nothing in bypass mode filters them.

In a disposable VM The agent, no prompts

You land as user, who has passwordless sudo but is not root, so bypass mode is allowed. The agent can wreck the VM, not your laptop.

In a disposable VM The key in the VM

The login or key you put in the VM can still leave with a followed injection: use one you can revoke. Don't copy credentials from your laptop into the VM.

In a disposable VM The network

Outbound IPv4 is open (except private ranges, cloud metadata, other VMs, the host and SMTP port 25), and v1 has no per-VM egress allowlist and no secrets proxy.

In a disposable VM The VM

The simplest boundary is a machine you can throw away. Each agent has its own kernel and its own VM, so one agent can't reach another.

In a disposable VM Your laptop

Your laptop, your home directory and your other projects aren't in the VM.

Hatched: what an agent without prompts can change or send. The VM is flockvm's, as this section describes it; other boundaries are compared in the next section.

Which isolation layer blocks what

Four common boundaries, from what each vendor's docs say (read on 5 November 2026):

/sandbox (built-in) Dev container (Anthropic reference) Docker Sandboxes flockvm VM
Inside the boundary Bash commands only The whole Claude Code process The whole agent, in a microVM The whole agent, in a Firecracker microVM on another machine
Files outside the project Bash reads "most of the machine", ~/.ssh included, but can't write; file tools follow permission rules Not visible unless mounted Not visible unless shared Not there: your laptop isn't involved
Project files Writable Bind-mounted, so deletions reach your disk Direct mount by default, read-write; clone mode available A copy inside the VM
Network egress Allowlist proxy, but in bypass mode unlisted hosts are "allowed without a prompt" unless strictAllowlist is on Default-deny firewall that allows GitHub's ranges; DNS and SSH open to any host Deny by default; the default allowlist has "broad wildcards" Open over IPv4, except private ranges, metadata, other VMs, the host, port 25
Agent login and API keys Readable by Bash unless masked Inside the container (~/.claude) Injected by a host proxy; raw values "never enter the VM" Inside the VM: your in-VM /login or the API key you set

Three things the table says:

  • DNS and GitHub are the quiet exits. The reference dev container's init-firewall.sh (commit d945a61bc6) opens UDP 53 and TCP 22 to any host and every GitHub range, so "push this to github.com/attacker/x" goes through.
  • /sandbox alone is not enough for bypass mode. It covers shell commands only, and Anthropic says it "is not sufficient for fully unattended runs". Set sandbox.network.strictAllowlist: true, sandbox.failIfUnavailable: true and sandbox.allowUnsandboxedCommands: false if you rely on it.
  • Only a proxy keeps secrets out. Docker Sandboxes' key injection is ahead of what flockvm v1 does today.

Each option in depth, with the attempt-by-attempt comparison, is in Claude Code sandbox options.

What about Codex?

Codex has a literal --yolo flag, an alias for --dangerously-bypass-approvals-and-sandbox, which OpenAI describes as "Run every command without approvals or sandboxing". It removes more than Claude Code's flag does: Codex's own OS sandbox goes too. How to turn it on, the config keys, and what replaced --full-auto: Codex --yolo mode. To run several Codex tasks at once, each in its own box, see Codex parallel tasks.

When flockvm is the wrong pick

A local layer is the better choice for a few agents on code you trust, on a laptop with RAM to spare and a short egress allowlist: /sandbox plus auto mode covers much everyday work, and a dev container or Docker Sandboxes covers unattended runs on your machine. If you need secrets kept out of the agent's reach, Docker Sandboxes' proxy does that today and flockvm v1 doesn't.

A remote VM is the better choice when the repository isn't yours, when a mistake on your laptop would be expensive, or when you want several agents running without your machine involved: see running Claude Code agents in parallel and coding agent swarms. For a VPS versus a microVM, read Claude Code on a VPS or in a microVM; for hosted sandboxes side by side, Docker Sandboxes alternatives.

A local layer, or a remote VM?

What is your case?

A few agents on code you trust

/sandbox plus auto mode

On a laptop with RAM to spare and a short egress allowlist, a local layer is the better choice: /sandbox plus auto mode covers much everyday work.

Read that part

Unattended runs on your machine

A dev container or Docker Sandboxes

Anthropic says /sandbox "is not sufficient for fully unattended runs": a dev container or Docker Sandboxes covers them.

Read that part

Secrets kept out of the agent's reach

Docker Sandboxes

Only a proxy keeps secrets out. Docker Sandboxes' proxy does that today and flockvm v1 doesn't.

Read that part

The repository isn't yours

A remote VM

Or a mistake on your laptop would be expensive. The agent can wreck the VM, not your laptop.

Read that part

Several agents, without your machine involved

A remote VM

Each agent has its own kernel and its own VM, so one agent can't reach another.

Read that part

The cases of this section, one pick each. The four boundaries are compared in "Which isolation layer blocks what".

FAQ

What is the command for --dangerously-skip-permissions?

claude --dangerously-skip-permissions. For a one-shot run: claude -p "<prompt>" --dangerously-skip-permissions. The equivalent with the mode named is claude --permission-mode bypassPermissions.

How do I turn on bypass permissions in VS Code?

In the extension settings (Extensions > Claude Code), turn on Allow dangerously skip permissions, then pick Bypass permissions in the mode indicator. To start there every time, set claudeCode.initialPermissionMode to bypassPermissions in your user settings.

How do I turn it on in Claude Code Desktop?

Turn on Allow bypass permissions mode in Settings > Code, on Pro, Max and Ultra plans. On Team and Enterprise, your organization's policy decides.

Is YOLO mode the same as bypass permissions?

For Claude Code, yes: "YOLO mode" is the community name for --dangerously-skip-permissions. Anthropic's docs don't use the term. Codex's --yolo is a different, real flag (see Codex --yolo mode).

Why does Claude Code refuse --dangerously-skip-permissions as root?

Because an agent with no prompts and root can change anything on the machine. On Linux and macOS it refuses as root or under sudo, except inside a sandbox it recognizes. Run it as a normal user: a non-root user in your container, or user in a flockvm VM.

Can I set bypassPermissions in a project's settings.json?

No. In .claude/settings.json or .claude/settings.local.json, defaultMode: "bypassPermissions" doesn't take effect and the session starts in Manual mode. Use ~/.claude/settings.json, --settings or managed settings.

Is auto mode safer than bypass mode?

Yes, as a per-action check: a classifier reviews each action before it runs. Anthropic says it "does not guarantee safety", so it is not a boundary either. Bypass mode has no check at all, which is why Anthropic requires a container, a VM or the sandbox runtime for it.

How do I disable bypass mode for my team?

Set permissions.disableBypassPermissionsMode to "disable" in managed settings. It also works in user and project settings, but only managed settings stop people from overriding it.

Is it safe to run with internet access?

Not by itself. The CLI recommends the flag "only for sandboxes with no internet access", and every layer above leaves some exit open. With internet access, assume that anything inside the box can leak: give the agent short-lived tokens scoped to one repository, keep your laptop's files out, and throw the environment away after the run.

flockvm gives each agent its own throwaway Firecracker VM in France, billed per second, with a 7-day free trial: card required, nothing charged for 7 days. Start your 7-day free trial.

Run your agents in their own microVMs

flockvm gives each coding agent a Firecracker microVM that pauses with its memory and resumes, billed per second. France is live, and you can start with a 7-day free trial.

Start your 7-day free trial

Card required. Nothing charged for 7 days.