[BUG] All session data in ~/.claude lost after logout/login (possibly related to npm update/reinstall)

Resolved 💬 6 comments Opened Oct 15, 2025 by JensLincke Closed Jan 8, 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?

Summary

All Claude Code session data stored in ~/.claude was lost after logging out and logging back in on October 6th, 2024. This resulted in the loss of all August and September session history.

Actual Behavior

All session data from August and September was completely lost. The ~/.claude directory was either cleared or reset.

Impact

  • Loss of 2+ months of session history
  • No apparent way to recover lost sessions
  • Unclear if this is related to the npm update/reinstall process, logout/login, or another factor

Environment

  • OS: Ubuntu Jammy (22.04) running on WSL2 with Windows 11
  • Installation method: npm
  • Event occurred: October 6th, 2024
  • Sessions lost: August - September 2024
  • Trigger: Logout and re-login (possibly after npm update/reinstall of Claude Code package)

Additional Context

It's unclear whether the data loss was triggered by the npm update/reinstall, the logout/login cycle, or a combination of both. The session data in ~/.claude should ideally be independent of the npm package installation.

What Should Happen?

Expected Behavior

Session history should persist across logout/login cycles and npm updates/reinstalls. Users should not lose historical session data when authenticating again or updating the package.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Use Claude Code normally with sessions accumulating in ~/.claude
  2. Update/reinstall Claude Code via npm (possibly - timing uncertain)
  3. Log out of Claude Code
  4. Log back into Claude Code
  5. Observe that all previous session data in ~/.claude is gone

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.15

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗