claude-code - 💡(How to fix) Fix --dangerously-skip-permissions bypass drops after 'Always allow' on sensitive file [2 comments, 3 participants]

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…
GitHub stats
anthropics/claude-code#55553Fetched 2026-05-03 04:50:25
View on GitHub
Comments
2
Participants
3
Timeline
7
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1unsubscribed ×1

When running with --dangerously-skip-permissions, editing a sensitive file (e.g. ~/.zshrc) triggers a permission prompt as expected. However, selecting "Always allow" on that prompt causes the bypass mode to drop for the rest of the session. Subsequent operations that should be bypassed (e.g. curl) start requiring permission again.

Root Cause

When running with --dangerously-skip-permissions, editing a sensitive file (e.g. ~/.zshrc) triggers a permission prompt as expected. However, selecting "Always allow" on that prompt causes the bypass mode to drop for the rest of the session. Subsequent operations that should be bypassed (e.g. curl) start requiring permission again.

RAW_BUFFERClick to expand / collapse

Description

When running with --dangerously-skip-permissions, editing a sensitive file (e.g. ~/.zshrc) triggers a permission prompt as expected. However, selecting "Always allow" on that prompt causes the bypass mode to drop for the rest of the session. Subsequent operations that should be bypassed (e.g. curl) start requiring permission again.

Steps to reproduce

  1. Start Claude Code with --dangerously-skip-permissions
  2. Ask Claude to edit ~/.zshrc via Bash (e.g. echo "# comment" >> ~/.zshrc)
  3. A permission prompt appears for the sensitive file — select "Always allow"
  4. Ask Claude to run a command that would normally be bypassed, e.g. curl https://httpbin.org/get
  5. A permission prompt appears for curl — bypass is no longer active

Expected behavior

Bypass mode should remain active for non-sensitive operations after approving a sensitive file prompt. The sensitive file prompt is correct, but approving it should not revoke bypass for everything else.

Actual behavior

After selecting "Always allow" on a sensitive file prompt, bypass mode drops entirely. All subsequent tool calls that were previously bypassed now require permission.

Notes

  • Possibly related to #45290 (bypass resets mid-session), but this has a specific, reproducible trigger: the "Always allow" approval on a sensitive file
  • skipDangerousModePermissionPrompt: true is set in settings.json
  • Non-sensitive file operations (Edit, Write) that were already granted "always allow" in prior sessions continue to work without prompts, which initially made it seem like bypass was still active

Environment

  • Claude Code version: 2.1.91
  • Platform: macOS (darwin 25.4.0)
  • Shell: zsh
  • Launch method: CLI alias claude --dangerously-skip-permissions

extent analysis

TL;DR

The bypass mode dropping after approving a sensitive file prompt can be worked around by re-enabling --dangerously-skip-permissions after the prompt.

Guidance

  • Verify that skipDangerousModePermissionPrompt is set to true in settings.json to ensure that the bypass mode is correctly configured.
  • After approving the sensitive file prompt, try re-running the command with --dangerously-skip-permissions to see if the bypass mode is re-enabled.
  • Check if the issue is related to #45290 and if there are any updates or fixes available for that issue.
  • Test if non-sensitive file operations that were previously granted "always allow" still work without prompts to isolate the issue.

Example

No code snippet is provided as it is not explicitly supported by the issue.

Notes

The issue seems to be specific to the "Always allow" approval on a sensitive file prompt, and the workaround may not be a permanent fix. The relationship to #45290 is unclear and may require further investigation.

Recommendation

Apply workaround: re-enable --dangerously-skip-permissions after the prompt, as it may temporarily resolve the issue until a permanent fix is available.

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…

FAQ

Expected behavior

Bypass mode should remain active for non-sensitive operations after approving a sensitive file prompt. The sensitive file prompt is correct, but approving it should not revoke bypass for everything else.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING