claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Sync conversation history between CLI and Claude Code desktop app

Open moazam1 opened this issue 9 months ago β€’ 44 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Currently, conversations I have in the Claude Code CLI (terminal) don't show up in the Claude Code desktop app, and vice versa. They're completely separate with no shared history.

It would be great if both interfaces could access the same conversation history. I often start working on a project in the terminal and later want to continue or review that same conversation from the desktop app. Right now there's no way to do that.

Even a read-only view of CLI sessions in the desktop app would be a huge improvement. Being able to resume them from either interface would be even better.

Proposed Solution

  • Sync conversation history between the CLI and the desktop app so sessions are accessible from both interfaces
  • Allow resuming CLI sessions from the desktop app and vice versa
  • Show desktop notifications when Claude needs input or wants to ask a question

Alternative Solutions

No response

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

moazam1 avatar Feb 26 '26 00:02 moazam1

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/15881
  2. https://github.com/anthropics/claude-code/issues/21744
  3. https://github.com/anthropics/claude-code/issues/15542

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and πŸ‘ the existing issue instead
  • To prevent auto-closure, add a comment or πŸ‘Ž this comment

πŸ€– Generated with Claude Code

github-actions[bot] avatar Feb 26 '26 00:02 github-actions[bot]

This is one of the most frequently hit friction points with Claude Code β€” the CLI and Desktop contexts are completely siloed, so work done in one is invisible in the other.

The underlying issue is there's no shared session identity layer between the two surfaces. The JSONL files exist on disk, but without a unified index that tracks sessions across both environments, you're left doing manual reconciliation.

I've been using Mantra (mantra.gonewx.com) as a cross-surface persistence layer for exactly this β€” it maintains a unified session timeline that works across Claude Code CLI, Cursor, and Gemini CLI, so you get a single view of all sessions regardless of which tool created them. The 'sync between CLI and Desktop' problem effectively disappears because the canonical record lives outside both.

Would be great to see this solved natively at the session ID level, but until then, a cross-surface aggregation layer is the only reliable workaround I've found.

mantrahq502 avatar Feb 26 '26 02:02 mantrahq502

Being able to seamlessly move between CLI and desktop app would be incredible. Right now the two feel like separate islands.

For what it's worth, claude-brain at least solves the config continuity piece β€” your settings, skills, and CLAUDE.md stay in sync across environments via git hooks. Conversation history sync would need native support from Anthropic, but having consistent config across both surfaces is a good start.

toroleapinc avatar Mar 03 '26 22:03 toroleapinc

Do it!!!

Cryptonations avatar Mar 05 '26 19:03 Cryptonations

In the new desktop app the local conversations show up briefly then disappear again: https://www.loom.com/share/fb220281fe4c491799d8741f37e30b8b

moritzkremb avatar Apr 16 '26 17:04 moritzkremb

Please enumerate the local CLI sessions from ~/.claude/projects directly. This would have massive benefit for containerised sandboxed conversations that share a common .claude directory between host and the container.

matuscvengros avatar Apr 18 '26 10:04 matuscvengros

+1

stefmf avatar Apr 18 '26 19:04 stefmf

For me, on Win10, desktop app code chats appear in the CC CLI (but not vice versa).

james6848 avatar Apr 20 '26 09:04 james6848

+1 On Win10, CC CLI projects/sessions don't appear in CC Desktop, would be super useful to have this

xldeveloper avatar Apr 20 '26 10:04 xldeveloper

+1

RAHULKAMBLE781998 avatar Apr 21 '26 03:04 RAHULKAMBLE781998

+1, please add this feature

kytosai avatar Apr 21 '26 09:04 kytosai

I just realized that this started working for me after i signed out and back in to my claude desktop app

moritzkremb avatar Apr 21 '26 16:04 moritzkremb

+1 need this feature

hzmsh avatar Apr 22 '26 02:04 hzmsh

+1

dazuiba avatar Apr 23 '26 00:04 dazuiba

As an Enterprise user who uses both Claude Code CLI and the desktop app, the lack of shared session history between the two creates real friction. I prefer working in the desktop but the cli has its own advantages and i end up switching between the two. Sometimes I am forced to switch from desktop app to cli because the desktop app would simply not respond. If i forget to start conversation in the desktop app then i have to stay in cli for that problem. the remote control feature does give me a workaround but two way syncing would immensely help

madcatz1873 avatar Apr 27 '26 06:04 madcatz1873

O mundo todo estΓ‘ esperando por isso

NatoSousa avatar Apr 27 '26 12:04 NatoSousa

+1

llkoio avatar Apr 28 '26 01:04 llkoio

+1

As a temp workaround, I created this (vibe coded) script.

How it works:

CLI sessions (~/.claude/projects/) and Desktop app sessions are stored separately and don't sync automatically. This script bridges that gap by creating Desktop-compatible metadata entries that point to your existing CLI session files β€” no data is copied or duplicated.

  1. Scans ~/.claude/projects/ for CLI session JSONL files
  2. For each session, reads the title, model, timestamps, and working directory
  3. Writes a local_<uuid>.json metadata file into ~/Library/Application Support/Claude/claude-code-sessions/ β€” the same format the Desktop app uses for its own sessions
  4. On next restart, the Desktop app picks them up and displays them in the sidebar, where you can read history and continue the conversation

Download & run:

  # Download
  curl -o ~/sync-cc-sessions https://gist.githubusercontent.com/harryi3t/ea591e5bd510f5fd5f6c4f7b4d6f1567/raw/sync-cc-sessions
  chmod +x ~/sync-cc-sessions

  # Sync last 7 days (default), then restart Desktop app
  ~/sync-cc-sessions

  # Options
  ~/sync-cc-sessions -d 30      # last 30 days
  ~/sync-cc-sessions -d all     # everything
  ~/sync-cc-sessions --dry-run  # preview without writing

harryi3t avatar Apr 28 '26 17:04 harryi3t

+1

Matt-Harvill avatar May 11 '26 16:05 Matt-Harvill

+1

amdove avatar May 26 '26 21:05 amdove