Session transcript lost despite being well within default 30-day retention (VS Code extension)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 27, 2026

Description:

A long interactive session (VS Code native extension) spanning day 1 19:55 → day 2 01:10 (confirmed by 15 git commits made during that window) is completely missing from local session history when I opened a new session ~17.5 hours later, at day 2 18:36.

Findings from inspecting ~/.claude/:

  • ~/.claude/projects/<project-hash>/ contains only the new session's .jsonl file (created 18:36:29) — no trace of the previous session's transcript file.
  • No custom cleanupPeriodDays is set anywhere (settings.json is empty/absent) — default should be 30 days, so a 17.5-hour-old transcript should not have been eligible for cleanup.
  • ~/.claude/.last-cleanup timestamp is essentially the same instant (3 seconds before) the new project session directory was created, suggesting a cleanup routine ran on startup right before/while the new session was created.
  • No other project directory under ~/.claude/projects/ holds this transcript under an alternate path.
  • No Time Machine backup or local snapshot is available to recover it (confirmed via tmutil).
  • "Session history" picker in the VS Code extension panel shows nothing for this project prior to the new session.

Impact: the conversation/transcript is unrecoverable; the actual code changes were safe (committed to git), but this looks like a real data-loss bug in transcript retention/cleanup, not just a UI display issue.

Environment: macOS (Darwin 25.3.0), Claude Code native VS Code extension.

View original on GitHub ↗