Desktop app: clear_session(self) reports success but never clears; the session then ignores incoming send_message
Environment
- Claude desktop app (Code tab), Windows 11 Home 10.0.26200
- Claude Code CLI on PATH: 2.1.97 (desktop app build number not captured)
- Model: Opus 5
Summary
A session calls mcp__ccd_session_mgmt__clear_session with session_id: "self". The call succeeds and says the session will be cleared when the turn ends. The turn ends and the session goes idle, but the conversation is never cleared. The documented reasons for a dropped clear were ruled out in the last two attempts. In the last attempt, the session also didn't respond to a send_message that arrived about 2 minutes later.
Steps to reproduce
- Open a session in the desktop app. Turn Remote Control off, and make sure no background tasks or crons are running.
- As the session's final action in a turn, call
clear_sessionwith"self". Approve the prompt, or run in bypass permissions mode. - Let the turn end without sending anything to that session.
- After about 2 minutes, send it a message from a second session with
send_message.
Expected
- The conversation clears once the turn ends.
- The later message starts a turn in the new, empty conversation.
Actual
- The tool returns success, but the conversation is never cleared.
- Attempt A (Remote Control off, approval prompt accepted): the message from the second session was delivered, but it ran in the old, uncleared conversation.
- Attempt B (bypass permissions mode, Remote Control off):
send_messagereturnedundelivered, with the note "that session gave no sign of starting on it within 20s". That session's transcript has no turn for the message. The session stayed in the old conversation.
Ruled out (the tool description names these as reasons a queued clear is dropped)
- Remote Control: turned off before both attempts.
- Background work: none was running in the clearing session.
- New message before the clear: nothing was sent until about 2 minutes after the turn ended.
- Stopped or archived: the session was neither.
- Approval: accepted in A, not required in B (bypass).
Why it matters
There is no working way for a session to hand off and restart its own context in the same window. Computer use also can't type /clear into the app, because it refuses to control the Claude app. Related feature requests: #20267, #35150, #37307, #9118, #68127.
Note
When the tool accepts a clear it will later drop, it gives no error or other feedback. Even if a dropped clear is intended behaviour, the result shouldn't read as success.
3 Comments
Follow-up question: the descriptions of
mcp__ccd_session_mgmt__stop_sessionandmcp__ccd_window__open_session_inboth refer tostart_sessionandhand_off_to_session("a session this session started (start_session / hand_off_to_session, ...)"). Neither tool is available in my desktop sessions; ToolSearch returns "No matching deferred tools found" for both.Is
hand_off_to_sessionavailable in the desktop app, and if so, how is it enabled? It looks like the intended way for a session to pass its context to a fresh conversation, which would avoid the broken self-clear described above.Thanks for looking at this. Could you share how it was resolved? My desktop app shows no update available, so I can't tell whether a fix is coming in a future build or whether this was closed for another reason. Also, is there a plan to expose
start_session/hand_off_to_session(from my comment above)? Codex has acreate_threadtool that starts a new thread with a prompt, which is what I'm trying to do here.Still happening on macOS with the current Claude desktop app (1.52386.3):
clear_sessionwithsession_id: "self"reports that the session will clear when the turn ends, but the conversation never clears.