claude-code - 💡(How to fix) Fix Claude Code section sidebar empty on cold start; renderer reports `setFocusedSession: sessionId=null` despite session store loading [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58847Fetched 2026-05-14 03:38:00
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

What DOES work as a workaround

Code Example

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).
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Open Claude Desktop, navigate to the Claude Code section.
  2. Sidebar is empty (no projects, no sessions listed).
  3. From the same project root, claude --resume <id> and claude --continue both succeed — sessions exist and are readable.
  4. Restart Claude Desktop — sidebar remains empty.
  5. 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 .jsonl files 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> and claude --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:

  1. 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.
  2. 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.setFocusedSession should be called with a valid sessionId on cold start (the most recent session, the previously focused session, or null only when no sessions exist), not null when 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

  1. Use Claude Desktop with the Claude Code section over multiple sessions across several project directories on Windows.
  2. Quit Claude Desktop fully (close window AND exit from the system tray; verify no Claude.exe remains in Task Manager).
  3. Relaunch Claude Desktop and open the Claude Code section.
  4. Observe: the sidebar is empty — no projects, no session list — even though main.log confirms the session store loaded N persisted sessions a few lines earlier.
  5. From a stable project root (e.g. a non-symlink path holding .claude/projects/... transcripts), run claude --resume <sessionId> or claude --continue in 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.
  6. Open a specific session via deep link: claude://claude.ai/code/local_<sessionId>. The session opens correctly in Claude Desktop.
  7. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Claude Code section sidebar empty on cold start; renderer reports `setFocusedSession: sessionId=null` despite session store loading [1 comments, 2 participants]