[FEATURE] Ability (command?) to tell Claude it is now working on a new task, but keep relevant context knowledge.
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Often I tell Claude to do a task ("X"). After it is done, I ask it to do a subsequent task "Y" without /clear because the new task is highly related and is further work on the same part of the code, so I want it to keep existing code knowledge in the context. However Claude is now thinking it was tasked to do "X+Y" and keeps dragging X into the discussion in various ways:
- Plan is often contaminated by X (see e.g. #12505) whereas I want it to keep the old plan file alone (but not overwrite - what if I want to refer back to it later if I need to revisit X), and start a new one.
- When it summarizes what it has done in its message to me before stopping, it will summarize both X and Y work, unnecessarily spending tokens on X
- When it later compacts the context, it will include a lot of details about the X work, rather than only including things that are relevant for Y.
Proposed Solution
I do not feel I have enough expertise to know what's the best way to do it, but theoretically either of two ways:
- A command that makes it clear to Claude what is going on
- A specialized version of /compact that tells it to preserve the general codebase knowledge (maybe more detailed than regular /compact), but none of the task-specific knowledge.
I am guessing there would be an input token count vs output token count tradeoff between the two.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
_No response_
Additional Context
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗