claude-code - 💡(How to fix) Fix CLI-created sessions invisible in Desktop app (reverse direction broken)

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…

Root Cause

The two entry points use different session registration mechanisms:

CLIDesktop
Conversation data~/.claude/projects/{project}/{id}.jsonl~/.claude/projects/{project}/{id}.jsonl
Session metadata~/.claude/sessions/{pid}.jsonAppData/Local/Claude-3p/claude-code-sessions/{group}/{sub}/local_{id}.json
  • Desktop → CLI works because CLI resume reads JSONL files directly from ~/.claude/projects/
  • CLI → Desktop fails because Desktop discovers sessions by scanning AppData/Local/Claude-3p/claude-code-sessions/, and CLI never creates metadata files there
RAW_BUFFERClick to expand / collapse

Bug Description

CLI-created sessions are invisible in the Claude Desktop app, but Desktop-created sessions can be viewed in CLI via resume. This is a one-way sync issue.

How to Reproduce

  1. Open Claude Code CLI directly (not launched from Desktop app)
  2. Have a conversation — session is saved to ~/.claude/projects/{project}/{sessionId}.jsonl
  3. Open Claude Desktop app
  4. The session does not appear in the session list

Reverse direction works fine:

  1. Create a session in the Desktop app
  2. Use claude --resume in CLI — the session is found and accessible

Root Cause

The two entry points use different session registration mechanisms:

CLIDesktop
Conversation data~/.claude/projects/{project}/{id}.jsonl~/.claude/projects/{project}/{id}.jsonl
Session metadata~/.claude/sessions/{pid}.jsonAppData/Local/Claude-3p/claude-code-sessions/{group}/{sub}/local_{id}.json
  • Desktop → CLI works because CLI resume reads JSONL files directly from ~/.claude/projects/
  • CLI → Desktop fails because Desktop discovers sessions by scanning AppData/Local/Claude-3p/claude-code-sessions/, and CLI never creates metadata files there

Expected Behavior

CLI-created sessions should appear in the Desktop app's session list, either by:

  • CLI writing metadata to the AppData location when a Desktop group exists
  • Desktop also scanning ~/.claude/projects/ for JSONL files without AppData metadata
  • A sync mechanism that reconciles the two registries

Environment

  • Claude Code version: 2.1.149
  • OS: Windows 11 Pro
  • Both CLI and Desktop app (claude-desktop-3p entrypoint)

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