Problem
Claude Code silently deletes conversation transcripts after 30 days by default (cleanupPeriodDays: 30). Most users are unaware of this setting until they lose data. Multiple issues have been filed on the Claude Code repo:
Proposal
Add a toggle in Settings → General → Window Behavior, positioned below the existing "Skip Claude Code first-run confirmation" toggle:
Title: "Keep conversation history"
Description: "Prevent Claude Code from auto-deleting conversation transcripts (default: 30 days)"
When enabled: set cleanupPeriodDays: 99999 in ~/.claude/settings.json
When disabled: remove the cleanupPeriodDays field (revert to Claude Code's default behavior)
Why CC Switch
CC Switch already manages Claude Code settings (e.g., skipClaudeOnboarding writes to ~/.claude.json). This is a natural extension — protecting users from a known data loss footgun during initial setup.
Implementation Notes
- Target file:
~/.claude/settings.json (different from ~/.claude.json used by onboarding skip)
- Follows the existing ToggleRow pattern in
WindowSettings.tsx
- Requires new Tauri commands for reading/writing
cleanupPeriodDays
- i18n: EN/ZH/JA translations needed
I'll submit a PR for this.
Problem
Claude Code silently deletes conversation transcripts after 30 days by default (
cleanupPeriodDays: 30). Most users are unaware of this setting until they lose data. Multiple issues have been filed on the Claude Code repo:cleanupPeriodDays: 0silently disables ALL transcript persistenceProposal
Add a toggle in Settings → General → Window Behavior, positioned below the existing "Skip Claude Code first-run confirmation" toggle:
Title: "Keep conversation history"
Description: "Prevent Claude Code from auto-deleting conversation transcripts (default: 30 days)"
When enabled: set
cleanupPeriodDays: 99999in~/.claude/settings.jsonWhen disabled: remove the
cleanupPeriodDaysfield (revert to Claude Code's default behavior)Why CC Switch
CC Switch already manages Claude Code settings (e.g.,
skipClaudeOnboardingwrites to~/.claude.json). This is a natural extension — protecting users from a known data loss footgun during initial setup.Implementation Notes
~/.claude/settings.json(different from~/.claude.jsonused by onboarding skip)WindowSettings.tsxcleanupPeriodDaysI'll submit a PR for this.