[BUG] Session sidebar loses history after app restart — session index directory recreated, underlying transcripts intact

Status Open
Reported on v2.1.229
Maintainer reply None cached
Activity 2 comments · opened Aug 17, 2026

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?

Description:

After restarting the Claude desktop app, the session history sidebar shows only the current session instead of my full history. The Stats/Overview page still correctly shows 17 sessions, 8.1M tokens, 14 active days — so the underlying data is not lost, but the sidebar's session list is empty except for the newly started session.

Environment:

OS: Windows 10 Home 10.0.19045
Claude desktop app, bundled CLI version 2.1.229 (%APPDATA%\Claude\claude-code\2.1.229\claude.exe)

Evidence / root cause (investigated locally):

Two separate storage locations exist:

~/.claude/projects/ — raw CLI transcript files (.jsonl), one per session. 17 files present, oldest from 2026-08-04, newest from today. This is fully intact and appears to be what the Stats/Overview page reads from.
%APPDATA%\Claude\claude-code-sessions\ — appears to be the app's internal session index that the sidebar reads from. This directory currently contains only one subfolder (the current session), and its CreationTime and LastWriteTime are identical, timestamped at today's app startup (21:03:54). This indicates the index was recreated empty at that point rather than the 17 prior sessions being individually deleted.

Conclusion: This looks like a bug where claude-code-sessions (the sidebar-facing index) gets wiped/recreated on app restart, while the source-of-truth transcripts under ~/.claude/projects remain untouched. No data appears to be permanently lost, but it's inaccessible from the sidebar/resume UI.

Steps to reproduce: Unclear yet — happened after a normal app restart, not a crash. Happy to provide more diagnostic info if useful.

What Should Happen?

Session sidebar should reflect all sessions present in ~/.claude/projects, matching what the Stats page already aggregates correctly.

Error Messages/Logs

Steps to Reproduce

Unclear yet — happened after a crash

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

1.30096.5

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗