[Critical Bug] Session history lost after auto-update from 2.0.44 to 2.0.49
Bug Description
After auto-update from Claude Code version 2.0.44 to 2.0.49, most session history disappeared from /resume command.
Environment
- OS: Linux (Debian-based VPS)
- Previous Version: 2.0.44 (installed: 2025-11-18)
- Current Version: 2.0.49 (auto-updated: 2025-11-21)
- Editor: Cursor (VS Code fork)
- Extension Path:
~/.cursor-server/extensions/anthropic.claude-code-*
Expected Behavior
All previous sessions should be available in /resume after update.
Actual Behavior
Only 2 most recent sessions are visible in /resume (created after 2025-11-18).
Root Cause Analysis
The new version (2.0.49) introduced a new session tracking system using sessionId fields in history.jsonl. However, old entries don't have this field and are therefore not displayed in /resume.
Data Analysis
File: ~/.claude/history.jsonl (2.4 MB, 4515 entries)
- ✅ 4515 total entries - file is intact
- ❌ 4511 entries WITHOUT sessionId (old format) - not visible in
/resume - ✅ 5 entries WITH sessionId (new format, since 2025-11-18) - visible in
/resume
Directory: ~/.claude/session-env/
- Only 2 session directories exist (matching the 2 sessionIds)
- Sessions correspond to entries from 2025-11-18 onwards
Session Loss
Using time-gap analysis (gaps > 1 hour = new session), I identified 18 distinct sessions in the data:
- 11 sessions from October 2025
- 5 sessions from November 2025 (before auto-update)
- 2 sessions visible after update
This means 16 sessions (4511 messages) are now inaccessible via /resume.
Impact
- Critical: Users lose access to entire session history after auto-update
- Data Loss: While
history.jsonlcontains all data, it's not accessible through UI - User Experience: No warning about incompatible format migration
Reproduction
- Have Claude Code 2.0.44 with extensive session history
- Let auto-update happen to 2.0.49
- Try
/resume- only recent sessions (with sessionId) appear
Suggested Fixes
Short-term (Migration)
- Add migration script that backfills
sessionIdfor old entries - Group old entries by time gaps (e.g., > 1h pause = new session)
- Generate UUIDs for each identified session
- Create corresponding
session-env/directories
Long-term (Backward Compatibility)
- Ensure format changes include automatic migration
- Add version field to history entries
- Display warning before breaking changes
- Provide manual recovery tools
Workaround
Created backup at: ~/.claude/backups/20251121_230137_pre_update_2.0.49/
Contains:
- Full
history.jsonlbackup - Session analysis with 18 identified sessions
- Recovery documentation
Additional Context
The user reported: "Before update, all sessions were visible. After /resume during auto-update, only one session remained visible."
Files Affected
~/.claude/history.jsonl- read but not properly parsed~/.claude/session-env/- empty directories for old sessions- Extension code that reads session data for
/resume
---
Priority: Critical - affects all users with pre-2.0.49 history
Category: Data Migration, Breaking Change
Regression: Introduced in 2.0.49
17 Comments
+1
+1
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
+1
It happened to me today, there was no reason to lose all conversation including the very last one. Current version 2.1.12, and it might not be related to the same issue stated here, but something still is amiss
@OscarOrtigueira - it's not lost, look in your .claude/projects directory. I built a small agent that searched for recent phrases, we found the content, and identified the session. Then I restarted claude with that session id and lost nothing.
Thanks for the tip, I will have that in mind for the next time (indeed, the conversation is there). Still, I believe that it should appear directly on Claude without extra steps, unless this is a new functionality/change on how the resume functionality works, although I would find that.. strange.
For sure, it's a big @OscarOrtigueira - just one with the index to the content vs. lost content (which is worse). This is just an ugly workaround till Claude and team fix it.
Different from what @OscarOrtigueira has, in my .claude file I only have a settings.local.json file that contains the permissions I gave to claude during that said session. But in --resume (or /resume) I see some of my conversation, just not the one that I need.
Edit:
My bad, the .claude folder I was looking at was my local one. For Windows users, you need to look at C:\Users\YourName\.claude and for macOS / Linux / WSL: ~/.claude/ (e.g., /home/yourname/.claude/)
How to recover the conversation:
Open the file ~/.claude/history.jsonl in a text editor.
Search for a keyword or filename from your old discussion.
Each entry will show a sessionId (a UUID like 8e5b...).
Once you have the ID, go back to your project terminal and run:
claude --resume YOUR_SESSION_ID
+1
work like a charm, for strange reason when I used
/resumecommand in claude, it missed my latest history. I'm on 2.1.25 versionStill happening in v2.1.32 on macOS (Sequoia, Apple Silicon)
Same pattern as originally reported -
/resumeonly shows sessions created after the update. All pre-update sessions are gone from the resume picker while the data remains intact on disk.Environment
Findings
Session files intact: 91 session
.jsonlfiles exist in~/.claude/projects/<project-hash>/for this workspace alone (oldest from Jan 11). 543 unique sessions across all projects.History intact:
~/.claude/history.jsonlhas 4,468 entries going back to Sep 2025, continuously populated through today.Only post-update sessions visible:
/resumeonly shows sessions created after the update. All prior sessions are invisible to the picker.Possible trigger
.claude.jsonshows several migration flags that appeared between the Jan 28 backup and current state:opus45MigrationCompleteopusProMigrationCompletehasShownOpus46NoticethinkingMigrationCompletesonnet45MigrationCompleteThese model migrations (or the accompanying Claude Code updates) likely reset or failed to rebuild the session index.
Confirmation
This is the same root cause as the original report: format/index changes during updates don't migrate existing sessions. The old session
.jsonlfiles are all there but not picked up by the new/resumediscovery mechanism. This has now happened across at least 3 major version ranges (2.0.x, 2.1.x) and on all platforms (Linux, Windows, macOS).It seems like resume history worked correctly before updating to 2.1.39 (I updated it yesterday).
After a while I discovered, that all history like has been deleted and only the last entries from a week ago exist
Environment
Claude Code version: 2.1.39
Platform: Arch Linux (linux-cachyos)
Auth: Anthropic Console (Team Account)
This is exactly the kind of thing that erodes trust in the tool. You invest hours building up session context, then an auto-update wipes it all out.
The root problem: session data should be treated as user data with strong durability guarantees, not as disposable cache that can be broken by updates.
A few protective measures:
npm install -g @anthropic-ai/claude-code@2.0.44to prevent auto-updates until you are ready~/.claude/) before updatesSession data loss should be a P0 issue. These are hours of developer work encoded in those sessions.
Title: /resume does not show old sessions after update to v2.1.50
Body:
After updating Claude Code, all sessions created before the update are no longer visible in /resume. The session
files still exist on disk at ~/.claude/projects/ but do not appear in the session list. Updated from version "2.0.23" to 2.1.49 and then on to 2.1.50.
The old sessions appear to have been created with a different format. This appears to be a known regression. I
found references to similar issues in #25729, #25032, and #26123.
Please provide a migration path for old session files or fix the /resume session loader to handle both old and new
formats.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.