claude-code - 💡(How to fix) Fix [FEATURE] Add `/plan done` command to detach active plan from context without `/clear` [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#44994Fetched 2026-04-09 08:15:52
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1

Fix Action

Fix / Workaround

The only current workaround is /clear, which wipes the entire conversation context, losing all session history.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

After completing a plan implementation, the active plan file continues to be injected into context at every turn, consuming tokens unnecessarily for any subsequent unrelated work.

Also, writing a new plan means wiping the existing file to start over, which is not ideal either and looses the plans history.

Proposed Solution

A command like /plan done or /plan detach, or a menu option when the plan is complete that:

  • Stops injecting the plan file into context at each turn
  • Removes the plan name pill from the status bar
  • Does not clear conversation history
  • When starting a new /plan, creates a new file (with timestamp or index) instead of overwriting the previous one, preserving plan history

Alternative Solutions

The only current workaround is /clear, which wipes the entire conversation context, losing all session history.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. Enter plan mode (/plan), write a plan, validate it (with "auto-accept edits" for instance)
  2. Implement the plan, tests pass, commit done
  3. Continue working on subsequent tasks in the same session
  4. The previous plan is still actively injected into context at every turn, and the blue plan pill is still visible in the status bar

Additional Context

  • Plans can be thousands of tokens injected at every turn. On long sessions with multiple sequential tasks, this is significant wasted context.
  • Users working on multiple tasks in one session currently have no choice between "keep burning tokens on a finished plan" and "lose all context".
  • Plan history is destroyed when starting a new plan in the same session (the previous file is overwritten).

Related issues

  • #37484 — Plan mode name pill persists in status bar after ExitPlanMode
  • #34782 — Plan from previous session auto-injected and executed in new session
  • #32117 — [FEATURE] /implement command to clear context and start implementation from a plan file

extent analysis

TL;DR

Implement a /plan done or /plan detach command to stop injecting the plan file into context and remove the plan name pill from the status bar without clearing conversation history.

Guidance

  • Introduce a new command (/plan done or /plan detach) to detach the active plan from the context, preventing unnecessary token consumption.
  • Modify the plan implementation to create a new file with a timestamp or index when starting a new plan, instead of overwriting the previous one, to preserve plan history.
  • Update the status bar to remove the plan name pill when the plan is detached or completed.
  • Consider adding a menu option to detach or complete a plan, providing an alternative to the command-line interface.

Example

# Proposed command usage
/plan done  # Detach the active plan from the context
/plan detach  # Alternative command to detach the active plan

Notes

The current workaround (/clear) is not ideal, as it wipes the entire conversation context, losing all session history. The proposed solution aims to address this issue by providing a way to detach the plan without clearing the context.

Recommendation

Apply workaround: Implement the /plan done or /plan detach command to mitigate the issue until a more comprehensive solution is available. This will help reduce unnecessary token consumption and preserve plan history.

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