[BUG] `/clear` in Claude Desktop resets current session in-place instead of creating a new session
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?
In Claude Desktop (macOS), running /clear resets the current session in-place rather than creating a new session. The current session is renamed to "General coding session" in the sidebar and its message content is replaced with "No messages yet" — making the entire session history inaccessible through the UI.
In the terminal CLI, /clear correctly creates a new context window while preserving the original session as a separate, accessible entry in the session list. The desktop app does not match this behavior.
The raw .jsonl transcript file survives on disk at ~/.claude/projects/<project>/<uuid>.jsonl, but because the desktop app's session cache entry is reset rather than a new one being created, the transcript is permanently orphaned — there is no UI path to access it.
What Should Happen?
/clear in Claude Desktop should behave the same as in the terminal CLI: start a fresh context window (new session entry in the sidebar) while preserving the original session — including its title and full conversation history — as a separate, accessible entry.
Error Messages/Logs
Steps to Reproduce
- Open Claude Desktop (macOS) and start a session with at least a few messages in it
- Run
/clearin the chat input - Sidebar: the session is renamed to "General coding session"
- Main panel: "No messages yet" — all prior messages are gone
- Navigate away and back; restart the app — the history does not return
- Confirm the
.jsonltranscript still exists on disk at~/.claude/projects/.../<original-uuid>.jsonl— data is intact but inaccessible
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude 1.15200.0 (250bae) 2026-06-23T05:40:53.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Screenshots
Before running /clear
<img width="1392" height="1522" alt="Image" src="https://github.com/user-attachments/assets/f7ac0158-4b0a-4dd0-9d08-19a8d139b2b9" />
After running /clear
<img width="1392" height="1522" alt="Image" src="https://github.com/user-attachments/assets/1ef0c822-ff47-4c03-93a5-8c0875d4f361" />
Related Issues
- #59534 — same
/clearsession-preservation failure in CLI (closed stale); my bug is the desktop-app manifestation - #61172 — open CLI issue for the name-inheritance half of the same problem
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗