Claude Code Automatically Deletes Local History
Key point
It has been confirmed that Claude Code permanently deletes local session records older than 30 days without warning by default.
Details
It has been confirmed that Claude Code includes a feature that automatically and permanently deletes local session records older than 30 days based on the default setting cleanupPeriodDays: 30. This operation is performed without warning when the application starts, and recovery is impossible as there is no trash bin or server-side backup.
How to Resolve
To change the history retention period, add the following setting to the ~/.claude/settings.json file.
{
"cleanupPeriodDays": 3650
}
This issue has already been reported as a known problem via GitHub issues #62476, #64996, etc.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.