claude-code - 💡(How to fix) Fix [BUG] Plan Mode Clear Context deletes all previous conversations [1 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#51877Fetched 2026-04-23 07:42:31
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×4

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

extent analysis

TL;DR

The "clear context" option in Plan Mode may be incorrectly deleting the entire conversation history instead of just the plan mode's context.

Guidance

  • Verify the behavior by testing Plan Mode with and without the "clear context" option to confirm that the entire conversation history is being deleted.
  • Check the documentation for Plan Mode to see if the "clear context" option is intended to behave this way, or if it's a known issue.
  • Test the behavior in a previous version of Claude Code to confirm that this is a regression.
  • Consider reporting this issue to the developers or maintainers of Claude Code, as it may be a bug that needs to be fixed.

Notes

The issue seems to be specific to the "clear context" option in Plan Mode, and the expected behavior is that only the plan mode's context should be cleared, not the entire conversation history.

Recommendation

Apply workaround: Avoid using the "clear context" option in Plan Mode until this issue is resolved, or use a previous version of Claude Code where this feature worked as expected.

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