[BUG] Update to 1.24012.1 orphans all WSL session history: project key changes but session registry entries are not migrated
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
After updating the Windows desktop app, the session list for my WSL project was empty.
About three weeks of work (24 sessions) vanished from the UI.
The transcripts were NOT deleted. What changed is the project identity key:
before update: --wsl-localhost-mahjong-home-gamba-mahjong-Mortal
after update: -home-gamba-mahjong-Mortal
This looks like a side effect of changing how the app reaches WSL. The old key is derived
from a \\wsl.localhost\... UNC path, the new one from the native WSL path. The app now
bundles claude-ssh-linux-amd64 and spawns remote processes over SSH, consistent with that
change. My 24 old transcripts were still present under the old key directory, while the
app read only from the new key.
Critically, copying the transcripts to the new location is NOT sufficient. I copied all
24 .jsonl files (plus the memory/ directory) into the new WSL-side location and the
session list was still empty after a full restart.
The reason is that the session list is populated from per-session registry entries, not
by scanning transcripts:
%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\
claude-code-sessions\<accountUUID>\<workspaceUUID>\local_<uuid>.json
After the update this directory contained exactly ONE entry, for the session I had just
started. No registry entries were migrated for the 24 pre-update sessions, so they were
unreachable from the UI even though their transcripts existed and were perfectly valid.
Each entry has this shape:
{
"sessionId": "local_<uuid>",
"cliSessionId": "<transcript filename without .jsonl>",
"cwd": "/home/<user>/mahjong/Mortal",
"originCwd": "/home/<user>/mahjong/Mortal",
"createdAt": 1784703495564,
"lastActivityAt": 1784704337283,
"model": "claude-sonnet-5",
"title": "Resume session",
"wslConfig": { "distro": "mahjong" },
"sshRemoteTranscriptPath": "/home/<user>/.claude/projects/-home-<user>-mahjong-Mortal/<cliSessionId>.jsonl",
"completedTurns": 2
}
I recovered the history by generating one registry entry per orphaned transcript,
reconstructing createdAt/lastActivityAt from the first and last timestamp in each .jsonl
and the title from the first user message. After restarting the app all 24 sessions
reappeared and open correctly.
That worked, but it required reverse-engineering an internal, undocumented file format.
A normal user would simply lose weeks of history with no indication that the data is
still on disk.
What Should Happen?
When an update changes how a project path is keyed, the updater should migrate the
existing project directories AND their session registry entries to the new key.
Failing that, the session list should fall back to discovering transcripts on disk when
no registry entry exists for them.
Silently orphaning weeks of history is a particularly bad failure mode here, because the
data still exists and nothing in the UI indicates that, so the user reasonably concludes
it was deleted.
Error Messages/Logs
No error was surfaced. The session list simply rendered empty, which is what made this
hard to diagnose: nothing indicated that the transcripts still existed under the old
project key.
Steps to Reproduce
- Use the Windows desktop app with a project inside WSL2 and accumulate session history
over several days (in my case 24 sessions over ~3 weeks).
- Update the desktop app to 1.24012.1 (bundled Claude Code 2.1.217), which switches the
WSL transport from a \\wsl.localhost\... UNC path to bundled SSH.
- Open the same project after the update.
- The session list is empty. All previous sessions are missing from the UI.
- Observe that the transcripts still exist on disk under the OLD project key directory:
C:\Users\<user>\.claude\projects\--wsl-localhost-<distro>-home-<user>-<path>\
- Observe that copying those transcripts to the new key directory alone does NOT restore
them to the list, because no corresponding local_<uuid>.json registry entries exist.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.217
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
Desktop app version: 1.24012.1 (Windows MSIX package Claude_pzs8sxrjxfjjc)
Bundled Claude Code: 2.1.217
Host: Windows 11 + WSL2
I am happy to share the script I used to regenerate the registry entries if that helps
with building a proper migration path.
The same update also broke the branch selector for WSL projects, which I filed separately.