Skip to content

[Bug] Project files deleted despite cleanupPeriodDays set to 1825 #15935

Closed as not planned

Description

@KJ7LNW

Bug Description
"cleanupPeriodDays": 1825,

but

find ~/.claude/projects/ -mtime +30 |wc 
      0

we have 4-year retention requirements. What deleted these? It wasn't us...

Environment Info

  • Platform: linux
  • Terminal: vte-based
  • Version: 2.0.69
  • Feedback ID: 1e47d300-5c94-4f99-ae46-b69c08ce509f

Errors

[]

Activity

  1. github-actions commented on Dec 31, 2025

    @github-actions

    Found 1 possible duplicate issue:

    1. Disable auto-deletion of past conversations #4172

    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

  2. KJ7LNW commented on Dec 31, 2025

    @KJ7LNW
    Author

    That's related, but it's a different issue. We have the setting to have a maximum cleanup period much larger than the default, but it's still deleting them:

    // .claude/settings.json
    {
      "cleanupPeriodDays": 1825,
  3. KJ7LNW commented on Dec 31, 2025

    @KJ7LNW
    Author

    @JGKle, Is Claude still respecting this setting?

  4. JGKle commented on Dec 31, 2025

    @JGKle

    Yes, I've not had it delete any data since adjusting the setting.

  5. KJ7LNW commented on Jan 1, 2026

    @KJ7LNW
    Author

    is this where you have it?

    // .claude/settings.json
    {
      "cleanupPeriodDays": 1825,
  6. JGKle commented on Jan 1, 2026

    @JGKle

    Yes...set to 99999

  7. KJ7LNW commented on Jan 1, 2026

    @KJ7LNW
    Author

    Okay, well I set mine to 99999 as well. I wonder why 1825 is not working. Mine is clearly resetting to 30 days. Okay, well I set mine to 99999 as well. For now, I have an RSync cron script so that we can meet our internal policy requirements, but I think there's a bug somewhere, at least in the version I'm using above.

  8. VibeCodingWW commented on Jan 8, 2026

    @VibeCodingWW

    Confirming this bug on Linux, currently running Claude Code 2.1.1.

    Our experience:

    • Had cleanupPeriodDays: 99999 set
    • Recently noticed all conversation files older than 30 days were gone
    • Changed setting to 365 to test if a more "reasonable" value would work
    • Restored 2 conversation files from backup with timestamps 48 days old
    • Verified files existed on disk
    • Restarted Claude Code
    • Both files immediately deleted despite cleanupPeriodDays: 365

    Current state:

    • Oldest file on disk is exactly 30 days old
    • Setting appears completely ignored regardless of value (tested 99999 and 365)

    Unknown: We can't confirm whether this setting ever worked and recently broke, or if it never worked. We only noticed the missing files recently.

    Using external backup scripts as a workaround for now.

  9. knksmith57 commented on Jan 9, 2026

    @knksmith57

    Confirming this bug on Linux, currently running Claude Code 2.1.1.

    Our experience:

    • Had cleanupPeriodDays: 99999 set
    • Recently noticed all conversation files older than 30 days were gone
    • Changed setting to 365 to test if a more "reasonable" value would work
    • Restored 2 conversation files from backup with timestamps 48 days old
    • Verified files existed on disk
    • Restarted Claude Code
    • Both files immediately deleted despite cleanupPeriodDays: 365

    Current state:

    • Oldest file on disk is exactly 30 days old
    • Setting appears completely ignored regardless of value (tested 99999 and 365)

    Unknown: We can't confirm whether this setting ever worked and recently broke, or if it never worked. We only noticed the missing files recently.

    Using external backup scripts as a workaround for now.

    I believe this has regressed again.

    This time, I'm concerned that the behavior may have been intentional unauthorized removal: #16978

  10. github-actions commented on Feb 8, 2026

    @github-actions

    This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

  11. KJ7LNW commented on Feb 8, 2026

    @KJ7LNW
    Author

    Unless someone sp has specifically verified this, we can only assume that it is still happening.

  12. kyzzen commented on Feb 14, 2026

    @kyzzen

    It is still happening for me as well.

  13. github-actions commented on Mar 15, 2026

    @github-actions

    Closing for now — inactive for too long. Please open a new issue if this is still relevant.

  14. github-actions commented on Mar 23, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  15. locked as resolved and limited conversation to collaborators on Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugSomething isn't workingmemoryplatform:linuxIssue specifically occurs on LinuxstaleIssue is inactive

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions