claude-code - 💡(How to fix) Fix --dangerously-skip-permissions exits when an auto-edit prompt is declined, breaking Shift+Tab mode cycle [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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#53147Fetched 2026-04-26 05:23:12
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

When a session is launched with --dangerously-skip-permissions, declining an auto-accept-edits prompt drops the session out of dangerously-skip-permissions mode entirely. This breaks the Shift+Tab cycle, since dangerously-skip-permissions is no longer in the rotation after the first decline.

Root Cause

When a session is launched with --dangerously-skip-permissions, declining an auto-accept-edits prompt drops the session out of dangerously-skip-permissions mode entirely. This breaks the Shift+Tab cycle, since dangerously-skip-permissions is no longer in the rotation after the first decline.

RAW_BUFFERClick to expand / collapse

Summary

When a session is launched with --dangerously-skip-permissions, declining an auto-accept-edits prompt drops the session out of dangerously-skip-permissions mode entirely. This breaks the Shift+Tab cycle, since dangerously-skip-permissions is no longer in the rotation after the first decline.

Repro

  1. Launch claude --dangerously-skip-permissions
  2. Shift+Tab to cycle into auto-accept-edits mode
  3. Decline an auto-edit prompt
  4. Observe: session drops out of --dangerously-skip-permissions entirely

Expected

Declining an auto-edit prompt should leave --dangerously-skip-permissions intact so Shift+Tab can keep cycling through modes normally.

Environment

  • OS: Windows 11
  • Shell: bash (Git Bash)

extent analysis

TL;DR

The session dropping out of --dangerously-skip-permissions mode after declining an auto-accept-edits prompt can be addressed by modifying the logic that handles the decline action to preserve the original mode.

Guidance

  • Review the code that handles the decline action for auto-edit prompts to ensure it does not alter the --dangerously-skip-permissions mode.
  • Verify that the Shift+Tab cycle correctly toggles through modes before and after declining an auto-edit prompt to identify where the mode change occurs.
  • Consider adding a flag or state variable to track whether --dangerously-skip-permissions was initially set, ensuring it remains active even after declining an auto-edit prompt.
  • Test the session launch with and without --dangerously-skip-permissions to confirm the behavior is consistent and as expected.

Notes

The exact implementation details of how --dangerously-skip-permissions is handled and how the auto-edit prompts are managed are not provided, so the guidance is based on the assumption that the issue lies in the logic that manages these features.

Recommendation

Apply a workaround by modifying the decline action logic to preserve the --dangerously-skip-permissions mode, as this directly addresses the observed behavior without requiring additional context or version changes.

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

claude-code - 💡(How to fix) Fix --dangerously-skip-permissions exits when an auto-edit prompt is declined, breaking Shift+Tab mode cycle [1 comments, 2 participants]