[BUG] Transferring between PC sidebar does not populate
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?
Here's a technical bug report you can post to the GitHub issues page:
Title: Session history not migrated to new PC — claude-code-sessions entries ignored by sidebar
Environment:
Claude Desktop app: Claude_1.3883.0.0_x64 (Windows Store)
Claude Code CLI: 2.1.111
OS: Windows 11
Old PC username: jmill → New PC username: User
Project path: C:\Users\User\OneDrive\Desktop\Scanner_windsurf_test
Problem:
After migrating to a new PC, previous sessions do not appear in the Claude Code sidebar Recents. Only sessions created natively on the new PC are visible.
What was investigated:
Session data location — Confirmed sessions stored in two places:
~/.claude/projects/C--Users-User-OneDrive-Desktop-Scanner-windsurf-test/*.jsonl (CLI sessions)
[project]/.claude/projects/C--Users-User-.../*.jsonl (desktop sessions, synced via OneDrive)
Path migration — All .jsonl files contained hardcoded C:\Users\jmill\ paths. Replaced all occurrences with C:\Users\User\ using PowerShell across both locations. Confirmed successful.
Folder renaming — Renamed all C--Users-jmill- encoded project folders to C--Users-User- in both ~/.claude/projects/ and [project]/.claude/projects/.
claude-code-sessions — Located the session registry at:
C:\Users\User\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\
Confirmed working sessions use format:
{"sessionId":"local_<uuid>","cliSessionId":"<jsonl-filename-uuid>","cwd":"C:\\Users\\User\\OneDrive\\Desktop\\Scanner_windsurf_test","originCwd":"...","createdAt":<ms>,"lastActivityAt":<ms>,"model":"claude-sonnet-4-6","effort":"medium","isArchived":false,"title":"...","titleSource":"auto","permissionMode":"acceptEdits","remoteMcpServersConfig":[],"completedTurns":1}
Created 32 matching entries for all old sessions using this exact format. Confirmed files written correctly. Sidebar still only shows 2 natively-created sessions.
IndexedDB — Deleted IndexedDB folder to force rebuild. After restart, same 2 sessions shown. Confirmed sidebar reads from claude-code-sessions, not IndexedDB.
SharedStorage — Confirmed SQLite format, 4096 bytes (1 page, essentially empty). Not the session store.
Session file format — Confirmed old desktop sessions have identical first-line format ("type":"queue-operation") to working native sessions. CLI sessions start with "type":"progress". Both types registered — neither shows.
Key finding:
The app correctly reads claude-code-sessions (2 original entries show), but silently rejects all 32 externally-created entries despite identical JSON format and valid corresponding .jsonl files. No error is surfaced. The validation criterion that distinguishes natively-created entries from externally-created ones is unknown.
Request:
Please document the session migration process for PC transfers, or provide an official import mechanism. Many users will face this when moving machines.
What Should Happen?
sidebar should populate with past chats
Error Messages/Logs
no error just does not work
Steps to Reproduce
Here's a technical bug report you can post to the GitHub issues page:
Title: Session history not migrated to new PC — claude-code-sessions entries ignored by sidebar
Environment:
Claude Desktop app: Claude_1.3883.0.0_x64 (Windows Store)
Claude Code CLI: 2.1.111
OS: Windows 11
Old PC username: jmill → New PC username: User
Project path: C:\Users\User\OneDrive\Desktop\Scanner_windsurf_test
Problem:
After migrating to a new PC, previous sessions do not appear in the Claude Code sidebar Recents. Only sessions created natively on the new PC are visible.
What was investigated:
Session data location — Confirmed sessions stored in two places:
~/.claude/projects/C--Users-User-OneDrive-Desktop-Scanner-windsurf-test/*.jsonl (CLI sessions)
[project]/.claude/projects/C--Users-User-.../*.jsonl (desktop sessions, synced via OneDrive)
Path migration — All .jsonl files contained hardcoded C:\Users\jmill\ paths. Replaced all occurrences with C:\Users\User\ using PowerShell across both locations. Confirmed successful.
Folder renaming — Renamed all C--Users-jmill- encoded project folders to C--Users-User- in both ~/.claude/projects/ and [project]/.claude/projects/.
claude-code-sessions — Located the session registry at:
C:\Users\User\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\
Confirmed working sessions use format:
{"sessionId":"local_<uuid>","cliSessionId":"<jsonl-filename-uuid>","cwd":"C:\\Users\\User\\OneDrive\\Desktop\\Scanner_windsurf_test","originCwd":"...","createdAt":<ms>,"lastActivityAt":<ms>,"model":"claude-sonnet-4-6","effort":"medium","isArchived":false,"title":"...","titleSource":"auto","permissionMode":"acceptEdits","remoteMcpServersConfig":[],"completedTurns":1}
Created 32 matching entries for all old sessions using this exact format. Confirmed files written correctly. Sidebar still only shows 2 natively-created sessions.
IndexedDB — Deleted IndexedDB folder to force rebuild. After restart, same 2 sessions shown. Confirmed sidebar reads from claude-code-sessions, not IndexedDB.
SharedStorage — Confirmed SQLite format, 4096 bytes (1 page, essentially empty). Not the session store.
Session file format — Confirmed old desktop sessions have identical first-line format ("type":"queue-operation") to working native sessions. CLI sessions start with "type":"progress". Both types registered — neither shows.
Key finding:
The app correctly reads claude-code-sessions (2 original entries show), but silently rejects all 32 externally-created entries despite identical JSON format and valid corresponding .jsonl files. No error is surfaced. The validation criterion that distinguishes natively-created entries from externally-created ones is unknown.
Request:
Please document the session migration process for PC transfers, or provide an official import mechanism. Many users will face this when moving machines.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Desktop app: 1.3883.0.0 (Windows Store) Claude Code CLI: 2.1.111
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗