/desktop handoff fails with 'CLI session transcript not found' (young session, transcript jsonl not yet flushed)

Resolved 💬 2 comments Opened May 24, 2026 by minami-s-ji Closed May 28, 2026

Bug: /desktop handoff fails with "CLI session transcript not found" when session is young

Versions

  • Global Claude Code CLI: 2.1.150 (Homebrew)
  • Claude Desktop app bundled claude binary: 2.1.138
  • Claude Desktop app version: 1.7196.0
  • macOS: 15.7.5 (24G624)

Steps to reproduce

  1. From Terminal: cd ~/<some-project-dir> && claude (CLI launches, TUI loads)
  2. Inside the just-started session, type /desktop and press Enter
  3. CLI exits, Desktop app receives the handoff

Expected

Desktop app opens the session with full transcript continuity (per docs/community guides referencing /desktop).

Actual

Modal dialog appears:

Couldn't open session

CLI session transcript not found:
<session-uuid>

Filesystem inspection after failure

$ ls ~/.claude/session-env/<session-uuid>/
# directory exists, but is EMPTY

$ find ~/.claude/projects -name "<session-uuid>*"
# no file found — transcript jsonl was never written

$ ls ~/.claude/projects/-Users-<user>-<project>/*.jsonl
# many other session jsonls exist, just not this one

Hypothesis

/desktop triggers handoff before the CLI session's transcript is flushed to ~/.claude/projects/<encoded-cwd>/<uuid>.jsonl. If /desktop is issued early (before substantive interaction that would force a flush), the projects/ jsonl is never created, but ~/.claude/session-env/<uuid>/ is. The Desktop app then attempts to open the transcript and fails.

Related issues

  • #56038 (CLI/Desktop session sync — CLOSED, no fix)
  • #61967 (CLI ↔ Desktop history sync — OPEN, filed 2026-05-24)
  • #52743 (--desktop CLI flag — CLOSED as duplicate)

Suggested fix area

Either (a) flush transcript to disk before handoff signal, or (b) Desktop app should poll for the transcript file with a reasonable timeout before showing the error.

Why this matters

We tried to use /desktop handoff to combine claude --channels plugin:imessage@claude-plugins-official (iMessage channel, requires Terminal launch) with the Desktop app (required to retain access to the Conversations tab — Terminal-launched sessions don't appear in Conversations). The handoff failure makes this combination unusable.

The iMessage channel does work end-to-end when launched purely from Terminal (verified: outbound message via reply tool, inbound free-text from iPhone, Permission Relay with Apple Watch yes/no reply — all functional). Only the Desktop-app integration path is blocked by this handoff bug.

Happy to provide additional logs / repro environment.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗