[BUG] claude is losing chat history
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
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/14462
- https://github.com/anthropics/claude-code/issues/8962
- 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
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...
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
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!