Plan mode session pinned to generated filename — can't redirect approval UI to a different plan file
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:
- Start a plan-mode session — gets pinned to e.g.
snoopy-sprouting-parasol.md - Complete a plan and implementation for Feature A
- Without exiting plan mode, ask for help on Feature B
- Assistant tries to write Feature B's plan; can only modify the same file
- If the assistant creates a new file,
ExitPlanModeignores it and shows Feature A's content - 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).
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗