claude-code - 💡(How to fix) Fix [BUG] --dangerously-skip-permissions does not bypass project-level "ask" rules in .claude/settings.json

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

  • Global ~/.claude/settings.json has "permissions": {"defaultMode": "auto"} and "skipDangerousModePermissionPrompt": true — neither changes the outcome.
  • The project's .claude/settings.local.json only contains allow entries (no ask/deny), so it isn't the override source.
  • Removing or narrowing the ask list in the project's settings.json is a workaround.
  • Surface area suggestion: either bypass mode should truly bypass project ask rules (matching the docs), or the CLI help text should be updated to clarify that project ask rules are honored even in bypass mode.

Code Example

{
     "permissions": {
       "allow": ["Read(**)"],
       "ask": ["Write(**)", "Edit(**)", "Bash(*)"]
     }
   }

---

claude --dangerously-skip-permissions --print "write hello to test.md"

---

claude --dangerously-skip-permissions --print "write hello to test.md"
RAW_BUFFERClick to expand / collapse

What's Wrong?

--dangerously-skip-permissions does not bypass ask rules defined in a project's .claude/settings.json. The flag is documented as "Bypass all permission checks," but project-level ask patterns still trigger prompts (interactive) or denials (--print mode), even when the global session is launched with the flag.

Edit/Write rules are most affected; this is similar in spirit to the already-fixed #42696, but the cause here is not subagent inheritance — it's the project ask list being applied on top of bypass mode.

What Should Happen?

Per CLI help text, --dangerously-skip-permissions should skip all permission checks regardless of source (project settings, global settings, mode). Project ask rules should not fire when the session is in bypass mode.

Error Messages/Logs

In --print mode the model surfaces the denial directly:

The write was blocked by the permission system. Want me to retry (you'll get a prompt to approve), or write it to .vec-from-here/tmp/test.md instead (pre-approved)?

In interactive mode, the standard permission prompt fires:

Do you want to overwrite prompt1_extract_and_map.md? ❯ 1. Yes 2. Yes, allow all edits during this session (shift+tab) 3. No

Steps to Reproduce

  1. Create a folder repro/ with a .claude/settings.json:

    {
      "permissions": {
        "allow": ["Read(**)"],
        "ask": ["Write(**)", "Edit(**)", "Bash(*)"]
      }
    }
  2. From repro/, run:

    claude --dangerously-skip-permissions --print "write hello to test.md"
  3. Observed: Write is denied — the model reports "The write was blocked by the permission system."

  4. Now go to a sibling folder with no .claude/ directory and run the same command:

    claude --dangerously-skip-permissions --print "write hello to test.md"
  5. Observed: Write succeeds silently — confirming the flag works in general, but is silently overridden by project-level ask rules.

The same symptom occurs in interactive mode (not just --print).

Regression

I don't know — I haven't tested older versions for this specific path.

Claude Code Version

2.1.143 (Claude Code)

Platform

Anthropic API

OS

Windows

Terminal/Shell

PowerShell (Windows Terminal)

Additional Information

  • Global ~/.claude/settings.json has "permissions": {"defaultMode": "auto"} and "skipDangerousModePermissionPrompt": true — neither changes the outcome.
  • The project's .claude/settings.local.json only contains allow entries (no ask/deny), so it isn't the override source.
  • Removing or narrowing the ask list in the project's settings.json is a workaround.
  • Surface area suggestion: either bypass mode should truly bypass project ask rules (matching the docs), or the CLI help text should be updated to clarify that project ask rules are honored even in bypass mode.

Related (closed/different cause): #42696, #54850, #32466, #37939. Related (open, different mode/scenario): #55255.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING