claude-code - 💡(How to fix) Fix --dangerously-skip-permissions resets mid-session, retoggling immediately reverts [1 comments, 2 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#45290Fetched 2026-04-09 08:08:48
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

When starting a session with claude --dangerously-skip-permissions, the permission mode resets to off mid-session. Retoggling via Shift+Tab immediately reverts back to off — it does not hold.

Root Cause

When starting a session with claude --dangerously-skip-permissions, the permission mode resets to off mid-session. Retoggling via Shift+Tab immediately reverts back to off — it does not hold.

RAW_BUFFERClick to expand / collapse

Description

When starting a session with claude --dangerously-skip-permissions, the permission mode resets to off mid-session. Retoggling via Shift+Tab immediately reverts back to off — it does not hold.

Steps to reproduce

  1. Start Claude Code from terminal: claude --dangerously-skip-permissions
  2. Begin a long-running agentic task (e.g. editing files in a loop)
  3. Observe permission mode resets mid-session (not at a session boundary)
  4. Press Shift+Tab to re-enable bypass mode
  5. Mode immediately resets to off again — toggle does not stick

Expected behavior

Permission mode set via CLI flag should persist for the full session. Retoggling should re-enable it and hold.

Actual behavior

Mode resets mid-session, and retoggling does not hold. The mode appears to flip off again immediately after being re-enabled.

Context

  • Triggered during active agentic work (context compression likely occurring)
  • skipDangerousModePermissionPrompt: true is set in settings.json
  • No hooks in settings that touch permission state
  • Happens consistently, not a one-off

Environment

  • Platform: macOS (darwin 25.4.0)
  • Shell: zsh
  • Launch method: CLI with --dangerously-skip-permissions flag

extent analysis

TL;DR

The issue can be mitigated by investigating the interaction between the --dangerously-skip-permissions flag and the context compression occurring during agentic work.

Guidance

  • Investigate how the skipDangerousModePermissionPrompt setting in settings.json interacts with the --dangerously-skip-permissions flag, as this might be causing the permission mode to reset.
  • Verify that there are no other settings or hooks in the configuration that could be overriding the permission mode during a session.
  • Check if the issue persists when running Claude Code without the --dangerously-skip-permissions flag to determine if the problem is specific to this mode.
  • Consider adding logging or debugging statements to track when the permission mode is being reset to understand the trigger for this behavior.

Example

No specific code example can be provided without more information on the internal workings of Claude Code, but adding a debug log statement where the permission mode is checked or updated could help identify the issue.

Notes

The provided information suggests that the issue is related to the interaction between the --dangerously-skip-permissions flag and the context compression during agentic work. However, without more details on how Claude Code handles permissions internally, it's challenging to provide a definitive fix.

Recommendation

Apply a workaround by closely monitoring the application's behavior and configuration to identify any patterns or settings that might be causing the permission mode to reset, as upgrading to a fixed version is not mentioned as an option in the provided context.

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

Permission mode set via CLI flag should persist for the full session. Retoggling should re-enable it and hold.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING