contenox

--dangerously-skip-permissions: what it skips, what stays

Updated · Facts checked

SAFETY AND CONTROL--dangerously-skip-permissions

--dangerously-skip-permissions starts Claude Code in bypassPermissions mode: it edits files, runs commands and fetches URLs without asking you first. It’s the same as claude --permission-mode bypassPermissions. Your deny rules still apply; everything else that would have asked just runs.

The Codex equivalent is --dangerously-bypass-approvals-and-sandbox, alias --yolo, and it goes further: it also removes Codex’s sandbox.

claude --dangerously-skip-permissions

The first time you start it this way, Claude Code shows a warning you must accept. Accepting saves "skipDangerousModePermissionPrompt": true in ~/.claude/settings.json, so you won’t see it again. In a script with claude -p, there’s no dialog.

What it turns off, and what still applies

Turned off:

  • Every approval prompt for commands, edits and web fetches
  • Your allow rules, which no longer matter, since everything not denied runs
  • The protection of .git, .claude, .vscode, .bashrc, .mcp.json and similar paths, which become writable

Still applies:

  • Deny rules. A "deny": ["Bash(git push *)"] blocks in every mode, including this one.
  • Explicit ask rules. A rule in "ask" still prompts.
  • Deleting critical paths. rm on a drive root or a system folder still asks.
  • The sandbox, if enabled. Commands stay inside it, though hosts outside the network allowlist are allowed without a prompt.
  • Admin settings. Managed deny rules can’t be overridden.

So the flag is less absolute than its name suggests, if you’ve written deny rules first. With an empty settings file, nothing stands between the model and your machine.

Guards around the flag

  • No root. On Linux and macOS, Claude Code refuses to run with it as root or under sudo: --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons. The check is skipped inside a recognized sandbox. Windows has no such check.
  • Not from a project. Setting "defaultMode": "bypassPermissions" in a project’s .claude/settings.json is ignored. It only works in your own user settings or managed settings, so a repository you clone can’t switch it on for you.
  • Admins can block it, and so can you: "permissions": {"disableBypassPermissionsMode": "disable"}.
  • Opt in without starting in it. claude --allow-dangerously-skip-permissions adds bypass mode to the Shift+Tab cycle without turning it on. Without one of the two flags at startup, you can’t switch into bypass during a session.

The equivalents in other tools

Tool Flag Also removes the sandbox?
Claude Code --dangerously-skip-permissions No: the sandbox stays if enabled
Codex --dangerously-bypass-approvals-and-sandbox, alias --yolo Yes: sets approval_policy = never and sandbox_mode = danger-full-access
Copilot CLI --allow-all, alias --yolo Copilot’s sandbox is separate and off by default
Cursor CLI --force, alias --yolo Separate: --sandbox enabled
OpenCode --auto OpenCode has no sandbox

If you searched for the Codex version of this flag because you want Codex to stop asking: you probably don’t want --yolo. codex --approve-for-me keeps the workspace-write sandbox and lets an automatic reviewer handle approvals. And codex -a never --sandbox workspace-write never asks, while the sandbox still keeps it inside the project and off the network.

When it’s the right flag

For unattended runs in a box where nothing can go wrong: a container or VM with only the project mounted, no credentials, ideally no network. That’s what Anthropic’s docs recommend. A typical use is a long refactoring or a batch job running overnight in a dev container, on a fresh clone you can throw away.

The same split holds from the other side. Approval prompts decay into muscle memory (“Click. Approve. Click. Approve. Production incident.”), so where nobody sits at the keyboard there should be no fallback prompt at all, only deny by default: a newly connected MCP server or API stays refused until a rule names it. Skipping prompts is safe when the rules underneath were written for a run with nobody watching, not when they were written for a person who would have caught the rest.

It’s the wrong flag on your laptop, with your SSH keys in ~/.ssh, your cloud logins in your home folder, and push access to your company’s repositories. The model doesn’t have to be malicious to do damage there. It only has to read a web page or an issue with instructions planted in it.

The reasoning behind Contenox’s sandbox puts the difference in one line: the same model can be safe in one mode and dangerous in the other. An agent in bypass mode doesn’t request effects through a gate somebody owns; it simply has them, by any path its process can take. “The model is aligned” is not a control.

Safer ways to get the same speed

  1. Write deny rules first. If you use the flag, it’s only as safe as your deny list. A minimal one:

    {
      "permissions": {
        "deny": [
          "Read(./.env)",
          "Read(./.env.*)",
          "Read(~/.ssh/**)",
          "Read(~/.aws/**)",
          "Bash(git push *)",
          "Bash(sudo *)"
        ]
      }
    }
  2. Turn on the sandbox instead. With {"sandbox": {"enabled": true}}, sandboxed commands run without prompts, writes stay in the project, and network goes through an allowlist. Available on macOS, Linux and WSL2; on native Windows, commands run unsandboxed.

  3. Use auto mode. It’s Claude Code’s default since v2.1.283: a classifier approves routine actions, and you only see the unusual ones.

  4. Use acceptEdits (claude --permission-mode acceptEdits) if the prompts you hate are mostly edits. Edits and simple file commands inside the project run; other commands still ask.

  5. Allow your routine commands by rule. npm test *, npm run build, git add *. See why your agent keeps asking.

Skipping the prompt doesn’t have to mean skipping the rules. An earlier Contenox build ran overnight report jobs with prompts off: the job’s rules allowed exactly one thing, writing files under reports/**, and anything else it tried (a write elsewhere, a shell command, a network call) matched no rule and parked as a question in an approval queue instead of running. The rule as that build phrased it: instruction is not enforcement, and the unattended flag removes the prompt, never the boundary.

Contenox

Contenox aims at YOLO speed on the routine work without the YOLO horror story: the routine commands run without a card, and the dangerous part still asks. What runs without asking is a rule set that can be read and changed under Permissions; the destructive commands and credential stores stay gated or blocked. The command line has --auto for throwaway CI runners, the one place where skipping prompts is the right call. See built-in tools and permissions.

Related

Esc to close