Feature request: Auto-cleanup for stale project entries in .claude.json
Resolved 💬 2 comments Opened Jan 14, 2026 by jochiang Closed Feb 27, 2026
Problem
The ~/.claude.json file accumulates project entries indefinitely under the projects key. Each project stores detailed stats (cost, tokens, model usage, session IDs, etc.) that persist forever, even for projects you no longer use.
Currently there are settings like cleanupPeriodDays that clean up chat transcripts, but nothing to prune stale project data.
Proposed Solution
Either:
- Extend
cleanupPeriodDaysto also prune project entries that haven't been accessed in X days - Add a separate
projectCleanupPeriodDayssetting for more granular control
Use Case
Users who work on many projects over time end up with a bloated .claude.json file containing historical data for projects they may never revisit.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗