[Critical Bug] Session history lost after auto-update from 2.0.44 to 2.0.49

Resolved 💬 17 comments Opened Nov 21, 2025 by drw1337 Closed Mar 21, 2026

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.jsonl contains all data, it's not accessible through UI
  • User Experience: No warning about incompatible format migration

Reproduction

  1. Have Claude Code 2.0.44 with extensive session history
  2. Let auto-update happen to 2.0.49
  3. Try /resume - only recent sessions (with sessionId) appear

Suggested Fixes

Short-term (Migration)

  1. Add migration script that backfills sessionId for old entries
  2. Group old entries by time gaps (e.g., > 1h pause = new session)
  3. Generate UUIDs for each identified session
  4. Create corresponding session-env/ directories

Long-term (Backward Compatibility)

  1. Ensure format changes include automatic migration
  2. Add version field to history entries
  3. Display warning before breaking changes
  4. Provide manual recovery tools

Workaround

Created backup at: ~/.claude/backups/20251121_230137_pre_update_2.0.49/

Contains:

  • Full history.jsonl backup
  • 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

View original on GitHub ↗

17 Comments

yash2code · 7 months ago

+1

stephenwbeam-collab · 7 months ago

+1

github-actions[bot] · 6 months ago

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.

mikeasick-fennec · 5 months ago

+1

OscarOrtigueira · 5 months ago

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

mikeasick-fennec · 5 months ago

@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.

OscarOrtigueira · 5 months ago
@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.

mikeasick-fennec · 5 months ago

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.

VladDumitru06 · 5 months ago

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

KnightHawk06 · 5 months ago

+1

ndt94 · 5 months ago
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

work like a charm, for strange reason when I used /resume command in claude, it missed my latest history. I'm on 2.1.25 version

gxjansen · 5 months ago

Still happening in v2.1.32 on macOS (Sequoia, Apple Silicon)

Same pattern as originally reported - /resume only shows sessions created after the update. All pre-update sessions are gone from the resume picker while the data remains intact on disk.

Environment

  • Claude Code version: 2.1.32
  • Platform: macOS (Darwin 25.2.0), MacMini M2
  • Auth: Anthropic API (Max plan)

Findings

Session files intact: 91 session .jsonl files exist in ~/.claude/projects/<project-hash>/ for this workspace alone (oldest from Jan 11). 543 unique sessions across all projects.

History intact: ~/.claude/history.jsonl has 4,468 entries going back to Sep 2025, continuously populated through today.

Only post-update sessions visible: /resume only shows sessions created after the update. All prior sessions are invisible to the picker.

Possible trigger

.claude.json shows several migration flags that appeared between the Jan 28 backup and current state:

  • opus45MigrationComplete
  • opusProMigrationComplete
  • hasShownOpus46Notice
  • thinkingMigrationComplete
  • sonnet45MigrationComplete

These 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 .jsonl files are all there but not picked up by the new /resume discovery 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).

Neiz-Kap · 5 months ago

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)

gonewx · 4 months ago

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:

  1. Pin your version with npm install -g @anthropic-ai/claude-code@2.0.44 to prevent auto-updates until you are ready
  2. Backup your session directory (~/.claude/) before updates
  3. Use Mantra — it maintains its own session index independently of Claude Code internals. Auto-updates, version migrations, storage format changes — none of them affect Mantra because it reads and indexes the raw JSONL files on its own schedule.

Session data loss should be a P0 issue. These are hours of developer work encoded in those sessions.

King-Nivek · 4 months ago

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.

  • Claude Code version: 2.1.50
  • OS: WSL2 (Ubuntu on Windows)
  • Sessions on disk: 30+
  • Sessions visible in /resume: 2-3 (only ones created after the update)

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.

github-actions[bot] · 3 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 3 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.