Default cleanupPeriodDays=30 silently and permanently deleted months of irreplaceable conversations, twice

Status Fixed / completed
Maintainer reply None cached
Activity 1 comment · opened Aug 30, 2026 · closed Aug 30, 2026

What happened

Claude Code purges conversation transcripts older than cleanupPeriodDays (default: 30 days) at startup — silently, permanently, with no warning, no trash, no backup requirement, and no recovery path.

On my machines this destroyed, in two separate incidents: a tax-filing conversation, then (discovered 2026-08-30) the transcripts of ~20 projects across two Macs — including months of health-tracking work for myself and my father (May–July sessions, purged ~Aug 9 while I was still actively using the tool daily in other projects). I only learned the setting existed after the first loss; I raised it to 3650 on Aug 26 — 17 days too late for the second.

Why the default is wrong

  • Deletion is silent: no prompt, no notice at purge time, no log the user sees.
  • It is permanent: files are unlinked, not moved to a trash/archive.
  • It is inconsistent: history.jsonl (user prompts) is kept forever, while the actual transcripts — the valuable half — are the part deleted.
  • The tool's own features (memory, --resume, long-running projects) invite users to treat sessions as durable records. The default treats them as cache.

Ask

  1. Change the default to no deletion (or years, not days).
  2. If cleanup runs, require explicit opt-in and warn before the first purge, listing what will be deleted.
  3. Archive instead of unlink (move to ~/.claude/trash/ with its own retention).
  4. Surface the setting in onboarding/docs prominently as a data-loss risk.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗