Coral

Is --dangerously-skip-permissions safe? Safer ways to stop the prompts

What Claude Code’s --dangerously-skip-permissions (yolo mode) really skips, what it still blocks, real incidents, and safer ways to get fewer prompts: auto mode, the sandbox, deny rules, containers.

Updated

--dangerously-skip-permissions is safe only in a container or VM with nothing you can’t lose and no secrets inside. On your own machine it lets Claude Code run any command and write any file your account can, with no prompt and no protection against prompt injection. For fewer prompts without that risk, use auto mode, turn on the sandbox, and add deny rules for the few things that must never happen.

As of November 2026, from Anthropic’s permission modes, permissions and sandboxing docs. Part of Keep coding agents safe.

What the flag actually does

--dangerously-skip-permissions (people call it yolo mode) is the same as --permission-mode bypassPermissions. (Codex’s --yolo goes further and removes its sandbox too; see Codex sandbox and approval modes.) In Anthropic’s words, it “disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths” like .git, .zshrc and .npmrc.

What still stops it:

  • Deny rules. “Deny rules block in every mode, including bypassPermissions.” Allow rules do nothing in this mode.
  • Ask rules still ask.
  • Deleting critical paths. rm or rmdir on /, your home folder, top-level folders like /usr, or the project and its parents still asks. In the terminal the prompt waits two minutes, then the command is denied.
  • Root. Claude Code refuses to start in this mode as root or under sudo on macOS and Linux.
  • A repo can’t turn it on. A project’s .claude/settings.json can’t start you in bypass mode.

One side effect people miss: in an interactive session started with this flag, plan mode’s blocks aren’t enforced either. An edit Claude attempts while “planning” runs. See Claude Code plan mode.

What doesn’t stop it: anything else. The critical-path check covers rm and rmdir only, and Anthropic says it “can miss some commands”. A Python script, find -delete or a cloud CLI can delete just as much, and a prompt hidden in a README or web page can tell Claude to do it. Anthropic: bypass mode “offers no protection against prompt injection or unintended actions.”

The real risk

These are public, dated cases of coding agents destroying data. Not all of them ran in a skip-permissions mode, which is the point: an agent with broad access and no one reading is the risk.

  • December 2025, Claude Code on a Mac. A logged command, rm -rf tests/patches/plan/ ~/, deleted the user’s home folder: Desktop, Application Support and Keychain data (Hacker News thread).
  • April 2026, Cursor with Claude Opus. During a staging task, the agent deleted a startup’s production database volume and its backups in one API call. “It took 9 seconds.” (Decrypt)
  • July 2025, Amazon Q. A malicious change in the VS Code extension told the agent to wipe the home folder and delete AWS resources, run with --trust-all-tools --no-interactive, Q’s skip-everything flags (The Register).

Safer ways to get fewer prompts

1. Use auto mode instead

Auto mode is the default for interactive sessions since Claude Code v2.1.283, on every plan. A second model checks each action and blocks things that go beyond your request: force push, git reset --hard, curl | bash, production deploys and migrations, sending secrets out, deleting files that existed before the session.

Press Shift+Tab until the status bar shows auto, or start with claude --permission-mode auto. Two honest limits: Anthropic measured a 17% miss rate on real overeager actions (engineering post), and auto mode allows pushing to any branch, including main. So add deny rules for anything that must never happen. What it blocks, when it falls back to prompts and how to tune it are in How Claude Code auto mode works.

2. Turn on the sandbox

Run /sandbox in Claude Code. Commands then run with writes limited to the project and temp folders, and network only to domains you allow. Sandboxed commands can run without prompts and stay inside the box. To stop Claude from retrying a command outside it, set allowUnsandboxedCommands to false. What the sandbox doesn’t cover is in Claude Code sandbox: what it covers.

3. Allow the safe, deny the dangerous

Pre-approve what you approve all day, and deny the few things that should never run:

{
  "permissions": {
    "allow": ["Bash(npm test *)", "Bash(npm run lint *)", "Bash(git diff *)", "Bash(git status)"],
    "ask": ["Bash(git push *)"],
    "deny": ["Bash(git push --force *)", "Read(./.env.production)"]
  }
}

Deny rules match the command’s text, so bash -c '...' or a script can get past them. For a stronger check, add a hook: see Stop Claude Code from deleting files or touching production.

4. If you skip permissions, do it in a box

For long unattended runs, use Anthropic’s dev container or a VM. That’s also how teams building a software factory, where triggers rather than people start agents, keep those runs contained:

  • Run as a non-root user (the flag refuses root).
  • Don’t mount ~/.ssh, cloud credentials or production .env files.
  • Limit the network to what the task needs. The reference container ships a firewall script.
  • Remember the project folder is shared with your Mac, so Claude can still change any file in it. Commit first.

Anthropic’s own warning: even in a container, skip-permissions can’t stop a malicious project from sending out anything inside it, including Claude Code’s credentials.

5. Lock it off

To make sure nobody on a machine uses it, add this to your user settings, or to managed settings for a team:

{
  "permissions": {
    "disableBypassPermissionsMode": "disable"
  }
}

Claude Code then rejects --dangerously-skip-permissions.

Safe default to paste

The coral-safety-kit on GitHub has ready files, tested:

  • claude/user-settings.json for ~/.claude/settings.json: bypass mode off, sandbox on, no reading ~/.ssh or cloud credentials.
  • claude/project-settings.json for a repo’s .claude/settings.json: no force push, no push to main, ask before deploys, no production env files.
  • claude/hooks/guard-bash.sh: a hook that catches the dangerous commands deny rules miss.

Where Coral fits

Most people reach for yolo mode because prompts pile up while they’re away, and the agent sits waiting. Coral fixes the waiting instead of the safety: when any agent asks for permission, it shows in your Mac’s notch with the command in full, and you answer with one key. Answering on your Mac is Free. On your iPhone, alerts are Free, and answering from the phone straight to the agent is Pro. Pro’s approval rules can repeat answers you chose, and never cover rm -rf, force pushes or scripts.

Coming in Coral Terminal: a production fence and Guard, which ask before anything touches production or deletes files, with the real impact in plain words.

Questions

How do I get Claude Code to skip permissions?

Start it with claude --dangerously-skip-permissions, or --permission-mode bypassPermissions. Only do this in a container or VM. On your own machine, auto mode (Shift+Tab) gives you most of the speed with a safety check on each action.

Why does Claude keep asking for permission for bash commands?

Manual mode asks before any command that isn’t on its read-only list. Pick “Yes, and don’t ask again” for safe commands, add permissions.allow rules, or switch to auto mode. See Stop babysitting permission prompts.

Is installing Claude Code dangerous?

Installing it isn’t. What it can do depends on your permission mode: in Manual and auto mode it asks or checks before risky actions. The risk comes from skipping those checks on a machine with your files and keys.

Is auto mode safer than --dangerously-skip-permissions?

Yes. Auto mode runs a safety check on every action and blocks the riskiest ones; bypass mode runs everything. Auto mode still misses some, so keep deny rules for what must never happen.

Does --dangerously-skip-permissions ignore deny rules?

No. Deny rules still block in bypass mode, and so does the critical-path rm check. Allow rules stop mattering, since everything is allowed.

Never leave an agent waiting.

Coral taps you in your Mac’s notch or on your iPhone when an agent needs you. Free.

Download for freeSee pricing

More guides

Coral alternatives and comparisons