ExitPlanMode fails when plan mode toggled via Shift+Tab after starting with --dangerously-skip-permissions

Status Open
Reported on v2.1.72
Maintainer reply None cached
Activity 3 comments · opened Mar 10, 2026

Bug Description

When starting Claude Code with --dangerously-skip-permissions and then manually toggling into plan mode via Shift+Tab, the ExitPlanMode confirmation flow fails to transition back to act mode. Responding "yes" to the exit plan mode prompt does not actually exit plan mode — the session remains stuck in read-only plan mode.

Steps to Reproduce

  1. Start Claude Code with claude --dangerously-skip-permissions
  2. Press Shift+Tab to toggle into plan mode
  3. Give Claude a task — it creates a plan and calls ExitPlanMode
  4. Respond "yes" to confirm exiting plan mode
  5. Expected: Claude exits plan mode and begins implementation (act mode with bypass-permissions)
  6. Actual: Claude remains in plan mode. System reminders continue showing "Plan mode still active"

Environment

  • Claude Code version: 2.1.72
  • Terminal: Ghostty (minimal config, window-padding-y = 0,24 only)
  • Shell: zsh (macOS Darwin 23.6.0)
  • Alias used: claude --dangerously-skip-permissions (via shell alias)
  • skipDangerousModePermissionPrompt: true in ~/.claude/settings.json

Notes

  • No custom keybindings configured (~/.claude/keybindings.json does not exist)
  • No Ghostty input keybindings that could intercept the "yes" response
  • The issue appears to be in how Claude Code handles the permission mode state transition when plan mode was entered via Shift+Tab toggle (as opposed to starting with --permission-mode=plan)

View original on GitHub ↗

3 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/32923
  2. https://github.com/anthropics/claude-code/issues/30463
  3. https://github.com/anthropics/claude-code/issues/26520

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

stefansimik · 5 months ago

Same problem here. This is new issue introduced in latest days (never happened before, just fighting with this problems last few days)

I have feeling, that this started to happen, when I added parameter claude --permission-mode plan to start of Claude. But not sure, about this, just my feeling and possible hint.

yurukusa · 5 months ago

Workaround — auto-approve ExitPlanMode via hook:

#!/bin/bash
TOOL=$(cat | jq -r '.tool_name // empty')
[ "$TOOL" = "ExitPlanMode" ] && echo '{"decision":"approve"}' && exit 0
exit 0

Register as PreToolUse with empty matcher. This auto-approves ExitPlanMode regardless of how plan mode was entered.