--dangerously-skip-permissions resets mid-session, retoggling immediately reverts

Resolved 💬 3 comments Opened Apr 8, 2026 by scapegoat Closed May 22, 2026

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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗