claude-code - 💡(How to fix) Fix Plan mode UI stays active after ExitPlanMode succeeds [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#52697Fetched 2026-04-24 10:42:07
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

After calling ExitPlanMode, the tool returns "User has approved exiting plan mode" but the UI continues to show plan mode as active. Subsequent messages still include the plan mode system reminder with all the plan mode constraints.

Root Cause

After calling ExitPlanMode, the tool returns "User has approved exiting plan mode" but the UI continues to show plan mode as active. Subsequent messages still include the plan mode system reminder with all the plan mode constraints.

RAW_BUFFERClick to expand / collapse

Description

After calling ExitPlanMode, the tool returns "User has approved exiting plan mode" but the UI continues to show plan mode as active. Subsequent messages still include the plan mode system reminder with all the plan mode constraints.

Steps to Reproduce

  1. Enter plan mode via /plan
  2. Do some work, write a plan file
  3. Call ExitPlanMode — get confirmation "User has approved exiting plan mode"
  4. UI still shows plan mode active
  5. System reminders in subsequent turns still include plan mode instructions

Expected Behavior

After ExitPlanMode returns success, plan mode should be fully deactivated — both in the UI indicator and in system reminders sent to the model.

Observed Behavior

ExitPlanMode returns success but plan mode persists. Had to work around it by ignoring the stale state. Happened multiple times in the same session.

Environment

  • Claude Code CLI on macOS (Darwin 25.5.0)
  • Model: claude-opus-4-6 (1M context)

extent analysis

TL;DR

The issue may be resolved by ensuring that the UI and system reminders are properly updated after calling ExitPlanMode, potentially involving a refresh or synchronization step.

Guidance

  • Verify that ExitPlanMode correctly updates the internal state of the plan mode.
  • Check if there's a need for an explicit UI refresh or synchronization after ExitPlanMode is called to ensure the UI reflects the updated state.
  • Investigate if the system reminders are generated based on the current state of the plan mode and if this generation process needs to be triggered or updated after ExitPlanMode.
  • Consider adding logging or debugging statements to track the state of plan mode and UI updates to identify where the discrepancy occurs.

Example

No specific code example can be provided without more context on how ExitPlanMode is implemented or how the UI and system reminders are updated.

Notes

The issue might be specific to the interaction between the Claude Code CLI, the claude-opus-4-6 model, and the macOS environment. Further investigation into the implementation details of ExitPlanMode and the UI/system reminder updates is necessary.

Recommendation

Apply a workaround by manually refreshing the UI or synchronizing the state after calling ExitPlanMode, as this seems to temporarily resolve the issue, until a more permanent fix can be implemented.

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