anthropics / anthropics/claude-code

/clear in the desktop app does not leave the previous session recoverable (unlike CLI)

Open
#94,809 0 comments 0 reactions 0 assignees View on GitHub
area:desktop bug
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

On the CLI, `/clear` appears to start a new session while leaving the
previous one recoverable via `/resume` (or listed among past sessions).

On the desktop app, `/clear` instead wipes the current session's chat
history without leaving a recoverable "old" session behind. Verified via
the `list_sessions` MCP tool (including `include_archived: true`): after
running `/clear` in a session, no previous session for the same project
appeared in the list — archived or not.

Working tree / git state is unaffected, only the chat/context history is
lost.

**Expected**: `/clear` on desktop should behave like the CLI — start a
fresh context while keeping the prior conversation accessible (e.g. via
session history / resume).

**Actual**: prior conversation is permanently gone after `/clear` on
desktop.

Contributor guide

No contributing guide indexed for this repository

Research direction

Compare the desktop and CLI entry points for `/clear`, then trace how `/resume` and the `list_sessions` MCP tool represent the previous session, including archived sessions. Reproduce the behavior in both interfaces and verify that desktop `/clear` creates a fresh context while the prior conversation remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.