anthropics / anthropics/claude-code
[BUG] Claude does delete conversation data after cleanupPeriodDays
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?
I opened Claude code to resume a session that I worked on a few months back.
The session got deleted in that moment.
I did not know of the cleanup happening and the user is not told about it.
### What Should Happen?
Claude should NEVER delete all data without my permission.
It's fine to trash tool calls, etc. - but the actual conversation that I have seen is valuable data.
That what I see in Claude Code is what I expect to keep as transcript. (which is a few KB at least)
This is also the difference to other proposals.
### Error Messages/Logs
```shell
The valuable session was gone.
```
### Steps to Reproduce
- Work on something
- Leave it for a month or longer
- Forget to put the setting
- Session is gone fully
### Claude Model
None
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
0.1.0
### Claude Code Version
2.1.274
### Platform
Anthropic API
### Operating System
Ubuntu/Debian Linux
### Terminal/Shell
Terminal.app (macOS)
### Additional Information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the cleanupPeriodDays handling in Claude Code and reproduce the reported behavior after leaving a session unused for a month or longer. Determine how transcript data is separated from tool calls and how users are informed about cleanup. Done means valuable conversation transcripts are retained as described and any cleanup is clearly communicated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, data
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100