claude-code - 💡(How to fix) Fix [Feature Request] Add "never expire" option for local project history retention [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56093Fetched 2026-05-05 05:58:24
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Fix Action

Fix / Workaround

⏺ There's no official "disable" toggle — Claude Code's cleanupPeriodDays setting has a minimum of 1 and rejects 0. The practical workaround is setting it to a very high value in ~/.claude/settings.json:

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description add a never expire option for files saved for history locally. how can i disable all the history for claude code projects at ~/.claude/projects/ being deleted every 30 days. i want them to be saved forever

⏺ claude-code-guide(Disable 30-day project history cleanup) ⎿ Done (3 tool uses · 11.9k tokens · 18s) (ctrl+o to expand)

⏺ There's no official "disable" toggle — Claude Code's cleanupPeriodDays setting has a minimum of 1 and rejects 0. The practical workaround is setting it to a very high value in ~/.claude/settings.json:

{ "cleanupPeriodDays": 36500 }

That's ~100 years, effectively permanent. If you want me to apply this to your global settings now, say the word and I'll use the update-config skill. Alternatively, if you want true forever-retention, periodically copy ~/.claude/projects/ to a separate archive directory outside Claude's management — Claude Code only cleans up its own directory.

Worth filing via /feedback if you want a real "never expire" option.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.126
  • Feedback ID: 28d71de4-1662-4dd6-8207-f267111e7a37

Errors

[]

extent analysis

TL;DR

Set the cleanupPeriodDays to a high value, such as 36500, in ~/.claude/settings.json to effectively make the project history permanent.

Guidance

  • To disable the 30-day project history cleanup, update the cleanupPeriodDays setting in ~/.claude/settings.json to a high value, such as 36500.
  • This setting has a minimum of 1 and rejects 0, so setting it to a very high value is a practical workaround.
  • Alternatively, consider periodically copying ~/.claude/projects/ to a separate archive directory outside Claude's management for true forever-retention.
  • If you want a real "never expire" option, file a feedback request via /feedback.

Example

{
  "cleanupPeriodDays": 36500
}

Notes

This workaround may not be suitable for all users, and a true "never expire" option may be desirable. The cleanupPeriodDays setting only affects Claude's own directory, so projects copied to an external archive directory will not be cleaned up.

Recommendation

Apply workaround: set cleanupPeriodDays to a high value, as this is the most practical solution given the current limitations of the cleanupPeriodDays setting.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Feature Request] Add "never expire" option for local project history retention [1 comments, 2 participants]