ExitPlanMode resets permission mode to acceptEdits instead of restoring previous mode

Resolved 💬 5 comments Opened Mar 27, 2026 by DrewWasem Closed May 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug

When ExitPlanMode is triggered (either via /plan toggle or the ExitPlanMode tool called by agents), the permission mode resets to acceptEdits instead of restoring the mode that was active before entering plan mode.

Settings

defaultMode is set to bypassPermissions in settings.json:

{
  "permissions": {
    "defaultMode": "bypassPermissions"
  }
}

Steps to Reproduce

  1. Start a session — permission mode correctly starts as "bypass permissions"
  2. 2. Manually set bypass permissions if not already active (Shift+Tab)
  3. 3. Trigger a workflow that calls EnterPlanMode then ExitPlanMode (e.g., a custom skill/command that uses plan mode internally)
  4. 4. After ExitPlanMode fires, permission mode has changed to "accept edits"

Also reproducible by toggling /plan on then off manually.

Expected

ExitPlanMode restores the permission mode that was active before EnterPlanMode was called (bypassPermissions in this case).

Actual

ExitPlanMode always resets to acceptEdits regardless of the previous mode or the defaultMode setting.

Environment

  • macOS (Darwin 24.6.0)
  • - Claude Code CLI
  • - - Model: claude-opus-4-6

Impact

Sessions using custom orchestration skills (e.g., /conductor) that enter/exit plan mode programmatically require the user to manually Shift+Tab back to bypass mode multiple times per session.

What Should Happen?

ExitPlanMode should restore the permission mode that was active before EnterPlanMode was called (e.g., bypassPermissions), rather than always resetting to acceptEdits.

Error Messages/Logs

Steps to Reproduce

  1. Start a session — permission mode correctly starts as "bypass permissions"
  2. 2. Manually set bypass permissions if not already active (Shift+Tab)
  3. 3. Trigger a workflow that calls EnterPlanMode then ExitPlanMode (e.g., a custom skill/command that uses plan mode internally)
  4. 4. After ExitPlanMode fires, permission mode has changed to "accept edits"

Also reproducible by toggling /plan on then off manually.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code CLI (latest)

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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