claude --dangerously-skip-permissions, the command people call YOLO mode, starts Claude Code in bypassPermissions mode: tool calls run immediately, with no permission prompt, even when they write to protected paths. It is safe only where the session can reach nothing you would miss, such as a throwaway container or a CI runner with job-scoped secrets.

What claude --dangerously-skip-permissions turns off

Bypass permissions mode, which the flag turns on, lets Claude Code run tool calls without asking, including writes to protected paths such as .git and .claude. Deny rules, explicit ask rules and a circuit breaker on deleting the root or home directory still apply, and nothing in the mode guards against prompt injection.

Control by control, this is what running Claude Code with dangerously skip permissions changes, as Anthropic’s permission-mode reference describes it on 21 October 2026.

ControlManual mode (default)With --dangerously-skip-permissions
Prompts before edits, shell commands and network callsClaude Code asks before most of themSkipped: tool calls run immediately
Writes to protected paths such as .git, .claude, .vscode and .husky, and files such as .bashrc, .npmrc and .mcp.jsonPromptedAllowed
Allow rulesPre-approve the tools they nameNo effect
Deny rulesBlock the callStill block the call
Explicit ask rulesPromptStill prompt
Connector tools your organization set to ask, and MCP tools marked requiresUserInteractionPromptStill prompt
rm or rmdir aimed at a critical path, such as the filesystem root, your home directory or your working directoryAsks you to approve itAsks you to approve it, with a two-minute countdown in the terminal; no answer means the command is denied
An administrator can set permissions.disableBypassPermissionsMode to "disable"Bypass can’t be turned onThe mode is blocked

Every row is about what Claude Code checks before a tool call runs, and the deny and ask rows hold because Claude Code enforces those rules itself, not the model. A rule you write before turning the prompts off keeps working after, which makes it the one control worth setting first. What a normal session can already touch is a separate question, the subject of what Claude Code reaches in its default mode.

Plan mode stops being a boundary as well. In an interactive terminal session started with bypass available, Claude is still told to plan without editing, but an edit or shell command it attempts while planning runs without prompting. Anthropic’s own summary of claude --dangerously-skip-permissions is short: bypass mode “offers no protection against prompt injection or unintended actions.”

What does “bypass permissions on” mean in the Claude code?

Bypass permissions on is the label Claude Code’s status bar shows while a session runs in bypassPermissions mode, where it does not ask before editing files or running commands. The first interactive session shows a one-time warning to accept, and Anthropic says the mode belongs only in isolated containers and VMs.

The warning asks you to accept responsibility for actions taken without permission checks; Anthropic’s docs describe the dialog but do not print its full text. Accept it and Claude Code sets skipDangerousModePermissionPrompt to true in ~/.claude/settings.json, so later sessions skip it. Decline it and Claude Code exits. In settings files, Claude Code’s bypass permissions mode is spelled bypassPermissions, which is the string to look for in a configuration you inherited from someone else.

What an unattended session can reach in a live app

An unattended Claude Code session can reach whatever its machine can reach: the .env file, live keys in the shell, an MCP server’s database connection, a deploy token. With prompts off, a wrong command against any of them runs against production, not against a copy.

What the session can reachHow it gets thereWhat a wrong command does with prompts off
The project’s .env file, with the database URL and service keysIt sits in the working directory, and reading it needs no approval in any modeA script or migration run with the production URL changes live rows
Keys exported in your shell profileShell commands inherit Claude Code’s environment, secrets includedA command-line call made with a live key acts on the live account
An MCP server’s database connectionLocal MCP servers run with your full access, outside the sandboxA query the agent sends goes to the connected database
A hosting or deploy token saved by a command-line loginIt sits in a file on the machine, readable like any otherA delete or redeploy call is accepted like a CI job’s
The git history.git is inside the working directoryOld commits still hold any key that was ever committed

The rows are our reading of a typical AI-built stack rather than a vendor list. The MCP row is the one people forget: an MCP server’s live database connection runs outside Claude Code’s sandbox with your own access, so no sandbox setting narrows it.

When we audited 21 third-party apps in June and July 2026, 6 shipped a real secret. Three of the audited apps had a real secret permanently in git history: a webhook signing secret, a live AI-provider key, and a Stripe test key with its webhook secret.

We picked those apps ourselves, so they are a selected set and not a random sample, and the count describes them rather than AI-built apps at large. The point for an unattended session is simpler: with prompts off, it reads that history and that .env like any other file. A key that was ever committed is worth finding keys in the repository history before the first unattended run, and the wider exposure is one set of keys for every environment, where a development session holds the same keys production uses.

If the machine the agent runs on can reach a database or keys that real users depend on, a free audit is where we go over with you which production credentials sit within reach and what to move first. In the sprint, we separate development, staging and production variables, databases and keys, and give each of the three environments its own databases, credentials and configuration.

Claude Code YOLO mode: how to turn it on

Claude Code YOLO mode is the nickname for bypassPermissions, and there are three ways to enable it: the --dangerously-skip-permissions flag, --permission-mode bypassPermissions, or defaultMode in a settings file. The first interactive run asks you to accept a one-time warning, and on Linux and macOS the flag refuses to start as root.

To make Claude skip permissions, choose the route at launch: each one gets Claude Code to bypass permissions from the start of the session, and none can be switched on halfway through a session that started without it. The first two commands below are equivalent; the third starts in plan mode and only adds bypass to the Shift+Tab cycle, so you can switch to it later.

# Start in bypass mode, the mode people call YOLO mode
claude --dangerously-skip-permissions

# The same mode, by its name
claude --permission-mode bypassPermissions

# Start in plan mode, with bypass selectable later
claude --permission-mode plan --allow-dangerously-skip-permissions

To have Claude Code start with dangerously skip permissions by default, put defaultMode in your user settings JSON at ~/.claude/settings.json. A project’s .claude/settings.json or .claude/settings.local.json can’t do it: Claude Code ignores bypassPermissions there and starts in Manual mode.

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

To let Claude Code run without permission prompts mid session, start it with --allow-dangerously-skip-permissions: the flag puts Claude Code’s dangerously skip permissions mode in the cycle without turning it on, so you can switch to it later. Anthropic’s CLI reference lists no --yolo flag, so claude --yolo is not an official command; a shell alias with that name is your own shortcut, not a Claude Code feature.

On Linux and macOS, Claude Code refuses to start in bypass mode as root or under sudo, with this error:

--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons

The check is skipped inside a recognized sandbox. For a container, Anthropic points to its dev container configuration, which runs Claude Code as a non-root user. The one-time warning from the section above still appears the first time you start an interactive session this way.

How to dangerously skip permissions in Claude Code VS Code?

In the VS Code extension, bypass stays off the menu until you allow it, as the VS Code extension docs list. Open the extension settings with Cmd+, on Mac or Ctrl+, on Windows and Linux, go to Extensions > Claude Code, and turn on allowDangerouslySkipPermissions; Bypass permissions then appears in the mode indicator at the bottom of the prompt box. To start every new conversation in it, set claudeCode.initialPermissionMode to bypassPermissions in your VS Code user settings. Without the allow toggle, that value starts the conversation in Manual instead. The same value in a project’s .vscode/settings.json does nothing, because the extension reads that setting from user settings and ignores workspace values. The toggle’s own description says to use it only in sandboxes with no internet access, and with no setting at all the extension starts conversations in auto mode on every plan since late September 2026.

What does the “dangerously skip permissions” flag do in the Claude Code desktop app?

In the desktop app the flag becomes a mode named Bypass permissions, which Anthropic’s desktop docs call equivalent to --dangerously-skip-permissions in the CLI. On Pro and Max plans you turn it on in Settings → Claude Code under Allow bypass permissions mode, then pick it from the mode selector under the prompt box in the Code tab. On Team and Enterprise plans there is no toggle, and organization policy decides. Claude then runs without permission prompts, except for the actions no mode auto-approves, safety classifiers when it acts on external sites, and desktop actions such as deleting a session. Cloud sessions do not offer the mode at all.

Why isn’t bypass permissions working in Claude code?

When claude --dangerously-skip-permissions is not working, check these causes in this order:

  1. 01 You are root or under sudo on Linux or macOS. Claude Code refuses bypass mode there unless it runs inside a recognized sandbox.
  2. 02 The session started without bypass available. It can't be switched on later unless you launched with the flag, --permission-mode bypassPermissions, --allow-dangerously-skip-permissions or a defaultMode in user, managed or --settings settings.
  3. 03 The warning was declined or never accepted. Declining exits, and a background session started with --bg is refused bypass until you accept the dialog once in an interactive session.
  4. 04 A settings file sets permissions.disableBypassPermissionsMode to "disable". It is usually your organization's managed settings, but the key works from any scope.
  5. 05 defaultMode sits in a file that can't use it. A project's .claude/settings.json or .claude/settings.local.json starts the session in Manual mode, and a managed or project defaultMode outranks the one in ~/.claude/settings.json.
  6. 06 The session was started with --restricted, which refuses bypass mode.
  7. 07 In VS Code or the desktop app, the allow toggle is off, or on desktop Team and Enterprise plans organization policy does not allow the mode, so Bypass permissions never shows in the mode picker.

The settings order behind the fourth and fifth causes is set out in Claude Code’s permission rules, where a managed value sits above every other settings file.

Claude Code permission modes: what replaces the prompt

Claude Code permission modes decide what runs without asking: Manual prompts before most edits and commands, acceptEdits allows file edits, plan proposes without editing, auto has a classifier review actions, dontAsk runs only reads and pre-approved tools, and bypassPermissions runs everything. Since late September 2026, interactive sessions start in auto mode unless a setting picks another.

ModeWhat runs without askingWhat replaces the promptReasonable when
Manual (default)Reads onlyNothing: you approve each actionThe session can reach anything live
acceptEditsReads, file edits and common filesystem commands such as mkdir, mv and cp, inside the working directoryThe working-directory scope; outside paths and protected paths still promptYou review the diff afterward
planReads, plus classifier-approved commands when auto mode is availableThe mode itself: Claude proposes and does not edit your sourceExploring before any change
autoEverything, with background safety checksA separate classifier model that reviews actions before they runLong tasks where you trust the direction
dontAskFile reads in the working directories and pre-approved tools; anything that would prompt is deniedYour allow rules, decided in advanceCI jobs and scripts with a fixed set of commands
bypassPermissionsEverything except the actions no mode auto-approvesNothingA container or VM that holds nothing you would miss
/sandbox auto-allow, not a modeBash commands that stay inside the sandboxAn operating-system boundary on files and networkYou want fewer prompts and keep isolation

To change the mode in Claude Code, press Shift+Tab during a session to cycle through the modes, start with --permission-mode, or set permissions.defaultMode in a settings file; dontAsk never appears in the cycle, so you set it with --permission-mode dontAsk. The mode Claude Code uses when nothing picks one is auto, for interactive terminal and VS Code sessions on every plan and provider since late September 2026; earlier releases did that only on Pro, Max and Team plans. In current releases, non-interactive claude -p runs start in Manual mode when nothing sets a permission mode.

If someone on your team talks about Claude Code dangerous mode, they mean bypassPermissions, the second-to-last row. Cursor makes the same trade with its own settings, covered under Cursor’s auto-run and permission settings.

Is auto mode the same as dangerously skip permissions?

Auto mode is not the same as dangerously skip permissions. Both remove routine prompts, but auto mode has a separate classifier review actions before they run and block risky ones, such as production deploys and mass deletion on cloud storage, while bypass mode puts no review in front of the action at all.

The classifier’s default block list includes production deploys and migrations, force pushes and terraform destroy, among many more, and explicit ask rules still force a prompt. If it blocks an action 3 times in a row or 20 times in total, auto mode pauses and Claude Code goes back to prompting. Claude auto mode vs --dangerously-skip-permissions is a choice about one thing, whether anything reviews the action before it runs. Anthropic’s docs say auto mode reduces prompts but does not guarantee safety, and in our reading that cuts both ways: the classifier can stop a harmless command and pass a harmful one.

Approval fatigue is the reason auto mode exists. Anthropic’s engineering post on building it, published in March 2026, says Claude Code users approve 93% of permission prompts.

The built-in sandbox: fewer prompts without giving up the boundary

The built-in sandbox cuts prompts without removing the boundary. With /sandbox auto-allow on, Bash commands that run inside the sandbox, which limits writes to the working directory and network access to allowed hosts, run without asking, and the operating system enforces the limit on every process they start. Bypass mode removes the review and leaves the reach untouched.

On macOS the sandbox uses the built-in Seatbelt framework; on Linux and WSL2 it relies on bubblewrap and socat; on native Windows, Claude Code runs commands unsandboxed. It stays off until you run /sandbox or set sandbox.enabled to true. Its defaults are narrow on writes and wide on reads: sandboxed commands write only to the working directory, a per-user temp directory and directories you add, and the list of allowed network hosts starts empty, but reads cover most of the machine, including ~/.ssh and ~/.aws/credentials. There is no built-in credential deny list, so only the files and variables you name are protected.

Two settings matter most next to bypass mode. When a command fails in the sandbox, Claude can retry it with the dangerouslyDisableSandbox parameter, and in bypass mode that retry runs without a prompt; allowUnsandboxedCommands set to false, which the /sandbox panel shows as Strict sandbox mode, makes Claude Code ignore the parameter. In bypass mode, hosts outside your allowed domains are also let through without a prompt unless strictAllowlist is on, and that key works only from user settings, managed settings or --settings, so a cloned repository cannot set it for you.

The settings below are assembled from the keys in Claude Code’s sandboxing docs and have not been run as a test here; check each key against that page and swap in the hosts your project needs.

{
  "sandbox": {
    "enabled": true,
    "allowUnsandboxedCommands": false,
    "network": {
      "allowedDomains": ["github.com", "*.npmjs.org"],
      "strictAllowlist": true
    },
    "credentials": {
      "files": [
        { "path": "~/.aws/credentials", "mode": "deny" },
        { "path": "~/.ssh", "mode": "deny" }
      ],
      "envVars": [{ "name": "GITHUB_TOKEN", "mode": "deny" }]
    }
  }
}

Running claude --dangerously-skip-permissions inside a sandbox or a container is the combined route, and the next section covers when that is reasonable.

Is dangerously skip permissions safe? Only where nothing can be lost

Dangerously skip permissions is safe only in an environment you could lose: a disposable container or VM, or a CI runner destroyed after the job, with no production credential, no host secrets mounted, and network access limited to what the task needs. On a laptop that holds live keys it is not safe.

Railway, the hosting platform, described a case on its own blog on 29 April 2026: an AI agent “found a Railway API token stored locally on the user’s machine and used it to call volumeDelete on a production volume.” The token “was provisioned with account scoped access, the maximum access possible”, nobody had told the agent to delete a database, and the legacy API path it called made the backups “look unavailable in the UI”; Railway has since recovered the database. The post names neither the customer nor the coding tool.

The lesson we take from it is that the safety was never in a flag. It was in what the session could reach, and in whether anything stood between the agent deciding and the API call going out. Swap the tool and that holds: Cursor, or Claude Code with dangerously skip permissions, has the reach of the machine and the tokens it runs with. Whichever tool you use, an agent on a live app needs the same engineering standards for teams that build with AI.

CI and headless runs

CI is the one routine place for the flag, when the runner is thrown away after the job, its secrets are scoped to that job, and nobody is there to answer a prompt anyway. Run Claude Code non-interactively with -p (or --print), and no acceptance dialog appears:

claude -p "<task>" --dangerously-skip-permissions

Anthropic lists that form for running fully unattended inside a container, with a container, VM or the sandbox runtime required and a non-root user on Linux and macOS; in a -p run, the few calls that would still prompt are denied instead. When the job’s commands are known in advance, dontAsk is the tighter fit: it denies every call that would otherwise prompt, so only reads and your pre-approved tools run, and Anthropic calls it useful for locked-down CI runs. The flags for scripted runs are listed under Claude Code’s non-interactive mode.

The safe setup: container, credentials, staging

If you do run the flag on purpose, these five things decide how much a bad command can reach.

  • A dev container from Anthropic’s feature, added in .devcontainer/devcontainer.json, with remoteUser set to a non-root account and outbound traffic limited to the domains the session needs.
  • Nothing secret mounted into it: no ~/.ssh and no broad cloud credential file, and a short-lived token scoped to one repository where the job needs one.
  • Outside a container, Read and Edit deny rules on credential paths next to the sandbox’s credential entries. The credential entries cover sandboxed commands only, Claude’s own file tools follow the deny rules instead, and local MCP servers run outside the sandbox with your full access.
  • A staging project the agent is free to break, and a backup kept somewhere the session holds no credentials for.
  • A rules file that names the fragile paths, enforced by a deny rule, an explicit ask rule or a PreToolUse hook, plus a CI check.

For the Claude Code VS Code route to a devcontainer, add the feature, then run Dev Containers: Rebuild Container from the Command Palette, as Anthropic’s dev container guide shows; the guide also notes that Claude can still change any file in the bind-mounted workspace, which appears directly on your host. Point the agent at a staging project the agent can use instead of production, and keep the rules file and its enforcing check in the repository so the next session inherits them.

What to do if a session already broke something

Work through these in order, before anyone asks the agent to tidy up.

  1. 01 Stop the session before it tries to repair what it broke, and give it no new instructions.
  2. 02 Find a backup that lives outside whatever was deleted, and check its timestamp before you restore it.
  3. 03 Rotate every credential the session could reach, not only the one it used.
  4. 04 Write down what the agent did, in order, while the transcript still exists: Claude Code keeps session transcripts as .jsonl files under ~/.claude/projects/.

For a lost database, start with the first hour after a deleted production database. For keys, follow rotating a key that may have leaked, beginning with the ones the session could read.

How the sprint handles this

A rules file tells an agent what to leave alone, and a CI check notices when a change ignores it. In the sprint, deliverable 10.8 provides CLAUDE.md, AGENTS.md, Cursor rules, or equivalents describing conventions and protected patterns, and adds CI checks for enforceable rules, so a later session that undoes a protected pattern can fail a check before it reaches production. We verify it by reviewing the guidance and demonstrating CI catching a representative forbidden regression, and the handover includes guidance and automated checks for future AI-assisted changes. Hosting, paid tools and API usage are paid through your accounts.

Common questions about running Claude Code without prompts

How do I get the Claude code to stop asking for permission?

Use the narrowest control that removes the prompts you actually hit: sandbox auto-allow for routine shell commands, auto mode for long tasks, or allow rules for the commands you run all day. --dangerously-skip-permissions stops nearly every prompt, but it belongs in a container or VM, not on a machine with live keys.

Why does Claude Code keep asking me for permissions?

Usually because the session is in Manual mode, or because auto mode paused after its classifier blocked an action 3 times in a row or 20 times in total. Interactive sessions start in auto mode on every plan since late September 2026 unless a setting picks another mode, and writes to protected paths such as .git and .claude are never auto-approved except in bypass mode and in a terminal plan-mode session with bypass available.

How do I bypass permissions in Claude Code remote control?

You can’t pick Bypass permissions from the Claude app in a Remote Control session; for a session you started yourself, the app offers Manual, Accept edits, Plan and Auto. The dropdown shows the mode the local session is in, including one set in the terminal, except Bypass permissions, and Claude Code keeps permission prompts open until you answer them, with an optional push notification to your phone.

How to limit Claude code permissions?

Write deny and ask rules in your settings: Claude Code enforces them itself, checks them before allow rules, and deny rules hold in every mode, bypass included. For shell commands, add the sandbox’s write, network and credential limits, which the operating system enforces on each command and the processes it starts.

Is it safe to give Claude Code access to my files?

Yes for the project folder: read access there is the normal case. The risk is reach beyond it, because sandboxed commands can read most of the machine by default, including ~/.ssh and ~/.aws/credentials, until you list those paths as credential deny entries, and Claude’s own Read tool follows permission rules instead, so a Read deny rule for the same paths closes that side too.

When is it time to get help before running Claude Code unattended on a live app?

When the machine or runner the agent uses can reach production data or live keys, and staging is not separate from production, a second view is worth having before the prompts come off. AxonBuild weighs up with you in a free audit which keys and environments to split first.