Is --dangerously-skip-permissions Safe? What the Flag Turns Off
Running Claude Code? See, control, and price every tool call it makes — allow/ask/deny policy, a per-session bill at API rates, and a full audit log, in one command:
curl -sf https://agenticcontrolplane.com/install.sh | bash
irm https://agenticcontrolplane.com/install.ps1 | iex
Full Claude Code guide → · see your first governed call → · free up to 5 agents
Correction (2026-07-28). An earlier version of this post said
--dangerously-skip-permissionsdisables every PreToolUse and PostToolUse hook. That was wrong. We re-checked it against current Claude Code behavior and the docs. Hooks fire in every permission mode, and a PreToolUsedenystill blocks the call. The flag turns off the permission prompts, not the hook system. We got it wrong, so we fixed it in place.
The answer
It is as safe as the rules you wrote before you used it.
The flag turns off the “Allow this tool call? (y/n)” prompt. It does that by
putting the session in bypassPermissions, which auto-allows calls that would
have prompted. Four things keep working:
- Deny rules, at every settings scope. A managed (org-deployed) deny can’t be overridden by a CLI flag.
- Explicit
askrules, and MCP tools flagged as requiring interaction. - PreToolUse hooks. They fire in every permission mode. Exit code 2 or
permissionDecision: "deny"blocks the call. - The
rm -rfcircuit breaker. It catchesrm -rf /andrm -rf ~, even inside$(...). Claude Code also refuses to run bypass mode as root.
So the flag does not mean “no controls.” It means your denies and your hooks, and nothing else. If your safety lived in the prompt, the flag removes it. If it lives in a deny rule or a hook, it stays.
If you use ACP, the hook (~/.acp/govern.mjs) keeps checking calls in a
session started with the flag, the same as in one without it.
For the step-by-step setup, see how to run Claude Code in yolo mode safely. For the same question across other harnesses, see Bypass Permissions Safely.
What the flag does
Two systems sit between the model and a tool call. They are separate.
- The permission system. These are the “do you want to proceed?” prompts.
The flag sets
bypassPermissions, so this system says yes to everything it would have asked about. Anthropic ships this for people who don’t want prompts. - The hook system.
PreToolUseandPostToolUsecommands insettings.jsonrun on every tool call in every permission mode. A hook that returnsdenyblocks the call. A hook that stays silent lets it through.
Under the flag, the prompts are gone and the hooks are not. ACP’s hook still
calls /govern/tool-use and still writes the audit line. It still holds a
safety-floor hit for approval. That list includes a force-push, destructive SQL
through a database client, curl | sh, and deletes outside the project. It
still blocks the hardline cases: rm -rf of your home or root, mkfs, disk
wipes and fork bombs.
A Claude Code session started with --dangerously-skip-permissions is
reported to ACP as a background session, the same tier as CI and headless
runs. So the rules you set for unattended runs apply to it. If ACP is
unreachable, the plugin blocks the call instead of waving it through.
One caveat. Any control that depended on you reading and approving each call
goes away with the prompts. You are no longer clicking through everything, and
because the session counts as background, a held call waits on the console
Approvals page and in the approval email instead of in your terminal.
Also, a new ACP workspace starts in audit mode. It records every call and holds only what the floor catches. Your own deny rules matter once you have written them and turned enforcement on.
What can turn a hook off
The things that remove the hook are not this flag. They need control of the machine:
"disableAllHooks": trueinsettings.json. This is the documented switch that stops all hooks. Enterprise admins can pin hooks withallowManagedHooksOnly.- Editing or deleting the hook entry in
~/.claude/settings.json, or uninstalling ACP. - Running a Claude Code build with no hook configured, such as a fresh install the config doesn’t reach.
A client-side hook can’t enforce against someone who removes it. For a single developer that is their own machine. For a team it is a fleet-management question.
If you need a boundary the user can’t remove
Put the high-stakes calls behind something that isn’t on the user’s machine.
ACP fronts MCP servers at the gateway, and it can route model calls through its
proxy. A disableAllHooks edit doesn’t change either of those.
For a developer on their own machine who hasn’t gone out of their way to strip governance, the hook is the boundary, and this flag doesn’t lower it.
What AgentGovBench says
The Claude Code scorecard
has no category that “catches” --dangerously-skip-permissions. There’s
nothing to catch. Hooks fire under the flag, so a hook-based layer behaves the
same with or without it.
The scenario where a user opts out of governance is disableAllHooks or
removing the hook. That is a local-control action, not a runtime one, so it is
a disclosure question: does the product tell users the removal path exists? We
are still scoping a client_bypass_disclosure category for v0.3.
What to do today
- Don’t treat the flag as the hole. It removes prompts. Keep your controls in deny rules and the hook.
- Write the denies before you need them. A deny at any scope survives the flag. Scopes, precedence and the weak spots of argument-constrained Bash patterns are on the Claude Code control-model page.
- Watch the real removal path. If audit completeness matters, watch
disableAllHooksand edits tosettings.json. At org scope,permissions.disableBypassPermissionsModeremoves the mode andallowManagedHooksOnlypins the hooks. - For high-stakes work, add a layer the endpoint can’t remove. Route those calls through ACP’s MCP fronting or the model proxy.
The ordered checklist is How to run Claude Code in YOLO mode safely.
Is --dangerously-skip-permissions safe to use?
It is as safe as the rules you wrote before you used it. The flag puts the session in bypassPermissions, which auto-allows every call that goes through Claude Code’s permission prompts. What it does not touch: deny rules at any settings scope, explicit ask rules, PreToolUse hook blocks, MCP tools flagged as requiring interaction, and a circuit breaker for rm -rf on / or ~. So bypass mode still enforces your denies and your hooks. Everything else runs without asking.
Does --dangerously-skip-permissions disable Claude Code hooks?
No. Hooks fire in every permission mode, including bypassPermissions. The hook even receives permission_mode: bypassPermissions in its input, which it could not if it never ran. A PreToolUse hook that exits 2 or returns permissionDecision deny blocks the call in any mode. An earlier version of this post said otherwise. That was wrong, and this page carries the correction.
What still blocks a command in bypassPermissions mode?
Four things. Deny rules at any scope, including managed org-deployed denies that no CLI flag can override. Explicit ask rules and MCP tools flagged as requiring interaction. PreToolUse hook denies. And Claude Code’s own circuit breaker for rm -rf / and rm -rf ~, plus its refusal to run bypass mode as root.
How do I stop someone running Claude Code with --dangerously-skip-permissions?
At org scope, permissions.disableBypassPermissionsMode in managed settings removes the mode, and allowManagedHooksOnly pins hooks so a user or project cannot override them. Both live in files on the endpoint, so a client-side control cannot hold against someone with write access to the client’s config. For work where that matters, put the boundary somewhere the endpoint cannot reach, such as a proxy or gateway the calls must pass through.
Receipts:
- Claude Code hooks documentation: hook events,
permission_modeinput, PreToolUsedeny, anddisableAllHooks - Claude Code scorecard post
- Claude Code integration page
- The Tool Surface Index: the declared tools those hooks govern, by blast radius
- Claude Code’s deny list can be bypassed: the client-side bypass classes and the layers that hold
- The Claude Code control model, explained: the six modes and rule precedence
- What survives yolo mode: the same question asked of eleven harnesses
- 7. Is --dangerously-skip-permissions Safe? What the Flag Turns Off · you are here
- 12. Full scorecard: seven frameworks, 48 scenarios, one open benchmark
- 18. Seven agent frameworks, one backend, governance diverges on 9 of 48 tests