Skip to content

ProperPath

Menu

Free resources · Rules and hooks

Claude dangerously skip permissions: what the flag skips, and a safer setup

What claude dangerously skip permissions really turns off, what it still stops, why it can still ask, and one deny rule you can write and check in two minutes.

Built by ProperPath

What does --dangerously-skip-permissions actually do?

It is the same as bypassPermissions mode. A permission mode is the overall setting for how often Claude Code asks you. In this mode nearly every action runs at once, even writes to Claude's own settings and your .git folder.

What still holds:

Allow rules, which pre-approve actions, stop mattering.

Should I always use it?

No, not on your own machine. Since version 2.1.283, auto mode is the mode Claude Code starts in for interactive terminal and VS Code sessions. It runs most actions without asking and checks risky ones in the background. It guarantees nothing, but keeps a check the flag removes.

The command looks like this:

claude --dangerously-skip-permissions

In our view, the flag belongs only in an unattended run inside a container, virtual machine or dev container with no internet access unless the job needs it: a walled-off computer where a mistake stays put. Give that box the least reach the job needs, with no production keys and no copy of your home folder. Before the run, commit your work as a fresh checkpoint.

What can go wrong?

A bad day looks like one of these:

The danger peaks when one agent holds your private data, reads content from strangers and can send data out. On your laptop Claude has all three, and the flag removes the person watching.

Is Claude Code secure enough to run this way?

Not on its own. Claude Code enforces its rules, and Claude cannot talk its way past one. Still, a rule only matches what Claude asks for, the command text or the file name, so the same program called another way, or a script that opens the file itself, can get past it. Your real protection is isolation: the container, run as a normal user, holding nothing you could not lose.

Why does it still ask, or refuse to start?

Usually:

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

What is one safe step I can take today?

Write one deny rule, the kind that holds in every mode, the flag included. Paste this into a Mac or Linux terminal to make a throwaway folder, a made-up .env file and a settings file denying it:

mkdir -p ~/deny-rule-test/.claude
cd ~/deny-rule-test
printf 'API_KEY=made-up-not-real\n' > .env
cat > .claude/settings.json <<'EOF'
{
  "permissions": {
    "deny": ["Read(./.env)"]
  }
}
EOF

It prints nothing when it works.

Anyone who can commit to a repository can change this file. Look for rules you did not expect in any repository you clone. Later, repeat it on your own project with your real secrets file; never share a real key.

Optional, if signed in: start Claude Code here and type /permissions to see your rule and its file.

Where do I set this up next?

Check that the rule is in the file

Run this:

grep -n 'Read(./.env)' ~/deny-rule-test/.claude/settings.json

It should print exactly:

3:    "deny": ["Read(./.env)"]

The 3 is the line number. If nothing prints, or it says No such file or directory, run the first block again.