Under the hoodTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
ElsewhereArea: what it touches
Internal ChangesKind: in v2.1.334,
Internal ChangesSection of the release
Unclear It is not clear when Claude Code forces the cleanup, so whether sessions get deleted in your setup is unknown.
What
Claude Code deletes old sessions after a set period. If you started it with --setting-sources and left out user settings, and no other source set cleanupPeriodDays, this cleanup was always skipped. The cleanup can now be told to run anyway.
Why
It changes when old sessions may be deleted, even in a run where user settings were not loaded.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added sinceA small documentation edit on User identity and local data touched a line naming cleanupPeriodDays after this was published.* **By Claude Code**: [Claude Code's own cleanup](https://code.claude.com/docs/en/claude-directory#cleaned-up-automatically) deletes some of its older files, such as checkpoints and large tool outputs. If [Claude Code managed settings](htt…third-party/claude-desktop/data-storagesee the edit
Confirmed sinceAnthropic's documentation has since written up cleanupPeriodDays, on Deploy managed settings.| Other strings, numbers, and Booleans | Takes the value from the highest-ranked source that sets it | `model`, `cleanupPeriodDays` |managed-settingssee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear when Claude Code forces the cleanup, so whether sessions get deleted in your setup is unknown.
Anthropic's documentation agreesAnthropic's documentation has since written up cleanupPeriodDays, on Deploy managed settings.