Desktop 3p Code sessions disappear from UI after restart while JSONL transcripts remain on disk
Preflight Checklist
- [x] I have searched existing issues and found related reports, but this case is specifically about Desktop 3p-created sessions not reappearing after restart even though their JSONL transcripts exist.
- [x] This is a single bug report.
What's Wrong?
Claude Code Desktop 3p sessions created from the Desktop UI do not appear to persist in the Desktop Code UI after closing and restarting the app.
The underlying transcript data is not lost: valid .jsonl transcript files remain on disk and contain the expected user/assistant messages plus session metadata. However, after restarting Desktop, the previous Code sessions are not shown/restored in the Desktop UI, which makes it look like the conversation history was lost.
This appears to be a Desktop UI / session index discovery issue rather than transcript data loss.
What Should Happen?
After restarting Claude Code Desktop 3p, sessions created from the Desktop Code UI should still be visible and resumable in the Desktop UI.
If Desktop uses a separate app-side session index, it should either:
- persist index records for Desktop-created sessions reliably, or
- rebuild/adopt them from the existing JSONL transcript files on startup.
At minimum, Desktop should surface that transcript files exist on disk and provide a repair/import/resume path instead of presenting an empty or missing history state.
Steps to Reproduce
- On Windows, open Claude Code Desktop 3p.
- Start a Code session from the Desktop UI in a local project directory such as
<drive>:\path\to\project. - Ask questions / use the session normally.
- Confirm that a transcript file is written under the Claude Code projects transcript directory, e.g.
<claude-code-data>\projects\<encoded-project-path>\<session-id>.jsonl. - Fully close Claude Code Desktop.
- Reopen Claude Code Desktop and return to the Code UI for the same project.
- Observe that the prior session is not shown/restored in the Desktop UI, even though the JSONL transcript still exists and contains the conversation.
Local Evidence (Sanitized)
On my machine, multiple valid JSONL transcripts exist under a Claude Code project transcript directory like:
<claude-code-data>\projects\<encoded-project-path>\<session-id>.jsonl
Each transcript includes metadata similar to:
cwd: <drive>:\path\to\project
entrypoint: claude-desktop-3p
version: 2.1.x
gitBranch: <branch-name>
The transcript files contain full user/assistant messages, so the data is present on disk.
However, the Desktop 3p app-side session index directory exists but does not contain corresponding session wrapper/index files for these sessions. As a result, Desktop does not list or restore them after restart.
Why This Seems Related To Existing Reports But Distinct
There are existing issues about Desktop not showing CLI/VS Code sessions because Desktop does not adopt pre-existing JSONL transcripts.
This report is slightly different: the affected sessions were created from Claude Code Desktop 3p itself (entrypoint: claude-desktop-3p), not only from the standalone CLI or VS Code extension. Desktop writes the JSONL transcripts, but after restart the Desktop UI still does not show the sessions.
Impact
Users may believe their Claude Code Desktop conversation history was lost after restart, even though transcripts are still on disk. This is especially confusing because the data exists but the Desktop UI provides no visible recovery/import path.
Environment
- Platform: Windows
- Product area: Claude Code Desktop 3p / Code UI session history
- Claude Code CLI installed: yes
- Claude Code version family observed in transcripts: 2.1.x
Additional Information
Please avoid requiring users to move JSONL transcripts into project directories or manually edit internal session metadata. The expected behavior is that Desktop-created sessions remain visible across Desktop restarts, or that Desktop can rebuild its UI/session index from the existing transcript store.
14 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Workaround / additional diagnosis
This issue looks closely related to the same family of Desktop session-history problems reported in, for example:
setFocusedSession: sessionId=nulldespite session store loadinglocal_*.jsonindex entries are missingThe common theme is that the transcript data can still exist on disk, but the Desktop Code UI does not show the session because its Desktop-side session index is missing or incomplete.
In my Desktop 3p case, I found a more specific failure mode:
So Desktop had already written a valid temporary session-index file:
but failed to rename it to the final file:
After restarting Desktop, the UI appears to ignore the
.json.tmpfile and only discovers sessions with the final.jsonindex file. The underlying transcript.jsonlis still present and valid.Temporary local workaround
As a temporary workaround, copying valid
local_*.json.tmpfiles tolocal_*.jsonappears to restore the Desktop history entries for those sessions.Important caveats:
.jsonlfiles..jsonfiles.A sanitized PowerShell version of the workaround:
In my local test, running this once restored recent Desktop Code history entries after restart.
Why this may help triage
This suggests that at least one root cause is not only "Desktop does not adopt existing JSONL transcripts", but also:
EXDEV;.json.tmpon next startup;A product-side fix could be one or more of:
EXDEV;local_*.json.tmpfiles and finalize/adopt them;.jsonlfiles when the index is missing;Same issue after 2.1.142 → 2.1.146 update (Windows) — with a detailed on-disk diagnostic
After the 2.1.142 → 2.1.146 auto-update, most coding sessions in the sidebar show "Session not found on disk" / "Session introuvable sur le disque" when clicked. The sidebar still lists them (titles render), but opening any of them fails. Restarting Claude Desktop does not help.
I dug into the on-disk state. The session data is not lost — the app's index simply fails to resolve it:
%APPDATA%\Claude\claude-code-sessions\<workspaceId>\<subId>\local_<uuid>.json— 275 files, each with validsessionId,cliSessionId,cwd,title, timestamps.%USERPROFILE%\.claude\projects\<encoded-cwd>\<cliSessionId>.jsonl— 243 files present.cwd. For one project I checked every session: 9/9 with a persisted transcript had the file at preciselyprojects\<encode(cwd)>\<cliSessionId>.jsonl(encoding: drive:and\→-). Metadata ✓, transcript ✓, path ✓ — yet the UI still reports "not found".Conclusion: not a missing-file problem. Every file the app needs exists and is correctly located. The app's internal session index does not resolve sessions despite a correct on-disk state. The regression appeared with 2.1.146.
Expected: on startup, Claude Desktop should rebuild/resolve its session index from
local_<uuid>.jsonmetadata + the transcripts under.claude\projects\, and open sessions whose files are present.Impact: multi-project session history — a core reason to use Claude Desktop — is fully inaccessible from the UI even though all data is on disk. There is no documented way to force an index rebuild.
Requests:
Related: #38691.
This is a known gap in how the Desktop handles sessions created from its own UI — and your diagnosis is right. The transcript files are intact; what's missing is the Desktop's per-session metadata entry at
%APPDATA%\Claude\claude-code-sessions\<account>\<org>\local_<uuid>.json. Without alocal_*.jsonfile pointing to a transcript, Desktop has nothing to render in the session list, even when the.jsonlis right there on disk.The fastest confirmation: check whether
%APPDATA%\Claude\claude-code-sessions\haslocal_*.jsonentries for the sessions that vanished. If the directory is empty or only contains entries for sessions started since the last restart, that confirms the metadata wasn't persisted.If that's the pattern,
synth_session_metadata.pyfromclaude-code-session-recoverywas built for exactly this — it walks your~\.claude\projects\directory and synthesises metadata entries for transcript files that have no correspondinglocal_*.json. Full write-up at #56172.Worth noting: there's also a "Session not found on disk" variant where the metadata is present but the
cliSessionIdinside it points to a transcript file that no longer exists (different failure mode, different recovery path). @mike161078-afk's comment below describes that variant.Hey mike161078-afk,
What you're describing — session list rows rendering correctly but opening with "Session not found on disk" — looks like a different failure mode from the OP's. Based on my research, the metadata file (
local_<uuid>.json) may be intact and thecliSessionIdfield populated, but the transcript file that UUID points to may no longer be on disk. If that's the case, Desktop can render the session row from the metadata, but when you open it there's nothing to load.Before concluding the data is gone, a few things worth checking:
cliSessionIdin the metadata file holds a UUID stem. The corresponding transcript would be at~\.claude\projects\<project-slug>\<uuid>.jsonl. Check whether that file exists — sometimes the project-slug path changes if the project folder was renamed or accessed via a junction.~\.claude\projects\. If you have any backup copy of that directory from before the update, the transcript files would be there as.jsonlfiles named by their UUID.~\.claude\projects\from before the update window.The
claude-code-session-recoverytoolkit can confirm the exact diagnosis — it cross-references metadata files against transcript files on disk and reports which sessions have broken pointers versus missing transcripts. Write-up at #56172. If the transcript files aren't recoverable, at least that confirms it cleanly rather than leaving it ambiguous.Confirming on the Windows MSIX desktop app — same symptom, with on-disk root-cause evidence.
Environment
Claude_pzs8sxrjxfjjc,entrypoint: claude-desktop-3p1.9255.2.0, bundled Claude Code2.1.149claudeCLI2.1.152is unaffected)Symptom After an auto-update, the Code-tab session sidebar lost ~80 prior sessions and now lists only sessions created since the update. All transcripts are intact in
~/.claude/projects/…/*.jsonl(full history), and both the CLI (claude --resume→Ctrl+A) and the VS Code extension list/open every one by reading the folder directly. So it's purely a Desktop UI session-index issue, exactly as described.Likely root cause (found on disk) The registry at
%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\git-worktrees.jsonwas reset during the update to:A migration to
schemaVersion: 2appears to have dropped all existing worktree entries. Since the desktop app creates a worktree per session, emptying this registry removed those sessions from the sidebar. Theclaude-code-sessionsindex alongside it only contains the current session.What does NOT recover them (so it's index-side, not a filter): full app restart, all session filters set to "All", Group-by → None, and the per-project filter — none surface the pre-update sessions.
Repro
Requested fix (seconding OP): on startup/migration, rebuild/adopt the session index from the existing
~/.claude/projectsJSONL transcripts, and/or add a "rescan sessions" action. As-is it reads as total session-history loss.Another occurrence, same symptom, different angle — adding here instead of opening a duplicate. _Edited: identifiers redacted; technical content preserved._
Environment
2.1.87This case
<internal-project-A><sessionId-A>cwd:C:\Users\<user>\<repo>\.claude\worktrees\<wt-id>claude/<wt-id>.jsonl: ~2 MB; last write2026-06-01T20:28 UTCmcp__ccd_session_mgmt__list_sessionswithlimit=200, include_archived=true(full inventory pulled and grepped — confirmed absent)Important deviation from the original report
This is not only post-restart: the session was still actively rotating its
.jsonl(writes minutes before disappearance was noticed) while already gone from the UI. So the desync can happen while the app is running, not only across restarts.Recurrence for the same user (3 days apart)
<internal-project-B>(separate sessionId / worktree) — same symptom.<internal-project-A>above.\
claude --resume <sessionId>\does NOT reindex the panelTested during the May 30 incident — relaunching the session via CLI brought the conversation back into a terminal, but the desktop panel still did not list it. Whatever maintains the panel index is not driven by \
.jsonl\activity alone.Workaround that works
Read the orphaned \
.jsonl\directly, summarize state, continue work in a new session.Happy to share \
.jsonl\excerpts privately or run any diagnostic if helpful.Same symptom, different trigger — adding here instead of opening a duplicate.
The OP's sessions disappear after a restart while the .jsonl files remain intact. My case is the same end state, but caused by a winget uninstall + reinstall on Windows 11 Build 26200.7922. The reinstall was necessary because the standard ClaudeSetup.exe installer silently fails on this build, and the MSIX sideload workaround produces an app that Windows Search won't index. After the clean reinstall via winget, the sidebar is empty despite two valid .jsonl session files (273 KB and 210 KB) sitting in the correct project directory. Selecting the project folder via the project selector does not restore them, and copying the files into ~/.claude/sessions/ also had no effect.
Environment:
OS: Windows 11, Build 26200.7922
Claude Desktop version: 1.9659.2 (installed via winget install Anthropic.Claude)
How I got here:
The standard ClaudeSetup.exe from claude.com silently fails to install on my build — no error, no app, just the Setup.exe left behind. Followed the MSIX sideload workaround (https://claude.ai/api/desktop/win32/x64/msix/latest/redirect), but the sideloaded app doesn't appear in Windows Search. To fix the search issue, I did a clean winget uninstall + winget install cycle.
What happened:
After the reinstall, the Code tab sidebar is completely empty. However, two substantial .jsonl files survived in the correct project directory. Confirmed via Get-Content that these files contain valid session data — full conversation transcripts are present. The project folder still exists on disk. The .claude\sessions\ directory is empty.
What didn't work:
Fully closing and reopening Claude
Selecting the project folder via the project selector in the Code tab
Copying the .jsonl files into C:\Users\USER\.claude\sessions\
The sidebar remains empty in all cases. Account-level stats (96 messages, 174.6k tokens) load correctly from the server, confirming auth is fine — only the local session index is broken.
What would fix this:
The app should be able to rebuild its session index by scanning the existing .jsonl files in the project directory on startup, rather than presenting a permanently empty sidebar when the index is missing.
Hey Colinator01,
When I’ve had this exact end state (transcripts in
~/.claude/projects/intact, sidebar empty after a reinstall), the gap was%APPDATA%\Claude\claude-code-sessions\being cleared by the uninstall. That’s the Desktop’s per-session metadata index, separate from the transcript files and from~/.claude/sessions/(which is just ephemeral PID files during active sessions, not the persistent index).I built a toolkit for this:
synth_session_metadata.pyinclaude-code-session-recovery. It walks~/.claude/projects/, reads each.jsonl, and synthesises the missinglocal_*.jsonentries. Worth runningdiagnose.pyfirst: it maps both directories and shows you which transcripts are missing metadata before writing anything. Aftersynth_session_metadata.pyruns, restart Desktop and those two sessions should appear in the sidebar.Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)
Hey renatonapel-arch,
The part that stands out here is it happening while the session was still running. The transcript was alive (
claude --resumereached it), so the underlying data wasn’t lost — the Desktop panel just stopped indexing it.Worktree cwd is the unusual factor. When cwd is inside
<repo>\.claude\worktrees\<wt-id>, the project slug ends up embedding.claudein the middle of the path. The Desktop indexer may write a metadata entry under that slug on session start, then something during the session causes it to drop from the panel before close.I built a toolkit for diagnosing this:
diagnose.pyinclaude-code-session-recoverymaps%APPDATA%\Claude\claude-code-sessions\against~/.claude/projects/and shows whether a metadata entry exists for that worktree slug. Running it after the next recurrence would confirm whether the entry was created and then cleared, or never written at all; that’s the deciding factor for whethersynth_session_metadata.pyor a Desktop restart is the right fix.Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)
same issue happening here.
If i restart the desktop app, all history is gone from UI (but still stored on disk)
Bug report — Claude Desktop (Cowork + Code): session/project lists never populate; root cause is the sessions/watch resume loop
Platform: macOS · App: Claude 1.15962.1 (1e236d), build 2026-06-26 (latest) · web bundle 7a099294dd
Why this report is worth prioritizing
Many existing reports describe the symptom (desktop sidebar empty; sessions/projects on disk but not shown) but
not the cause. This report includes the actual failing network call and the client code path that breaks the
sidebar — a concrete, fixable root cause — plus proof that no data was lost. It should let an engineer reproduce
and fix the underlying issue rather than re-triaging the symptom.
This is the same class of bug already filed (and acknowledged by Support) — see "Related, already-open issues" below.
Symptoms
On a clean, latest, fully-signed-in desktop app:
Root cause (from the renderer DevTools console)
The session lists are populated by an SSE stream:
GET https://claude.ai/v1/code/sessions/watch?exclude_tags=- Accept: text/event-stream
Observed responses (status visibly changing over ~1 hour, indicating server-side flux):
410 (Gone) → client logs "sessions/watch 410 resume_token expired"
400 (Bad Request) → client logs "sessions/watch 400 without resume_token available"
Client handler (minified, paraphrased):
jsonopen(t){
if(!t.ok){
if(t.status===410) return o=true, a&&(e.streamPosition=void 0), c(),
reject("sessions/watch 410 resume_token expired");
if(t.status===400 && !s) return c(),
reject("sessions/watch 400 without resume_token available");
}
}
The stored streamPosition (resume cursor) expires → 410; the client clears it and retries without a token →
400; it cannot bootstrap a fresh stream → retry loop (telemetry claudeai.television.sessions_watch.retry_loop
after 5 failures). Because the watch never connects, no added events arrive and the sidebar stays empty.
Corroborating: repeated MaxListenersExceededWarning for ...LocalAgentModeSessions...sessionsBridgeStatus...
(re-subscription loop), and GET /v1/toolbox/shttp/mcp/<id> 405.
These are semantic server responses (the request reaches the server and is understood), so it is not a
client network/VPN/proxy problem — it is the watch resume protocol failing to recover after cursor expiry.
Related, already-open / acknowledged issues (same class)
Data integrity — nothing is lost
All of the following are present and valid on disk (every relevant JSON parses cleanly; a full pre-incident backup also exists):
local-agent-mode-sessions/<ws>/<proj>/ — 84 cowork session .json + working folders; project spaces intact under spaces/ (with populated memory/); .project-cache/*/metadata.json valid.
claude-code-sessions/.json (8) and ~/.claude/projects/*/*.jsonl (75 transcripts).
What does NOT fix it (verified by hand)
Latest app · cleared Cache/Code Cache/Service Worker · restored full IndexedDB from backup · disabled VPN ·
full sign-out/in · validated all index/config JSON. None changed the result. (Consistent with other reporters:
restart and re-login do not restore the lists.)
⚠️ Please stop recommending destructive resets
In #45076, Support advised rm ~/.claude.json + rm -rf ~/.claude/. In my case, a similar "recovery" procedure
(run by an assistant) deleted ~/Library/Application Support/Claude — destroying app state and causing the
orphaned-session condition, with no recovery path. These resets lose data without fixing the UI. Please remove
this from support playbooks and never recommend it for this symptom.
Requested fixes
Steps to reproduce
Another data point (macOS, resolved): a single
local_*.jsonindex entry withnulltimestamps blanks the ENTIRE Code session sidebar — with zero errors loggedEnvironment: macOS (Darwin 25.5), Claude desktop 1.20186.0, bundled Claude Code 2.1.205
Symptom: Same end state as the OP — after every restart the Code session sidebar was completely empty, while on the very same launch
main.logreportedLoaded 34 persisted sessions from .../claude-code-sessions/<account>/<org>and theccd_session_mgmt list_sessionsMCP API returned every session. Transcripts in~/.claude/projects/were all intact. So: disk ✓, main process ✓, session API ✓, renderer list ✗.What did NOT fix it (each attempted with the app fully quit and residual processes verified dead first):
IndexedDB+Session StorageLocal Storage,WebStorage,blob_storage,Session Storage,IndexedDB,Cache,Code Cache,GPUCache) — the app recreated everything fresh; sidebar still blank on a 100% clean renderer state~/.claude/projects/Root cause (confirmed by the fix): Auditing the 34 index files in
~/Library/Application Support/Claude/claude-code-sessions/<account>/<org>/, exactly two were malformed:"createdAt": null, "lastActivityAt": null, "lastFocusedAt": null(and a degenerate auto title)cliSessionId(two index files → same transcript)Moving just those two files out of the directory and restarting immediately restored the full sidebar.
(Honest caveat: these two entries were not written by the app — they were synthesized by an earlier session-import attempt on this machine. But the client fragility is the actionable part.)
Why this matters for this issue:
Loaded 34 persisted sessions. Presumably the list sort/format throws on thenulltimestamps and the component renders empty. Suggested fix: validate index entries on load, skip+log malformed ones instead of failing the entire list.claude-code-sessions/<account>/<org>/local_*.jsonfor entries withnulltimestamps or duplicatecliSessionId, and quarantine those first. In my case every cache/storage reset was useless because the problem was index data, not renderer state — consistent with upthread reports that resets never fix this class of symptom (and can destroy data).Another data point:
onQuitCleanuphits a fixed maxtimeout and aborts before all sessions' resume state is savedEnvironment: Windows 11, Claude desktop
1.20186.1.0(also reproduced on1.20186.0.0), bundled Claude Code2.1.205.Symptom: Same end state as OP — after a restart, one or more Code sessions in the sidebar show "Session not found on disk" (only Archive/Delete offered), while their
.jsonltranscripts underclaude-code-config-stable/projects/<encoded-path>/remain fully intact and valid (verified byte-for-byte: last line is well-formed JSON, file ends with a trailing newline, no truncation).I hit this general symptom (transcript intact, resume link broken) 6 times over 3 days, mostly via the machine rebooting while sessions were left open — those runs show the child Claude Code process exiting with
1073807364(a Windows forced-termination code), which is a distinct, more obviously-forceful failure path.New evidence — on the most recent occurrence, the app was quit deliberately (not force-killed by a reboot), and it still broke.
main.logfor that quitting run shows:local-session-stop-allitself completes successfully and both affected sessions'query iterator completedcleanly — so process termination is graceful, not a forced kill. But there is a fixed overall timeout on the onQuitCleanup phase (roughly ~75–90s from the first cleanup step in my logs), and once it's hit, whatever cleanup tasks haven't run yet are simply dropped. If a per-session "save resume/cliSessionId index" step runs afterlocal-session-stop-all(as a separate task) and hasn't executed yet when the timeout fires, that session is left with a stale/missing resume pointer even though its transcript was flushed correctly.On the next launch, that specific session logs:
...even though the
.jsonlfor thatcliSessionIdis present and non-empty on disk. Meanwhile a sibling session that was open in the same window at quit time comes back withwarmed successfullyand no resume issue at all — so this isn't "all sessions broken", it's whichever session's index-save task didn't get a turn before the timeout (order/timing dependent, not consistently reproducible per-session).This happened even on a deliberate, non-forced app quit — i.e. this is not purely a "Windows killed the process mid-flight" issue (which is a separate, also-real failure mode I hit earlier with the same end symptom, via
exit code 1073807364when a reboot force-kills the process directly). Both paths land on the same "session not found on disk" UI state, but the quit-with-time-to-clean-up path shown above seems like a pure ordering/timeout bug inonQuitCleanup, independent of whether the app got force-killed at all.Workaround found (no data loss, no manual file surgery needed): using the
send_message-to-another-session capability (exposed via theccd_session_mgmtMCP tool bundled with Claude Code) against the "not found" session causes the desktop app to logsendMessage on uninitialized session; cold-starting via startSession, which re-resumes the session from its still-intact transcript (confirmed viacache_hit=trueand full prior context present) and re-establishes a workingcliSessionIdmapping. This suggests the app can successfully rebuild the resume link from the on-disk transcript when asked to — it just isn't triggered automatically when the sidebar shows "Session not found on disk" (only Archive/Delete are offered there).Suggested fixes, in rough priority order:
cliSessionIdsave step run (or complete) before lower-priority cleanup (remote plugin sync, etc.) inonQuitCleanup, or give it its own guaranteed time budget so it isn't the one dropped when the overall timeout fires.cliSessionId(or can be found by scanning the project's transcript directory), offer a "Reconnect" action in the UI that does what thesend_messagecold-start path above already does internally — instead of only Archive/Delete.[warn] onQuitCleanup reached maxtimeout) naming which cleanup tasks were dropped, to make this class of bug diagnosable without needing debug-log archaeology.Happy to provide the full (locally-sanitized) log excerpts around this occurrence, or timestamps for the other 5, if useful.