[BUG] VS Code extension session history lost after 2.1.197 → 2.1.198 update

Open 💬 1 comment Opened Jul 2, 2026 by mkurbanwtg

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?

Environment

  • Claude Code VS Code extension: updated 2.1.197 (Jul 1) → 2.1.198 (Jul 2)
  • Windows 11, project at C:\Users\<user>\Documents\repos\optimizer
  • File History / VSS not enabled, so no local recovery option

What happened
Several sessions worked on last week (around Jun 29 and Jul 1, both within
the last 7 days and well under the documented 30-day / cleanupPeriodDays
retention window) are missing from the session/resume list in the VS Code
extension for this project.

Local evidence

  • ~/.claude/projects/<project-hash>/ only contains today's (Jul 2) session

.jsonl file — nothing from Jun 29 or Jul 1.

  • ~/.claude/session-env/ still has leftover (but empty) directories named

with session UUIDs timestamped Jun 29 and Jul 1, with no corresponding
.jsonl transcript anywhere under ~/.claude/projects/.

  • ~/.claude/.last-cleanup shows a cleanup run timestamped 2026-07-02T10:57:27Z

(today), i.e. right around the second extension update.

  • No cleanupPeriodDays override is set in settings.json (default 30 days),

so normal retention logic should not have removed week-old sessions.

  • Project directory path is unchanged; not a OneDrive-redirected path (verified

Documents is a real directory, not a reparse point).

Actual
Transcripts for two sessions are gone from disk; only empty session-env
directories remain as evidence they existed.

Question for maintainers
Does an extension version bump ever trigger a cleanup/migration pass that
could interact badly with in-flight or recently-closed sessions? The
.last-cleanup timestamp lining up with the second update is suspicious.

What Should Happen?

Expected
Sessions well within the retention window should survive an extension update.

Error Messages/Logs

Steps to Reproduce

Could not tell as I do not know if installing a now-not-available version of the extension is possible.
If it were, steps would be:

  • Install version 2.1.197 of Claude Code's VS Code extension
  • Do some work so that a session is created.
  • Update to version 2.1.198, and
  • Voilà, your session is gone.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Version 1.9659.2 (390d6c)

Platform

Other

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗