Closed as not planned
Closed as not planned
Copy link
Labels
area:coreautocloseIssue will be closed automaticallyIssue will be closed automaticallybugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Description
Environment
- Platform (select one):
- Anthropic API
- AWS Bedrock
- Google Vertex AI
- Other:
- Claude CLI version: 1.0.33
- Operating System: macOS 15.5
- Terminal: Terminal
Bug Description
I expected the /clear command to do the same as exiting claude and starting again. But it seems some context are still left in memory after clearing.
Steps to Reproduce
- In one session, tell Claude Code to use a markdown document (in my case TestPlan.md) as a prd scratchpad.
- Delete the TestPlan.md document, then /clear command to clear context
- Work with some other session in planning mode, without referring to TestPlan.md.
- Claude will try to read and update the TestPlan.md document!
Expected Behavior
Claude should not know about TestPlan.md
Actual Behavior
⏺ Now let me create the test plan document:
⏺ Read(prds/TestPlan.md)
⎿ Error: File does not exist.
EDIT: Except file names, it also seems to have some cache of branches that is not cleared properly.
I just finished a feature branch. Committed, switched branch, ran /clear and then asked Claude to pull latest and rebase. Somehow it remembered the old feature branch name and tried to switch back to it. (I did not have any uncommitted changes anywhere, and this was the first output after clearing the session)
I see you're on branch joakim/foo, not the joakim/bar branch that had uncommitted changes.
Let me check if you have multiple branches with changes:
Workaround
Quite Claude Code and restart claude. This will clear the file and branch caches, and makes it possible to continue on a clean session.
Reacted by James Hamlin, TC, Mark Van Aken, Aphilas and Utsav Balar
Metadata
Metadata
Assignees
Labels
area:coreautocloseIssue will be closed automaticallyIssue will be closed automaticallybugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsmemoryplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Activity
github-actions commentedon Aug 16, 2025
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
joakimriedel commentedon Aug 16, 2025
#3901 is similar but more recent, please keep this issue until fixed
vanakema commentedon Sep 26, 2025
This is pretty annoying. This has happened to me several times recently, as I've been using
/clearmore between tasks. Should be a simple task! Would be nice if it was fixed. It probably should get updated before the execution of every prompt so it's always up to date. It's a very cheap operation to at least just get the branch.github-actions commentedon Dec 9, 2025
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
github-actions commentedon Jan 9, 2026
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
xpader commentedon Jan 14, 2026
This is not same as #4629 and #4872.
Old conversation showed after /clear is very bother me every day, when /clear and start new chat about 2 times, old message showed, it happend everytime, and happend in 2.1.x all new version.
github-actions commentedon Jan 21, 2026
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.