ExitPlanMode dialog buttons unresponsive (Clear-context-and-bypass / Proceed) + plan auto-executes in unrelated open terminal

Resolved 💬 3 comments Opened May 3, 2026 by Baouse Closed Jun 2, 2026

Summary

Two related defects observed in plan-mode approval flow on Windows native Claude Code:

  1. In the ExitPlanMode approval dialog, the "Clear context and bypass permissions" and "Proceed" buttons are no-ops — the dialog persists, plan mode is not exited, and no execution begins.
  2. After the failed approval, the source terminal loses memory of the plan / prior conversation turn.
  3. Some time later, the plan begins executing inside a different, unrelated open Claude Code terminal — without that terminal being prompted. Cross-session execution leak.

Environment

  • Claude Code (Windows native)
  • OS: Windows 11 Home 10.0.26200
  • Shell: PowerShell
  • Model: Claude Opus 4.7 (1M context)
  • Multiple Claude Code terminals running concurrently (different working directories)

Steps to reproduce

  1. Open multiple Claude Code terminals at the same time (different cwd / sessions).
  2. In one terminal, agent enters plan mode and calls ExitPlanMode with a plan.
  3. Approval dialog appears with: Approve, Clear context and bypass permissions, Proceed.
  4. Click "Clear context and bypass permissions" → nothing happens. Dialog remains.
  5. Click "Proceed" → nothing happens. Dialog remains.
  6. The agent in this terminal has no memory of the plan or prior turn (state appears wiped or disconnected).
  7. Later, the plan begins executing in a different, unrelated open Claude Code terminal that was running in the background.

Expected behaviour

  • Every approval button in the ExitPlanMode dialog should dismiss the dialog and transition the same agent in the same terminal out of plan mode.
  • "Clear context and bypass permissions" should clear context and continue execution in the originating session.
  • A plan must never execute in a terminal that did not originate the approval.

Actual behaviour

  • "Clear context and bypass permissions" and "Proceed" are no-ops.
  • Conversational memory is lost after the failed approval.
  • Plan execution surfaces in a different open Claude Code terminal — cross-session leakage.

Impact

  • Approval flow silently broken — only the plain "Approve" button reliably works.
  • Cross-terminal execution leak is a real safety problem: a plan approved (or not approved) in session A could run inside session B against a different working directory, different permissions, and different project context. Risk of unintended edits, commits, or destructive operations in the wrong repo.
  • Loss of conversational memory after a failed approval prevents the agent from recovering or explaining what happened.

Workaround

  • Only use the plain "Approve" button in the ExitPlanMode dialog.
  • Avoid running multiple Claude Code terminals concurrently while in plan mode until this is fixed.

Suspected area

  • ExitPlanMode dialog button handlers — non-Approve options appear wired to no-op or stale callbacks.
  • Cross-session approval routing — approval events may be dispatched to the wrong Claude Code process when multiple terminals are alive.

View original on GitHub ↗

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