Feature request: native conversation export/import in Claude Desktop (plus: reinstall silently drops sidebar history even though transcripts survive)
Feature request
Please add a supported, native way to export and (re-)import Claude Code conversation history in Claude Desktop — not just as a debugging aid, but as the officially blessed path for backup, machine migration, and OS reinstalls.
Right now the only way to preserve history across a reinstall is to know that raw transcripts live in ~/.claude/projects/*/*.jsonl and are separate from the Desktop app's own sidebar index in ~/Library/Application Support/Claude/claude-code-sessions/.... Nothing in the app tells you this, and nothing in the app can turn a transcript back into browsable history once the index entry is gone.
I wrote a script that analyzed the on-disk index structure closely enough to rebuild it (https://github.com/YangLuSE/claude-reindex-sessions) and a companion script that dumps transcripts to plain Markdown for reading/backup. But export-to-Markdown is a one-way street — it's fine for archiving or sharing a conversation as text, but it can't be imported back into the app, so it doesn't actually solve "restore my interactive history after a reinstall." Only a native, documented export/import format maintained by Anthropic can close that loop reliably and keep working across future app versions — a third-party script inferring an undocumented internal format is not something people should have to depend on for this.
Supporting bug: index loss on .claude restore
Concretely, here's the gap this would fix. Claude Code conversation data is split across two locations that aren't backed up/restored together:
- Raw transcripts:
~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl. - Desktop sidebar index:
~/Library/Application Support/Claude/claude-code-sessions/<accountUuid>/<orgUuid>/local_<uuid>.json— small per-session metadata (cwd, timestamps, title) the app scans to populate each project's history list.
A user who backs up and restores ~/.claude (the natural, documented-feeling thing to do) gets back every transcript in (1), but Desktop shows empty history for every project, because (2) lives outside ~/.claude and wasn't restored. The data isn't lost — it's invisible, and there's no in-app affordance to notice or fix it ("history is empty" looks identical whether you have 0 sessions or 200 orphaned ones).
Repro
- Have a few Claude Code conversations across 1+ projects via Claude Desktop.
- Back up
~/.claudeonly (not~/Library/Application Support/Claude). - Reinstall/reset, restore
~/.claudefrom the backup. - Open Claude Desktop, go to any affected project.
Expected: past conversations show up in the sidebar.
Actual: history appears empty despite the transcripts existing on disk.
Minimal fix (if the full export/import feature is out of scope for now)
On startup, or via an on-demand "rebuild history index" action, reconcile the session index against ~/.claude/projects/*/*.jsonl and backfill any missing entry. This is exactly what the linked script does by hand.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗