[BUG] ExitPlanMode "Yes, clear context and bypass permissions" clears plan approval state — stuck in plan mode
Resolved 💬 3 comments Opened Mar 11, 2026 by Wis7Com Closed Mar 14, 2026
Bug Description
When approving a plan in Plan Mode and selecting Option 1: "Yes, clear context (N% used) and bypass permissions", the context clear also wipes the plan approval state. The new context retains plan mode but has no knowledge that the plan was approved, creating an inescapable plan mode loop.
Steps to Reproduce
- Enter bypass permissions mode (e.g., via "Yes, and bypass permissions" on any prior prompt)
- Enter Plan Mode (Shift+Tab or via tool)
- Have Claude generate a plan
- When prompted to approve the plan, ExitPlanMode triggers with options
- Select Option 1: "Yes, clear context (N% used) and bypass permissions"
- Context is cleared
- Result: Plan mode is still active in the new context, but the approval state is lost
- Claude continues asking for plan approval or generating new plans — cannot proceed to implementation
Expected Behavior
After selecting "Yes, clear context and bypass permissions":
- Plan mode should be exited (approval acknowledged)
- Context should be cleared
- Implementation should begin in the fresh context
The plan approval / ExitPlanMode state transition should be persisted or executed before the context clear.
Actual Behavior
- Context is cleared before (or simultaneously with) ExitPlanMode completing
- The new context starts in plan mode with no record of the approval
- User is stuck in a plan mode loop with no way to proceed to implementation
- Only workarounds: Shift+Tab toggle, selecting Option 2 instead, or Escape → new session
Environment
- OS: Windows 11 Pro
- Claude Code CLI: latest (reproducible across multiple versions)
- MCP servers active: 6 (github, context7, sequential-thinking, memory, filesystem, codex)
Additional Context
- Option 2 ("Yes, and bypass permissions") works correctly because it preserves context, so the approval state is retained
- Having many MCP servers active may increase the likelihood of ExitPlanMode failure (more system prompt content → higher context pressure)
- The bug is in the ordering of operations: context clear happens before (or atomically with) the plan mode state transition, rather than after
Workarounds
- Always select Option 2 ("Yes, and bypass permissions") instead of Option 1
- Use Shift+Tab to manually toggle plan mode off
- Escape and start a new session
Related Issues
- #32934 — ExitPlanMode "yes" doesn't exit plan mode (same state transition failure, different trigger)
- #26930 / #26520 — ExitPlanMode rejection loop
- #19530 — All options clear context unexpectedly
- #18576 / #12753 — Plan exit forces clear context or auto-accept
- #19623 — ExitPlanMode hangs with many MCP servers active
- #19426 — Clear context option undocumented
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗