[FEATURE] Sync conversation history between CLI and Claude Code desktop app
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 36 comments · opened Feb 26, 2026
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_
36 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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.
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.
Do it!!!
In the new desktop app the local conversations show up briefly then disappear again:
https://www.loom.com/share/fb220281fe4c491799d8741f37e30b8b
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.
+1
For me, on Win10, desktop app code chats appear in the CC CLI (but not vice versa).
+1
On Win10, CC CLI projects/sessions don't appear in CC Desktop, would be super useful to have this
+1
+1, please add this feature
I just realized that this started working for me after i signed out and back in to my claude desktop app
+1 need this feature
+1
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
O mundo todo está esperando por isso
+1
+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.
~/.claude/projects/for CLI session JSONL fileslocal_<uuid>.jsonmetadata file into~/Library/Application Support/Claude/claude-code-sessions/— the same format the Desktop app uses for its own sessionsDownload & run:
+1
+1
Open the Claude Desktop App & tell it you want all your local chats in the sidebar with project or repowise grouping, and it will do it for you. I have done it for myself using Opus 4.8 (effort max, bypass permissions mode). Hope it solves your issue.
+1
Adding a concrete SSH scenario: with Claude Desktop connected to a remote host via the built-in SSH environment feature, sessions created directly on that same remote host (plain terminal
claude, orclaude remote-control) never show up in Desktop's SSH session list — even after restarting Desktop and reselecting the connection.From a quick look at both sides'
~/.claudedirectories, these seem to be three separate mechanisms with no shared discovery: Desktop's SSH sessions are stored locally on the client machine, plain terminal sessions live on the remote host keyed by working directory, andremote-controlsessions have their own registry on the remote host. The JSONL format looks the same across all three, so it seems like a discovery gap rather than a format incompatibility — worth a look if someone wants to dig in further.New:
<img width="968" height="574" alt="Image" src="https://github.com/user-attachments/assets/9b0462f6-a0d5-43d8-af19-bdd8320abc82" />
When this is resolved, it should be an opt-in feature. There are some random benefits to siloing history like technically it's more organized and easier to look through than a shared history, particularly since I make general requests on the app and just use Claude code in the CLI.
Beyond this, as a user I would prefer to be given the option instead of having the choice made for me. Thanks.
Thank you so much! It works like a charm!
My experience on Linux (Ubuntu) — CLI sessions invisible in desktop, partial sync after
/web-setupSetup: Used Claude Code CLI for 2 months (~10 sessions across 4 projects). Then installed the desktop app when it became available for Linux.
What happened:
/web-setup(or similar command) and one specific session started appearing and syncing bidirectionally between CLI and desktopclaude --resumewhile the desktop was running, only that one session appeared — the rest never showed upRoot cause found:
The desktop maintains a separate session index at
~/.config/Claude/claude-code-sessions/<org-id>/<user-id>/with its own JSON files. CLI sessions in~/.claude/projects/*.jsonlare not auto-discovered by the desktop.Workaround:
Manually creating entries in the desktop index pointing to existing CLI
.jsonlsessions:Suggestion: Desktop should scan
~/.claude/projects/on startup and auto-index existing CLI sessions, the same wayclaude --resumediscovers them.Strong +1 on this. The concrete workflow I keep hitting: I start a task in the CLI, then want to pick it up in the desktop app later — exactly the flow Codex supports (start in CLI, continue in the GUI). Today CLI sessions in
~/.claude/projectsnever surface in the desktop/web app, and--cloud/--teleportonly cover new sessions, not the existing local history.This has been filed several times and closed without a fix — #66229 (explicitly "Codex parity"), #56038, #57210, and #62515 (Desktop Recents not surfacing CLI sessions). Worth consolidating those signals here since this is the open thread with the most traction.
Even a read-only import of existing local CLI sessions into the desktop Recents would cover most of the value; bidirectional resume would be the ideal.
Another +1. It would be nice to pick up conversations in either the VS Code extension or the desktop app.
Existing CLI transcript files can be brought into the Desktop session list today, but it is a local import rather than native bidirectional sync. Desktop needs a metadata file whose
cliSessionIdpoints at each transcript under~/.claude/projects/; without that index, the files can be healthy and still remain invisible in Desktop.I built
BasedGPT/claude-code-session-recoveryfor this missing-index case. On Windows or macOS, runpython tools/diagnose.pyfirst and follow the exact command it prints. If it finds orphaned transcript files, the guarded path is a dry run ofsynth_session_metadata.py; review the proposed entries, quit Desktop fully, then apply the printed command. Tony-Rain's Linux mapping demonstrates the same layer, but I would keep using the manual mapping there because the toolkit's metadata writer is not qualified for Linux.That only covers importing existing local CLI sessions into Desktop. It does not provide continuous cloud sync, the reverse Desktop-to-CLI direction, or notifications, so those parts still need a native implementation.
Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)
Any news about this ? I just lost my entire hisory in the desktop app...
Json file are here but I have to manually import all of them :'(
Hey Adamou02, if those JSON files are the CLI
.jsonltranscripts, the data is already on disk. The missing piece is the Desktop metadata entry that points eachcliSessionIdat its transcript.I built
BasedGPT/claude-code-session-recoveryfor this local import case. Runpython tools/diagnose.pyfirst and follow the exact command it prints. If it routes you to metadata synthesis, review the dry run before applying it, then quit Desktop fully before the write step. That can make the sessions visible in the Desktop session list; it is a local import rather than continuous two-way sync.Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)
So I had a similar issue which I couldn't fix with "Troubleshooting → Import ". I did a long headless
claude -pjob overnight in WSL and wanted to read it in Desktop the next morning instead of scrolling a terminal log. It wasn't there, and Help → Troubleshooting → Import says "No CLI sessions to import". WSL has its own home dir, and I think the importer only scansC:\Users\<you>\.claude\projects\.Desktop in general handles WSL paths fine though: its own entries use
wslConfig+sshRemoteTranscriptPath, so you can point it at a transcript inside WSL. Wrote a script that generates that metadata for any WSL CLI session. they then show up in the sidebar and can be resumed from Desktop, appending to the same transcript on both sides (WSL and Desktop):If it helps anyone - https://github.com/viliusjask/claude-wsl-session-importer
Would be nice if the native importer just scanned installed distros tho
A manual local import can bridge the CLI/Desktop gap today, even though native two-way synchronisation is still an upstream feature request.
Desktop needs a metadata file whose
cliSessionIdpoints to each transcript under~/.claude/projects/. I builtBasedGPT/claude-code-session-recoveryfor that missing-index case. On Windows or macOS, run:Follow the exact command it prints. If it routes to metadata synthesis, review the dry-run output first, then fully quit Desktop before applying the printed command. Keep a copy of the metadata and transcript directories before any write step.
This imports existing local sessions into the Desktop session list. It does not provide continuous two-way synchronisation, Desktop-to-CLI discovery, or notifications, which still need native support.
Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)
Related/duplicate request: #87686 (shared/exportable conversation history between Claude desktop app and Claude Code). Closing that one as a duplicate of this.
Feature Request: Shared Situational Awareness Between Chat and Terminal in Claude Desktop
One-line summary
Let Claude Desktop's Chat tab and a pop-out/dockable terminal session overhear each other's outputs and periodically reconcile state, so a human directing both doesn't have to manually relay context between them.
Problem
Claude Desktop already runs Chat, Cowork, and Code (terminal) as tabs sharing the same engine, settings, and MCP config. But the sessions themselves are blind to each other. If I tell the terminal session "I moved the config to /etc," Chat has no idea that happened unless I copy it over myself. As I use both surfaces side by side for the same task, I end up as the sole relay of information between two otherwise-isolated processes.
Related but distinct from anthropics/claude-code#49775 ("Unified session history across CLI, Desktop app, VS Code, and Web") — that issue is about being able to browse past sessions from any surface. This request is about live, concurrent awareness between two active sessions, not history retrieval.
Proposed model: human-in-the-loop orchestration, not autonomous multi-agent negotiation
Important scoping decision: the two sessions should not negotiate task ownership or resolve conflicts themselves. The human is the orchestrator/hub — I decide what each session works on. What's missing is just the awareness layer underneath that, so neither session is operating on stale information about what I told the other one.
Mechanism: broadcast outputs, not shared raw context
[terminal, 14:02] ran migrate.py, exit 0.Reconciliation checkpoints
UI ask
A pop-out or dockable terminal sidebar within Claude Desktop's existing Code tab/terminal, rather than a separate always-detached window — so the awareness layer above has an obvious place to live, and switching between "talk to chat" and "drop into terminal" doesn't mean losing sight of the other.
What this explicitly is NOT
Open design questions
Suggested minimal first version
Skip reconciliation and compression tuning entirely for v1. Just: every finished output in one surface gets a one-line, timestamped, attributed note appended silently to the other surface's context. No UI needed beyond what already exists — just wire the two contexts together. That alone would remove most of the manual copy-pasting between tabs today.