[BUG] "No sessions found" - race condition in storage path initialization (Windows)
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?
Code tab sidebar intermittently shows
"No sessions found" on startup. Sessions
created during this broken state are
permanently lost because the app cannot
write to disk.
The problem is non-deterministic: sometimes
restarting fixes it, sometimes it doesn't.
There is no reliable user-side workaround.
main.log shows 133 occurrences of:
"Cannot save session: storage path not available"
Root cause appears to be a race condition:
the Code tab initializes before accountId/orgId
is resolved, so the storage path
(claude-code-sessions/{accountId}/{orgId}/)
is not yet available.
What Should Happen?
Code tab should reliably load all persisted
sessions on every startup. The session store
initialization should wait for account info
before attempting to read/write sessions.
Error Messages/Logs
Failing restart (2026-02-08 10:07):
[info] No persisted sessions found
[info] No persisted sessions found
[warn] Cannot save session:
storage path not available
[warn] Cannot save session:
storage path not available
Working restart (2026-02-07 19:23,
same machine, no config changes):
[info] Loaded 38 persisted sessions from
...\claude-code-sessions\
a992af79-...\9d09c42b-...
Total "Cannot save session" warnings
in main.log: 133
Steps to Reproduce
- Open Claude Desktop on Windows
- Click "Code" tab
- Sidebar shows "No sessions found"
- Start a new session, work in it
- Close Claude Desktop completely
- Reopen - the session from step 4 is gone
- Repeat close/reopen multiple times -
sessions appear randomly on some restarts
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.34
Claude Code Version
1.1.2321
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗