Bug: ExitPlanMode can present stale plan from a previous task to user for approval
Resolved 💬 3 comments Opened Feb 25, 2026 by wphillipmoore Closed Feb 25, 2026
Bug: ExitPlanMode can present stale plan from a previous task
Summary
When plan mode is entered for a new task but the agent determines no implementation is needed (e.g., the issue is already resolved), calling ExitPlanMode presents the stale plan file from a completely different prior task to the user for approval. If the user approves without reading carefully, Claude executes the wrong plan.
Steps to reproduce
- In a long conversation, complete a multi-step task that uses plan mode (e.g., a cross-repo version bump and publish workflow)
- Ask Claude to implement a new, unrelated issue
- Claude enters plan mode, explores the codebase, and determines the issue is already resolved — there is nothing to implement
- Claude calls
ExitPlanModeto exit
Expected behavior
ExitPlanMode should either:
- Present an empty/cleared plan (since no new plan was written)
- Refuse to exit if the plan file hasn't been updated for the current task
- Require the agent to explicitly clear/overwrite the plan file before exiting
Actual behavior
ExitPlanMode presents the previous task's plan to the user. In my case, it showed a detailed plan for a cross-repo version bump workflow when the current task was a simple docs.yml cleanup that was already resolved.
Why this is dangerous
- The stale plan may contain destructive or irreversible actions (publishing releases, merging PRs, closing issues)
- Users who trust the agent and approve quickly will trigger execution of the wrong plan
- The plan content can be entirely unrelated to the user's current request
- There is no visual indicator that the plan is stale
Environment
- Claude Code CLI
- Claude Opus 4.6
- Plan file persists at a fixed path across tasks within the same conversation
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗