{"name":"desktopSessionCleanupPeriodDays","slug":"desktopsessioncleanupperioddays","family":"setting","title":"Settings keys","noun":"settings key","description":"Set an age limit in days for [Claude Desktop and Cowork transcripts](\/docs\/en\/claude-directory.md#cleaned-up-automatically)","description_source":"docs","described_by":{"doc":"claude-code\/settings-reference","title":"All settings"},"presence":{"first_seen":"2.1.248","removed_in":"2.1.284","in_current_build":false,"newest_mined":"2.1.309","builds":28,"mined_builds":150,"first_cited":null},"aliases":[],"entries":[{"version":"2.1.282","anchor":"remote-managed-settings-keep-raw-values-for-keys-whose-only","heading":"More remotely managed settings keep their original values when partly invalid","line":"When remotely managed settings fail validation, Claude Code now keeps the original values for more keys instead of only the two cleanup settings","released_at":"2026-09-24 15:56:22","reason":"found in this entry's text"},{"version":"2.1.248","anchor":"desktop-released-session-cleanup-path","heading":"Desktop-released session cleanup path","line":"Cleanup code reads a setting for how long to keep sessions released from the desktop app.","released_at":"2026-08-27 20:35:36","reason":"named in this entry, found in this entry's text"},{"version":"2.1.248","anchor":"transcripts-owned-by-the-claude-desktop-app-are-exempt-from-","heading":"Transcripts owned by the Claude desktop app are exempt from the retention sweep","line":"Desktop-owned transcripts survive the retention sweep, capped by a new desktopSessionCleanupPeriodDays setting.","released_at":"2026-08-27 20:35:36","reason":"named in this entry, found in this entry's text"},{"version":"2.1.248","anchor":"cleanup-skip-message-names-the-setting-at-fault","heading":"Cleanup skip message names the setting at fault","line":"When transcript cleanup skips, it now names the retention setting that failed validation.","released_at":"2026-08-27 20:35:36","reason":"found in this entry's text"}],"entries_total":4,"docs":[{"source":"claude-code","path":"settings-reference","title":"All settings","documented":true},{"source":"claude-code","path":"claude-directory","title":"Explore the .claude directory","documented":false},{"source":"claude-code","path":"monitoring-usage","title":"Monitoring","documented":false},{"source":"claude-code","path":"server-managed-settings","title":"Configure server-managed settings","documented":false},{"source":"claude-code","path":"sessions","title":"Manage sessions","documented":false}],"docs_total":5,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/setting\/desktopsessioncleanupperioddays","family_url":"https:\/\/changelogs.core-directive.com\/reference\/setting.json"}