Claude Code section sidebar empty on cold start; renderer reports `setFocusedSession: sessionId=null` despite session store loading
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 a recent Claude Desktop update, the Claude Code section's sidebar renders empty on every cold start, even though the underlying session store loads successfully and CLI recovery works without issue. The bug is scoped specifically to the Claude Code section — other Desktop sections (regular chats, Projects, etc.) function normally.
Reproduction
- Open Claude Desktop, navigate to the Claude Code section.
- Sidebar is empty (no projects, no sessions listed).
- From the same project root,
claude --resume <id>andclaude --continueboth succeed — sessions exist and are readable. - Restart Claude Desktop — sidebar remains empty.
- Sessions opened mid-runtime (via deep link
claude://claude.ai/code/local_<id>or via CLI) do not persist into the sidebar after the next cold start.
Evidence
1. Sessions are persisting and ARE being loaded on startup. main.log shows Claude Desktop loading 39 persisted Claude Code sessions from %APPDATA%\Claude\claude-code-sessions\ on every cold start.
2. The renderer fails to focus any session after load. Immediately following the successful load, main.log records:LocalSessions.setFocusedSession: sessionId=null
3. Route / mode mismatch. claude_desktop_config.json has sidebarMode: "task". Startup logs show the renderer opening https://claude.ai/task/new; earlier captures showed https://claude.ai/epitaxy. Flipping the local config did not restore the sidebar — setFocusedSession: sessionId=null still fires immediately after load.
4. Indexing gap. A local inventory of session storage shows:
- 471 transcript
.jsonlfiles exist under~/.claude/projects/ - 26 of those have matching session records in
%APPDATA%\Claude\claude-code-sessions/ - 445 transcript files exist on disk with no app-side record
What does NOT fix it
- Quitting Claude Desktop fully (including system-tray exit) and relaunching
- Rotating the renderer Chromium UI cache under
%APPDATA%\Claude\ - Opening individual sessions via
claude://deep link (session opens, but sidebar still empty on next start)
What DOES work as a workaround
- CLI from a stable project root:
claude --resume <id>andclaude --continue - Deep links:
claude://claude.ai/code/local_<sessionId>opens the specific session
Diagnosis
Two independent issues, both scoped to the Claude Code section's Desktop UI / index layer:
- Render bug: the renderer loads N persisted sessions but fails to focus any of them (
setFocusedSession: sessionId=null), producing an empty sidebar regardless of stored content. - Indexing gap: the Desktop app-side index covers only a small fraction of the JSONL transcripts that exist on disk, so even if (1) is resolved the sidebar will still be missing most of the user's history.
Both are in the Desktop UI / index layer, not in the transcript store. Transcript files are intact and the CLI reads them cleanly.
Environment
- OS: Windows
- Affected feature: Claude Code section sidebar in Claude Desktop
- Session transcripts: stored under
~/.claude/projects/, project working directories on a Dropbox-synced path (not symlinked, pinned for offline access)
Related
- #43674 (sidebar does not show history)
- #29172 (sessions disappear from sidebar)
- #48495 (sidebar shows partial sessions)
Impact
Claude Code section is unusable for any workflow that depends on revisiting prior sessions. Reported via support (conversation ID 215474064353501) without human response.
What Should Happen?
On cold start of Claude Desktop, the Claude Code section's sidebar should populate with the session and project entries that exist in the persisted session store. Sessions visible during runtime should persist across restarts. The sidebar should reflect the set of session transcripts available under ~/.claude/projects/ (after index registration), not just a small fraction of them.
Specifically:
LocalSessions.setFocusedSessionshould be called with a validsessionIdon cold start (the most recent session, the previously focused session, or null only when no sessions exist), notnullwhen 39 sessions were just loaded.- Pre-existing transcript files under
~/.claude/projects/should be auto-registered into the Desktop app-side index so they appear in the sidebar without requiring manual re-creation.
Error Messages/Logs
main.log (cold start sequence, paraphrased from local capture):
- Loaded 39 persisted Claude Code sessions from %APPDATA%\Claude\claude-code-sessions\...
- topFrameUrl: 'https://claude.ai/task/new' (earlier captures: 'https://claude.ai/epitaxy')
- LocalSessions.setFocusedSession: sessionId=null
Local inventory of session storage:
- 471 transcript .jsonl files under ~/.claude/projects/
- 26 transcript files with matching session records in %APPDATA%\Claude\claude-code-sessions/
- 445 transcript files with no app-side record
- 2 sessions tied to .claude/worktrees/ paths
- 0 app-side records pointing to missing/inaccessible paths
- 1 app-side record archived
claude_desktop_config.json:
- sidebarMode: "task"
CLI behavior from the same project root (control):
- claude --continue -> CONTINUE_OK
- claude --resume <id> -> RESUME_OK
- Both also work with --fork-session (verified without mutating the original transcript).
Steps to Reproduce
- Use Claude Desktop with the Claude Code section over multiple sessions across several project directories on Windows.
- Quit Claude Desktop fully (close window AND exit from the system tray; verify no
Claude.exeremains in Task Manager). - Relaunch Claude Desktop and open the Claude Code section.
- Observe: the sidebar is empty — no projects, no session list — even though
main.logconfirms the session store loaded N persisted sessions a few lines earlier. - From a stable project root (e.g. a non-symlink path holding
.claude/projects/...transcripts), runclaude --resume <sessionId>orclaude --continuein any terminal. Both succeed and return the session content — confirming the data is intact and the bug is scoped to the Desktop sidebar/index layer, not the transcript store. - Open a specific session via deep link:
claude://claude.ai/code/local_<sessionId>. The session opens correctly in Claude Desktop. - Restart Claude Desktop. The session opened in step 6 does NOT persist into the sidebar — sidebar is empty again.
Repro is 100% consistent across cold starts. Renaming %APPDATA%\Claude\claude-code-sessions\ to a .bak and relaunching to force index rebuild does not change the empty-sidebar outcome.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
N/A — bug is in Claude Desktop's Claude Code section UI, not the CLI. CLI works correctly from same project root (claude --resume/--continue return successfully). Will append claude --version output as a comment if requested by triage.
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗