claude-code - 💡(How to fix) Fix [BUG] CCD desktop silently drops sessions on relaunch and has no in-app recovery; CLI --resume produces sessions invisible to the sidebar

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

No error messages are surfaced to the user in CCD — that's part of the bug. Sessions disappear silently from the sidebar; no banner, no toast, no warning.

Root Cause

  1. Open CCD desktop with several long-running sessions across multiple git worktrees in the same repo.
  2. Trigger a hard shutdown (power-cut, force-kill, or just taskkill /F /IM claude.exe for a fast repro).
  3. Relaunch CCD desktop.
  4. Observe: only a subset of prior sessions reattach (in my case, 1 of 5–6). The Recents panel does not list the dropped sessions.
  5. Verify the JSONLs are intact on disk at ~/.claude/projects/<encoded-cwd>/<uuid>.jsonl — last line is valid JSON, timestamps continuous up to the moment of shutdown.
  6. Try to find an in-app way to attach the orphaned JSONL: no UI control exists. The launcher input doesn't accept /resume. No "Open session from file" command. Filter/sort controls on Recents don't surface the JSONL.
  7. Recover via CLI: open cmd in the worktree, run claude --resume <uuid>. Session loads. JSONL continues updating. CCD desktop sidebar remains empty for that session — because the CLI pointer's entrypoint:"cli" is filtered out.

Fix Action

Fix / Workaround

Manually editing the CLI pointer to add entrypoint:"claude-desktop" + a synthetic procStart did NOT make CCD surface it, which suggests CCD verifies procStart against the actual Windows process-creation FILETIME via OpenProcess(pid) and rejects mismatches. Good security posture; no user-accessible workaround.

Workaround for affected users

Differences: CLI pointer has no procStart field and entrypoint:"cli" (vs "claude-desktop"). Manually patching the CLI pointer to add a synthetic procStart + entrypoint:"claude-desktop" did NOT cause CCD to show it, which suggests CCD verifies procStart against the real Windows process-creation FILETIME via OpenProcess(pid).

Code Example

desktop-spawned session (visible in sidebar):
{"pid":4536,"sessionId":"812bc45d-...","cwd":"...","startedAt":...,
 "procStart":"639147170176297300","version":"2.1.142","peerProtocol":1,
 "kind":"interactive","entrypoint":"claude-desktop"}

CLI-spawned session (NOT visible in sidebar):
{"pid":8412,"sessionId":"0aafbec7-...","cwd":"...","startedAt":...,
 "version":"2.1.116","peerProtocol":1,
 "kind":"interactive","entrypoint":"cli"}

---

claude --resume <session-uuid>

---

Pointer-file comparison between a desktop-visible session and a CLI-resumed session (both processes alive at the same time):

# desktop-spawned (appears in CCD sidebar)
{"pid":4536,"sessionId":"812bc45d-44d5-4e7d-b079-def901482c6a","cwd":"...\\worktrees\\xenodochial-moore-198763","startedAt":1779134618276,"procStart":"639147170176297300","version":"2.1.142","peerProtocol":1,"kind":"interactive","entrypoint":"claude-desktop"}

# CLI-spawned (alive, JSONL updating, but NOT in CCD sidebar)
{"pid":8412,"sessionId":"0aafbec7-acc5-4c4f-a40c-fb06e79650a9","cwd":"...\\worktrees\\xenodochial-albattani-a86d61","startedAt":1779134642509,"version":"2.1.116","peerProtocol":1,"kind":"interactive","entrypoint":"cli"}

Differences: CLI pointer has no `procStart` field and `entrypoint:"cli"` (vs `"claude-desktop"`). Manually patching the CLI pointer to add a synthetic `procStart` + `entrypoint:"claude-desktop"` did NOT cause CCD to show it, which suggests CCD verifies procStart against the real Windows process-creation FILETIME via OpenProcess(pid).

No error messages are surfaced to the user in CCD — that's part of the bug. Sessions disappear silently from the sidebar; no banner, no toast, no warning.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment

  • CCD desktop, version 2.1.142 (Microsoft Store / MSIX install — package id Claude_pzs8sxrjxfjjc)
  • Claude Code CLI, version 2.1.116, at ~/.local/bin/claude
  • Windows 11
  • Repo with 1 main checkout + 5 git worktrees, each running its own session

What happened

Hard power loss during normal use. 6 sessions had been open across the 6 worktrees, including one ~1-week-old session (~148 MB JSONL, ~49,000 turns) that had just opened PR #364 ~2 hours before the outage.

After reboot:

  1. CCD relaunched and auto-restored only some sessions. Initially 5 of 6 reattached. After a subsequent CCD restart (looking for a recovery UI), only 1 of 6 had a pointer file in ~/.claude/sessions/. The other 5 processes were still running according to tasklist, but had no pointer file and no sidebar entry.
  2. The orphaned session's JSONL was fully intact on disk at ~/.claude/projects/<encoded-cwd>/<uuid>.jsonl — last line valid JSON, clean assistant message, timestamps continuous up to the moment of the power cut.
  3. CCD's "Recents" panel never listed it. The project (worktree) is registered in ~/.claude.json as a trusted folder, so it's known to CCD; the JSONL is in the right per-project directory; but the desktop sidebar's Recents list (which appears to be a curated index, separate from on-disk JSONL discovery) never had a row for it.
  4. No in-app affordance to recover it. The launcher screen ("What's up next") accepts no /resume slash command and exposes no obvious "Open session from file…" or "Attach existing JSONL" control. Filter / sort controls on the Recents header did not surface it either.
  5. CLI-side recovery works but is invisible to CCD. Running claude --resume <uuid> from cmd in the worktree directory successfully resumed the session — full history loaded, conversation continued. But the pointer file CLI writes has entrypoint: "cli", no procStart field, and CCD's sidebar filters it out. Result: session is alive, JSONL is being updated, but the desktop app shows nothing.

Confirmed by inspection

Pointer-file comparison for two co-resident processes (both running, both attached to valid sessions):

desktop-spawned session (visible in sidebar):
{"pid":4536,"sessionId":"812bc45d-...","cwd":"...","startedAt":...,
 "procStart":"639147170176297300","version":"2.1.142","peerProtocol":1,
 "kind":"interactive","entrypoint":"claude-desktop"}

CLI-spawned session (NOT visible in sidebar):
{"pid":8412,"sessionId":"0aafbec7-...","cwd":"...","startedAt":...,
 "version":"2.1.116","peerProtocol":1,
 "kind":"interactive","entrypoint":"cli"}

Manually editing the CLI pointer to add entrypoint:"claude-desktop" + a synthetic procStart did NOT make CCD surface it, which suggests CCD verifies procStart against the actual Windows process-creation FILETIME via OpenProcess(pid) and rejects mismatches. Good security posture; no user-accessible workaround.

Impact

A user can fully lose access to long-running sessions through CCD UI state alone — even though zero data is lost on disk. For a less technical user there is no way to discover that their session still exists. For me it required filesystem inspection from a shell to find the JSONLs, then a separate cmd window to resume the conversation (without model access, since CLI auth differs from CCD auth).

Suggested fixes (any one would resolve)

  1. Auto-restore all prior sessions on relaunch, the way browsers offer "restore previous session" after a crash.
  2. Make "Recents" read on-disk JSONLs in trusted project dirs, not just a curated index. Or expose a "Show all sessions for this project" toggle that does so.
  3. Add an "Open session from file…" command in the launcher / File menu / Recents header.
  4. Surface CLI-resumed sessions in the sidebar (treat entrypoint:"cli" as a legit running session for display purposes, even if the desktop IPC channel is unavailable). At minimum, show them with an indicator so the user knows they exist.
  5. On relaunch, log a banner ("N sessions were not restored — click here to reattach") if any project dirs have JSONLs with recent activity but no live pointer.

Workaround for affected users

From a cmd window in the orphaned session's worktree:

claude --resume <session-uuid>

Session loads in the terminal. Conversation history is intact. Model access depends on CLI auth state. The desktop app will not show this session.

Note

This isn't a one-off — I have at least 5 orphaned sessions on disk after the recent CCD restart cycles. The data is safe, but I cannot access them through the app I normally use. Happy to provide additional diagnostics (full pointer-file contents, version logs, JSONL stat output) if useful.

What Should Happen?

After a relaunch (whether triggered by a crash, power-loss, OS reboot, or normal quit-and-reopen), CCD desktop should make every prior session reachable from the app, without requiring filesystem inspection or terminal commands.

Concretely, any of these would resolve the issue:

  1. Auto-restore every session that had a JSONL written in the last N days, on every CCD launch.
  2. Have "Recents" (or a new "All sessions for this project" view) read on-disk JSONLs in trusted project directories, not just CCD's curated session index.
  3. Add an "Open session from file…" command (launcher, File menu, or Recents header) that lets the user point CCD at an existing JSONL and resume it as a desktop-spawned process.
  4. Display CLI-resumed sessions (entrypoint: "cli") in the sidebar, with an indicator that distinguishes them, so users at least know the session is alive.

Today none of these exist, and a user whose CCD didn't auto-restore a session has no documented in-app path to get it back.

Error Messages/Logs

Pointer-file comparison between a desktop-visible session and a CLI-resumed session (both processes alive at the same time):

# desktop-spawned (appears in CCD sidebar)
{"pid":4536,"sessionId":"812bc45d-44d5-4e7d-b079-def901482c6a","cwd":"...\\worktrees\\xenodochial-moore-198763","startedAt":1779134618276,"procStart":"639147170176297300","version":"2.1.142","peerProtocol":1,"kind":"interactive","entrypoint":"claude-desktop"}

# CLI-spawned (alive, JSONL updating, but NOT in CCD sidebar)
{"pid":8412,"sessionId":"0aafbec7-acc5-4c4f-a40c-fb06e79650a9","cwd":"...\\worktrees\\xenodochial-albattani-a86d61","startedAt":1779134642509,"version":"2.1.116","peerProtocol":1,"kind":"interactive","entrypoint":"cli"}

Differences: CLI pointer has no `procStart` field and `entrypoint:"cli"` (vs `"claude-desktop"`). Manually patching the CLI pointer to add a synthetic `procStart` + `entrypoint:"claude-desktop"` did NOT cause CCD to show it, which suggests CCD verifies procStart against the real Windows process-creation FILETIME via OpenProcess(pid).

No error messages are surfaced to the user in CCD — that's part of the bug. Sessions disappear silently from the sidebar; no banner, no toast, no warning.

Steps to Reproduce

  1. Open CCD desktop with several long-running sessions across multiple git worktrees in the same repo.
  2. Trigger a hard shutdown (power-cut, force-kill, or just taskkill /F /IM claude.exe for a fast repro).
  3. Relaunch CCD desktop.
  4. Observe: only a subset of prior sessions reattach (in my case, 1 of 5–6). The Recents panel does not list the dropped sessions.
  5. Verify the JSONLs are intact on disk at ~/.claude/projects/<encoded-cwd>/<uuid>.jsonl — last line is valid JSON, timestamps continuous up to the moment of shutdown.
  6. Try to find an in-app way to attach the orphaned JSONL: no UI control exists. The launcher input doesn't accept /resume. No "Open session from file" command. Filter/sort controls on Recents don't surface the JSONL.
  7. Recover via CLI: open cmd in the worktree, run claude --resume <uuid>. Session loads. JSONL continues updating. CCD desktop sidebar remains empty for that session — because the CLI pointer's entrypoint:"cli" is filtered out.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.142 (Claude Code desktop); CLI is 2.1.116

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

The orphaned session for which I have the most evidence: it created PR #364 in a private repo ~2h before the power-cut, and was last written 2026-05-18 17:33 UTC. JSONL is 148 MB / 49,170 lines, on disk at ~/.claude/projects/C--Users-Gilbert-...-worktrees-xenodochial-albattani-a86d61/0aafbec7-acc5-4c4f-a40c-fb06e79650a9.jsonl. Happy to attach a ~/.claude/sessions/ directory listing or anonymized pointer files if needed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING