claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] claude is losing chat history

Open davidbenhaim opened this issue 1 month ago • 3 comments

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?

latest version of claude code seems to fail at compacting or something and then when I go to resume the chat history isnt there - its like 5 hours earlier. Missing the most recent work... SUPER FRUSTRATING

What Should Happen?

it should work

Error Messages/Logs


Steps to Reproduce

asf

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

v2.1.1

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

davidbenhaim avatar Jan 08 '26 23:01 davidbenhaim

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/14462
  2. https://github.com/anthropics/claude-code/issues/8962
  3. https://github.com/anthropics/claude-code/issues/7502

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Jan 08 '26 23:01 github-actions[bot]

I'm experiencing the same issue in visual studio code. Agreed, it is very frustrating to have to explain the same thing over and over...

JorritGru avatar Jan 08 '26 23:01 JorritGru

I think this upgrade just silently nuked 4 months of my local chat logs under ~/.claude/projects/ without prompting even though I've had "cleanupPeriodDays": 99999 in my ~/.claude/settings.json config for literally months now.

Edit: filed #16978

knksmith57 avatar Jan 09 '26 00:01 knksmith57

I ran into the same problem, but I did not know that cleanupPeriodDays was a thing in the first place! https://github.com/anthropics/claude-code/issues/22547 For me these chats are user data... they are my files on my disk... why are they deleted? This is no browser cache or download folder that can be recreated any time! This is user data! Am I seeing this wrong? What the fuck!

JensLincke avatar Feb 02 '26 13:02 JensLincke