[BUG] data loss through bad default settings

Resolved 💬 10 comments Opened Feb 2, 2026 by JensLincke Closed May 2, 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?

dangerous default behavior that leads to data loss

What Should Happen?

What the fuck... I lost again all my chat data similar to
https://github.com/anthropics/claude-code/issues/9581

But now I found this issue... there is a cleanupPeriodDays with a default of 30 that automatically deletes all my session that are older than 30 days. Since this is so important, I would have expeted it to either have a sensible no data loss default, or be asked in the beginning to configure it.

I now configured it in .claude/settings.json and I am documenting it here ...

{
"cleanupPeriodDays": 999999
}

since the ai will shell it again... as it did with the previous post. I would have expected it to get some feedback that this bug report was no bug but expected. I am so angry right now because I lost my data again.

Error Messages/Logs

Steps to Reproduce

  1. work with claude code.
  2. wait 30 days
  3. see work is gone!
  4. think that this must be a bug and report it
  5. issue is read by the ai and auto closes
  6. loose data siltently... and only notice it if you paused your work and see that there is nothing left

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.29

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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