[BUG] Remote-SSH desktop sessions not restored after app restart (transcripts exist on disk) — v2.1.197

Open 💬 0 comments Opened Jul 2, 2026 by GeorgiouJohn

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?

Summary

On the Claude Code desktop app, sessions running over a remote SSH
connection do not reappear as resumable after the app is closed and
reopened — the transcript is not loaded into the UI — even though the
.jsonl transcript files are fully intact on the remote host. Local
(non-remote) sessions restore fine.
This reproduces on every
close/reopen, not just once.

Possibly related to #65333, but that report is a one-time, server-side
regression across mobile/web/desktop on CLI 2.1.161. This is different:
reproducible on every restart, specific to remote-SSH desktop sessions,
on v2.1.197, and the evidence points to a client-side cause.

Environment

  • Claude Code version: 2.1.197 (from transcript version field)
  • entrypoint: claude-desktop
  • remote helper: ~/.claude/remote/ccd-cli/ (2.1.181, 2.1.187, 2.1.197 present)
  • Desktop app host: 192.168.0.98 → remote relay (where ~/.claude lives): 192.168.0.23:22
  • Remote host OS: Linux 6.8.0-124-generic (Ubuntu) x86_64

Steps to reproduce

  1. From the desktop app, open a session over a remote SSH connection and use it.
  2. Fully close the desktop app.
  3. Reopen the desktop app and reconnect to the same remote host.
  4. Observed: the previous remote session does not appear / its transcript

is not loaded, even though the .jsonl exists on the remote.

  1. Expected: the session is listed and its transcript restorable, the same

way local sessions are.

Evidence

Repro session: f5619e7a-0ee5-4fbe-9620-a4f0619d0917

Transcript survives and even grows across the restart (same sessionId
continues on the backend), so nothing is lost on disk:

BEFORE close:  84631 bytes  f5619e7a-….jsonl
AFTER reopen: 121884 bytes  f5619e7a-….jsonl   (still readable, 63 lines)

The ~/.claude/sessions/ registry is keyed by live PID, not sessionId:

// BEFORE close — two live entries
{"pid":293707,"sessionId":"f5619e7a-…","kind":"interactive","entrypoint":"claude-desktop","name":"crm-dev-09","nameSource":"derived", …}
{"pid":292625,"sessionId":"62345249-…","kind":"interactive","entrypoint":"claude-desktop","name":"crm-dev-26","nameSource":"derived", …}

// AFTER reopen — old PID entries wiped; only a NEW pid remains, renamed
{"pid":294676,"sessionId":"f5619e7a-…","kind":"interactive","entrypoint":"claude-desktop","name":"crm-dev-f1","nameSource":"derived", …}

Analysis / suspected root cause

  • The session data is fully intact on the remote (projects/**/*.jsonl).
  • On app close, the PID-keyed registry in ~/.claude/sessions/ is wiped of

its entries (the remote ccd-cli processes exit).

  • On reopen, the app appears to build its resumable-session list from that

live PID registry (or local client-side state) and does not fall back
to scanning the remote projects/**/*.jsonl transcripts.

  • Result: remote-SSH sessions vanish from the UI on restart even though their

transcripts are present and readable.

  • Note: kind is "interactive" for both local and remote sessions — there

is no remote flag in the remote-side session json, so the local/remote
distinction is tracked on the client (app) side.

Expected behavior

After closing/reopening the desktop app, remote-SSH sessions should be listed
and their transcripts restorable — by falling back to the on-disk
projects/**/*.jsonl transcripts when the live PID registry no longer has an
entry, exactly as local sessions are restored.

Impact

Every remote-SSH session becomes unreachable in the UI after an app restart;
work must be resumed manually (if the sessionId is known at all).

What Should Happen?

After closing and reopening the desktop app, sessions that ran over a remote
SSH connection should be listed and their transcripts restorable — exactly
like local sessions. When the live PID registry in ~/.claude/sessions/ no
longer has an entry (because the remote process exited on app close), the app
should fall back to scanning the remote projects/**/*.jsonl transcripts to
rebuild the resumable-session list, instead of dropping the session from the UI.

Error Messages/Logs

Steps to Reproduce

  1. Open the desktop app and start/use a session over a remote SSH connection.
  2. Fully close the desktop app.
  3. Reopen the desktop app and reconnect to the same remote host.
  4. Observe: the previous remote session does not appear and its transcript is

not loaded in the UI — even though its .jsonl file still exists (and is
readable) on the remote host under ~/.claude/projects/**/.

  1. For comparison: local (non-remote) sessions restore normally after the same

close/reopen cycle.

Reproduces on every close/reopen (not a one-time event). Observed on v2.1.197,
entrypoint claude-desktop, remote via ccd-cli.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.197 (entrypoint: claude-desktop; remote helper ccd-cli 2.1.197)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗