cleanupPeriodDays
A Claude Code settings key, read out of the shipped bundle. It was in the build from v2.1.138 and was gone by v2.1.284.
Choose how many days Claude Code keeps transcripts before deleting them
Anthropic's own wording. Read off All settings, captured 2026-10-22.
In the changelogs
15Releases whose published page names cleanupPeriodDays.
-
v2.1.304
Old transcript cleanup pauses when server-managed settings cannot be read
Automatic deletion of old transcripts now skips when server-managed settings are unknown, and sessions without a disk skip disk writes
found in this entry's text, named in this entry
-
v2.1.287
cleanupPeriodDaysnow also clears old files in .claude/state/served-callsClaude Code now deletes old files under .claude/state/served-calls after the number of days set by
cleanupPeriodDaysfound in this entry's text, named in this entry
-
v2.1.283
Cloud file deletion notice now says how long your local copy is kept
When a cloud session deletes or replaces a synced file, the notice now says your copy is kept for at least the
cleanupPeriodDaysperiodfound in this entry's text, named in this entry
-
v2.1.282
More remotely managed settings keep their original values when partly invalid
When remotely managed settings fail validation, Claude Code now keeps the original values for more keys instead of only the two cleanup settings
found in this entry's text
-
v2.1.248
Transcripts owned by the Claude desktop app are exempt from the retention sweep
Desktop-owned transcripts survive the retention sweep, capped by a new desktopSessionCleanupPeriodDays setting.
named in this entry, found in this entry's text
-
v2.1.248
Cleanup skip message names the setting at fault
When transcript cleanup skips, it now names the retention setting that failed validation.
named in this entry, found in this entry's text
-
v2.1.238
New
keybindingFlavorsetting for readline-style prompt editingSet keybindingFlavor to readline and Ctrl+W deletes back to whitespace like Bash does.
found in this entry's text
-
v2.1.234
Auto-mode classifier failures write a debug dump that ages out with the session
When auto mode's classifier errors, a debug dump lands beside your transcript and gets cleaned up later.
found in this entry's text
-
v2.1.224
Settings presence checks can read through the newer settings store
Checks for explicitly set settings keys can now read from the newer settings store.
named in this entry, found in this entry's text
- v2.1.203
-
v2.1.116
Session Retention Cleanup
found in this entry's text
-
v2.1.8
Settings Validation for Cleanup
found in this entry's text
-
v1.0.120
File History Cleanup on Session Expiry
found in this entry's text
-
v0.2.116
New Features
found in this entry's text
-
v0.2.116
Notes for Users
found in this entry's text
First cited
5The earliest release whose published evidence quoted cleanupPeriodDays was v2.1.8, 15 Jan 2026. That is the oldest release this project wrote about it, so it is a floor on the name's age and not the release that introduced it. It is not a presence reading: which builds carried the name is the table below.
Presence across releases
2Build by build
149One row per release since the first build this name was read out of. Absent means the build was read and the name was not in it, never mined means no bundle for that release was ever archived, and a declared type or a default is only ever what that release's own bundle stated.
Read out of the published npm bundle release by release, and out of Anthropic's own documentation as this site captured it. Nothing on this page is a description anybody here wrote about what the settings key does. All settings keys.