[BUG] Desktop app permanently orphans an opened session after a path change — silent replacement, no re-link option
Summary
When the path backing a session changes (project folder moved/renamed, or the ~/.claude/projects/<slug> archive dir renamed during an attempted migration), the desktop app's failure mode is destructive in a way the CLI's is not: opening the affected conversation shows a "conversation records missing" popup, then the app silently rebinds the window to a brand-new empty transcript ID and drops the original session from the sidebar. Renaming the path back — which fully restores sessions in the CLI/VS Code (see #33636) — does not restore the desktop entry. The original .jsonl transcript is intact on disk the whole time, but there is no way to re-attach it.
Environment
- Claude Code desktop app, macOS (Darwin 25.5.0)
- 2026-07-16
Steps to reproduce
- Have a conversation in the desktop app under project folder A.
- Rename the corresponding
~/.claude/projects/<path-slug>directory (e.g. attempting to migrate the project to a new location), or rename/move the project folder itself. - In the desktop app, click the conversation in the sidebar.
- Popup: conversation records missing. The window keeps its title but is now bound to a new empty transcript UUID; the original session disappears from the sidebar.
- Rename the directory back to the original slug.
Expected: the session re-links (as CLI does), or at minimum an option to retry/locate the transcript.
Actual: the original session entry is gone permanently. The old .jsonl is still on disk and fully readable, but the app offers no import/re-link. (Sessions in the same project that were not clicked while the path was wrong survive untouched — the destruction happens lazily on open.)
Impact
For non-technical users this reads as total data loss. In my case the transcript had to be recovered by manually parsing the orphaned .jsonl.
Requests
- Short term: don't destroy on failure — if the transcript can't be found on open, keep the session entry, offer "Retry / Locate transcript", never silently rebind the window to a fresh empty transcript.
- Medium term: an "import / re-link conversation" affordance that re-attaches an orphaned
.jsonl(the CLI can already resume arbitrary session IDs; the desktop app just needs a door to it). - Long term: path-independent session identity, as previously requested in #41630, #55831, #37954, #27473 (all closed as stale/not planned — this keeps biting real users).