claude-code - 💡(How to fix) Fix Plan mode session pinned to generated filename — can't redirect approval UI to a different plan file

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…
RAW_BUFFERClick to expand / collapse

What I expected: When working on multiple unrelated features in sequence, each plan-mode session should be able to point at a plan file that matches the work being done — so the approval UI (ExitPlanMode) shows the relevant content.

What actually happens: A plan-mode session is hard-pinned at start to a single generated filename (e.g., snoopy-sprouting-parasol.md). The assistant can only edit that file. ExitPlanMode reads from that file regardless of what work is actually happening. If the assistant writes about a different feature to a separate file (feature-b.md), the approval flow still shows the original pinned file's content.

Worse: deleting the pinned file and starting a fresh plan-mode session re-generates the same filename, so a stale shell of the old work can reappear.

Reproduction:

  1. Start a plan-mode session — gets pinned to e.g. snoopy-sprouting-parasol.md
  2. Complete a plan and implementation for Feature A
  3. Without exiting plan mode, ask for help on Feature B
  4. Assistant tries to write Feature B's plan; can only modify the same file
  5. If the assistant creates a new file, ExitPlanMode ignores it and shows Feature A's content
  6. Deleting and starting fresh reproduces the same pinned filename

Suggested fixes (any of):

  • Allow the assistant to specify the plan-file path on ExitPlanMode (or as a session metadata update)
  • Generate a fresh filename per session, not a deterministic one per workspace
  • Add a /plan switch <file> slash-command to repoint the session
  • At minimum, surface the pinned file path prominently when entering plan mode so users can decide to cancel and start over before sinking effort into the wrong file

Impact: For users iterating on multiple features in one Claude Code workspace, this either forces append-only "addendum" plans inside an unrelated file (confusing review surface), or requires fully restarting plan mode for each new feature — which itself can re-pin the same filename.

Environment: Claude Code (Windows 11, VS Code extension, Opus 4.7 1M context).

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