[BUG] Claude Code put latest session in archive and most of the sessions are gone after the last update

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Apr 29, 2026 · closed Apr 29, 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?

Run ls ~/.claude/sessions/ and ls ~/.claude/projects/*/ on an affected machine — if there are session files on disk that don't appear in the UI, you have the bug. Comparing UI session list count vs. on-disk jsonl count should be the canonical diagnostic.

Workaround

None known. Sessions appear to still function (this report itself was authored in a session that the UI claims is archived).

What Should Happen?

Session should be there and latest session should not have been archived.

Error Messages/Logs

The session data is intact — the bug is purely UI/rendering:

~/.claude/sessions/: 5 active session files
~/.claude/projects/: 4 project directories
C--Users-clint-Claude-CodeProjects/: 39 session jsonl files
C--Users-clint-boringhaus-sites-status-boringhaus-com/: 3 session jsonl files
C--Users-clint/: 4 session jsonl files
C--Windows-System32/: 3 session jsonl files
The currently-active session file (6cb4a1ee-e110-45e6-aeb1-7f12418dc572.jsonl) is 2.39 MB and the mtime updates as new turns are written.
File timestamps span April 11 → April 28 (today), so historical sessions are present on disk going back weeks.
Symptoms that confused me into thinking the bug was elsewhere

While debugging an unrelated issue, the agent was shown a system reminder listing newly-available deferred MCP tools, including mcp__ccd_session_mgmt__archive_session. I momentarily thought the agent had archived the session — but the tool was only listed as available, never called. The UI's archived/grayed state for an active session is what made this misread plausible.

Steps to Reproduce

Run ls ~/.claude/sessions/ and ls ~/.claude/projects/*/ on an affected machine — if there are session files on disk that don't appear in the UI, you have the bug. Comparing UI session list count vs. on-disk jsonl count should be the canonical diagnostic.

Workaround

None known. Sessions appear to still function (this report itself was authored in a session that the UI claims is archived).

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Desktop 1.5220.0.0 (x64, Microsoft Store install).

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/38691
  2. https://github.com/anthropics/claude-code/issues/51318
  3. https://github.com/anthropics/claude-code/issues/51829

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

0xbrainkid · 5 months ago

This is session-presence integrity failure.

If the latest session is suddenly placed in archive and most other sessions appear gone after an update, then the product is breaking the operator’s map of where their active work actually lives. Even if the data still exists somewhere, the effective result is disappearance.

Why it matters:

  • users lose the ability to resume the work they believe is current
  • archives stop meaning “intentionally put aside” and start meaning “maybe lost”
  • after an update, trust in migration and state continuity drops immediately

I would want clarity on:

  1. whether sessions were reindexed incorrectly, moved to archive by bad metadata, or hidden by a changed filter/view layer
  2. whether the underlying session artifacts are still intact on disk/server even though the UI lost track of them
  3. whether the update path has any safety check that compares pre/post session counts before finalizing migration

For agent tools, discoverability is part of durability. If users cannot find the session they just worked in, the system has effectively lost it from their point of view.

cmunkres · 5 months ago

exiting out and restarting appears to have gotten the sessions proper again

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.