[FEATURE] Auto-delete conversation history after a configurable retention period
Resolved 💬 3 comments Opened Mar 15, 2026 by ChrisOr-Dev Closed Mar 19, 2026
Problem
Claude Code stores conversation history locally, and over time this data accumulates significantly. There is currently no built-in mechanism to automatically clean up old history, which leads to ever-growing storage consumption on the user's machine. Users who rely on Claude Code daily can see this grow to hundreds of megabytes or more.
Proposed Solution
Add a configurable auto-delete setting for conversation history with preset retention periods:
- 1 month — Keep only the last 30 days of history
- 3 months — Keep only the last 90 days of history
- 6 months — Keep only the last 180 days of history
- Never (default) — Keep all history indefinitely (current behavior)
This could be exposed as a setting in the Claude Code configuration, for example:
{
"historyRetention": "3months"
}
Expected Behavior
- A background cleanup process periodically removes conversations older than the configured retention period.
- The default remains "never delete" to preserve backward compatibility.
- Users receive no surprise deletions — the feature is strictly opt-in.
Why This Matters
- Prevents unbounded disk usage growth over time
- Gives users control over their local data lifecycle
- Aligns with privacy-conscious practices (less stale data sitting on disk)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗