cleanupPeriodDays defaults to 30, causing Claude Code to silently delete
~/.claude/projects//.jsonl files older than 30 days on
startup. There is no first-run disclosure, no warning before deletion, and the
setting is not surfaced in /config. I lost months of conversation history
before realizing this was happening.
Repro: Use Claude Code for >30 days without setting cleanupPeriodDays. Old
transcripts disappear.
Evidence on my machine: ~/.claude/history.jsonl shows 14 sessions / 1,315
prompts for one project from March–April. Only the current session's .jsonl
survives in ~/.claude/projects/. The cutoff matches the 30-day default
exactly. My settings.json does not override the default.
Impact: The code and git history remain, but the reasoning trail — design
discussions, debugging context, analysis — is gone. For research work that
context is the artifact.
Requested:
Workaround for others: add "cleanupPeriodDays": 3650 to
~/.claude/settings.json immediately.
Use Claude Code for >30 days without setting cleanupPeriodDays. Old transcripts disappear.
None
I don't know
No response
2.1.150
Anthropic API
Ubuntu/Debian Linux
Other
No response