[BUG] /clear does not preserve previous session for /resume, contradicting in-app description
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?
The in-app description of /clear explicitly states:
"/clear - Start a new session with empty context; previous session stays on disk (resumable with /resume)"
In practice, the previous session is not resumable. After running /clear, the pre-clear conversation does not appear in /resume and cannot be recovered.
What Should Happen?
Per the in-app description, the cleared session should remain on disk and appear in /resume. The conversation history from before /clear should be accessible and resumable.
Error Messages/Logs
No error message. The /clear command executes successfully, but the pre-clear session silently disappears from /resume with no warning.
Steps to Reproduce
- Start a Claude Code session:
claude - Have a conversation (ask a few questions, get responses)
- Run
/clearto start a new session - Exit Claude Code
- Restart Claude Code and run
/resume - Observe: the pre-clear conversation is not listed and cannot be selected
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Prior to v2.1.128
Claude Code Version
v2.1.132
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Related Issues:
- #32871 — /clear creates a new session rather than clearing in-place; likely root cause
- #38158 — author requests this as a feature, but per the in-app description it is intended behavior that is broken
The behavior described in the in-app help suggests /clear should work like git stash — reset working state but preserve history. Currently it behaves more like deleting the branch.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗