[BUG] Plan Mode Clear Context deletes all previous conversations
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Maybe I'm misunderstanding Plan Mode's "clear context" option, but is it supposed to delete ALL conversations, and not just the plan mode's context? Is this intended behavior?
I noticed this happening since I couldn't ESC to previous chats - I had to use /resume.
For example I have 173K tokens used for the previous convo:
<img width="1725" height="939" alt="Image" src="https://github.com/user-attachments/assets/42e6fe9a-1c91-4776-a703-fa0c916c7290" />
Then, I start plan mode via SHIFT TAB and at the end:
<img width="2781" height="480" alt="Image" src="https://github.com/user-attachments/assets/1427a906-c35a-49a0-84f3-973457f04beb" />
I select option 2 (default in CC) and get 278K tokens used (so plan mode used 100K ish tokens)
<img width="1534" height="727" alt="Image" src="https://github.com/user-attachments/assets/29c8ee44-1d2e-43ed-8563-3297503775b0" />
If you select option 1, my expectation was the 100K tokens for plan mode get wiped, and only the plan (around 3K tokens gets appended after my previous convo so 176K tokens gets used)
But in actuality:
<img width="1774" height="785" alt="Image" src="https://github.com/user-attachments/assets/f4cd636b-b62a-4136-bbe3-606a1fa6ac62" />
The entire convo history gets cleared, and 3K of the plan is left. My expectation was the previous convo would still be there.
I thought I was doing something wrong so I used the normal non clear context, and the context length expanded by 100K which was NOT what I expected.
What Should Happen?
Plan mode clear context should only clear the plan mode's context, NOT previous convos.
Error Messages/Logs
Steps to Reproduce
Use CC for like a few turns then use Plan Mode and test Clear Context and not Clear Context
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.114
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗