Repository navigation
Conversation
…and Claude-3p folders Claude Desktop 3.1623.0 on Windows moves its data from the MSIX LocalCache to %LOCALAPPDATA%\Claude-Data\claude_<hash>\ on first launch and removes the old path, so Desktop sessions stopped being found. Third-party mode keeps its own Claude-3p folder, under %LOCALAPPDATA% since 1.5186.0 and %APPDATA% before. The win32 branch now also scans %LOCALAPPDATA%\Claude-Data for claude_* directories (sorted, missing folder tolerated) and checks both Claude-3p locations. Each new root is used only when its local-agent-mode-sessions directory exists. The classic and MSIX paths stay first, and the cache key is unchanged since every new path derives from APPDATA, LOCALAPPDATA or the home.
On an MSIX install the Claude-Data folder is named after the package family,
<publisher>.claude_<hash>, not only claude_<hash>, so the startsWith('claude_')
filter skipped it. Match names that start with claude_ or contain .claude_,
case-insensitively, like the Packages filter.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LocalCacheto a folder under%LOCALAPPDATA%\Claude-Data\on first launch and removes the old path (anthropics/claude-code#103860).getDesktopSessionsDirs()only checked%APPDATA%\Claudeand%LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude, so Desktop (Cowork) sessions on an updated Windows install are no longer found.Claude-3proot was checked on macOS only. On Windows, 3P mode keeps its data in%LOCALAPPDATA%\Claude-3p\since 1.5186.0, and in%APPDATA%\Claude-3p\before that (Claude Desktop on 3P: where data lives).Paths added (win32 only)
After the existing classic and MSIX roots, in this order:
%LOCALAPPDATA%\Claude-Data\<folder>\local-agent-mode-sessions, where<folder>is eitherclaude_<hash>(the shape in the issue report) or the MSIX package family<publisher>.claude_<hash>, matched case-insensitively as "starts withclaude_or contains.claude_", like the existingPackagesfilter. Scanned withreaddirSync(..., { withFileTypes: true }), sorted by name. A missing or unreadableClaude-Datafolder is ignored.%LOCALAPPDATA%\Claude-3p\local-agent-mode-sessions%APPDATA%\Claude-3p\local-agent-mode-sessionsEach new root is used only when its
local-agent-mode-sessionsdirectory exists, as for MSIX packages. UnsetAPPDATA/LOCALAPPDATAfall back to~/AppData/Roaming/~/AppData/Local, as before. The legacy paths are kept for installs that have not updated yet. The cache key is unchanged: every new path derives from inputs it already holds (platform, override,APPDATA,LOCALAPPDATA, home). Results still go throughdedupeResolved, so order is stable and duplicates are dropped.CODEBURN_DESKTOP_SESSIONS_DIRstill overrides everything.docs/providers/claude.mdlists the new locations and the resolution order.Not in this PR
DAILY_CACHE_VERSIONis not bumped. Days sealed while these sessions were missed keep their lower figures. Precedent (v50, v51) bumped it for new discovery roots; happy to add that here if you want it.usage_guard.rsonly watches%APPDATA%\Claude\local-agent-mode-sessions(it never watched the MSIX roots either), so it won't wake on writes underClaude-Data.Claude-3pfolders underPackages\Claude_*\LocalCache\{Local,Roaming}\Claude-3pon Windows 10. Not added.Testing / Verification
anthropicpbc.claude_<hash>shape, which the first version of this PR missed and the current one matches. Box stays unticked until a rerun on that machine confirms it.npm testpasses: 5724 passed, 7 skipped, 1 failed. The failure istests/perf-harness-phase0.test.ts("refusing to write fixtures under the real home"), which fails the same way onmainon my machine, so it comes from the environment and not this change.npm run test:locks: 37 passed.npx tsc --noEmitpasses.npm run build:clisucceeds (did not run the dashboard build; no dashboard changes).New tests in
tests/providers/claude-config-dirs.test.ts, in the existing "Desktop sessions dir" block and using its temp-dir andwithPlatformstyle:Claude-Datahash root, ordered after the classic and MSIX rootsclaude_folder and a hash folder withoutlocal-agent-mode-sessionsare skippedanthropicpbc.claude_<hash>), with an unrelatedsomeotherapp_xfolder skippedsomeotherapp_xandnotclaude_xskippedClaude-DataandClaude-3preturn only the classic root, without throwingClaude-3punder bothLOCALAPPDATAandAPPDATALOCALAPPDATAunset falls back to~/AppData/LocalforClaude-DataandClaude-3pCODEBURN_DESKTOP_SESSIONS_DIRstill wins over all of them