claude-code - 💡(How to fix) Fix [BUG] Desktop sidebar empty even though persisted sessions load; focused session stays null (Windows) [1 participants]

Official PRs (…)
ON THIS PAGE

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#51829Fetched 2026-04-23 07:43:51
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×3

Code Example

"sidebarMode": "task"

---

cd "D:\Shawn's Team Dropbox\Shawn Mobasser\Claude Code\AP"
claude --continue

---

cd "D:\Shawn's Team Dropbox\Shawn Mobasser\Claude Code\AP"
claude --resume a7347dda-bc4b-4e7e-89e6-ffe3aab51108
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?

On Windows, Claude Desktop loads persisted Claude Code session metadata successfully, but the left sidebar still renders empty.

This is not the same failure mode as the open wrapper-index wipe issues where claude-code-sessions entries are missing. In this case:

  • Desktop metadata files under %APPDATA%\Claude\claude-code-sessions\... still exist
  • all of those JSON files parse successfully
  • all saved cwd paths still exist
  • Desktop logs show persisted sessions loading successfully
  • the renderer boots https://claude.ai/task/new
  • then LocalSessions.setFocusedSession is set to null

That suggests the failure is in focus/selection state after session discovery, not in transcript storage or missing wrapper reconstruction.

What Should Happen?

Existing Claude Code sessions should appear in the Desktop sidebar when persisted session metadata is present and has been loaded successfully.

Steps to Reproduce

This was observed on an already-used Windows install with existing Claude Code sessions.

  1. Have existing Claude Code sessions on disk
  2. Launch Claude Desktop
  3. Observe that the sidebar is empty even though persisted sessions load successfully in logs

I do not yet have a clean from-scratch repro; this was diagnosed from a live failing install.

Is this a regression?

I don't know

Claude Code Version

Claude Desktop 1.3883.0, bundled Claude Code 2.1.111

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Strongest evidence

From main.log on the same startup:

  • Loaded 38 persisted sessions from C:\Users\shawn\AppData\Roaming\Claude\claude-code-sessions\05f07a12-b729-4eaa-8ebb-21b80442c293\566efe23-b817-413b-900b-8fb7d7d89eb9
  • topFrameUrl: 'https://claude.ai/task/new'
  • topFrameUrl: 'https://claude.ai/task/new'
  • 2026-04-21 20:36:32 [info] [CCD] LocalSessions.setFocusedSession: sessionId=null

So the sequence is:

  1. 38 persisted sessions load successfully
  2. renderer opens task/new
  3. focused session remains null

That is the core mismatch.

Config state

%APPDATA%\Claude\claude_desktop_config.json explicitly has:

"sidebarMode": "task"

So this is not just a stale config value being ignored in favor of a different route. The renderer did actually boot task/new.

Session metadata validity

  • All *.json files under %APPDATA%\Claude\claude-code-sessions\<accountId>\<orgId>\ parse successfully
  • All saved cwd values currently exist on disk
  • This does not look like malformed JSON or deleted-folder cleanup

Transcript data is intact

Original CLI transcript still exists and resumes correctly from the CLI:

cd "D:\Shawn's Team Dropbox\Shawn Mobasser\Claude Code\AP"
claude --continue

and

cd "D:\Shawn's Team Dropbox\Shawn Mobasser\Claude Code\AP"
claude --resume a7347dda-bc4b-4e7e-89e6-ffe3aab51108

So the user is not missing transcript data; this appears isolated to Desktop sidebar state/rendering/focus.

Related issues

This appears adjacent to, but distinct from:

  • #43674 sidebar empty / history missing
  • #51357 session-index files wiped
  • #51412 upgrade-related session index loss

The key difference here is that persisted Desktop session metadata is still present and is actually being loaded.

extent analysis

TL;DR

The issue is likely due to the LocalSessions.setFocusedSession being set to null after loading persisted sessions, causing the left sidebar to render empty.

Guidance

  • Verify that the LocalSessions.setFocusedSession is being called with a valid session ID after loading persisted sessions.
  • Check the logic for setting the focused session in the LocalSessions module to ensure it is correctly handling the case where multiple sessions are loaded.
  • Investigate the sidebarMode configuration and its impact on the rendering of the left sidebar, as it is set to "task" in the provided config.
  • Review the related issues (#43674, #51357, #51412) to ensure that the fix does not introduce any regressions.

Example

No code snippet is provided as the issue is more related to the logic and configuration rather than a specific code block.

Notes

The issue seems to be isolated to the Desktop sidebar state/rendering/focus, and the transcript data is intact. The LocalSessions.setFocusedSession being set to null is the core mismatch.

Recommendation

Apply a workaround to ensure that LocalSessions.setFocusedSession is set to a valid session ID after loading persisted sessions, as the root cause of the issue is likely related to this.

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 [BUG] Desktop sidebar empty even though persisted sessions load; focused session stays null (Windows) [1 participants]