{"version":"2.1.304","anchor":"remote-settings-unknowable-pause-for-retention-cleanup-disk","canonical_anchor":"remote-settings-unknowable-pause-for-retention-cleanup-disk","heading":"Cleanup is skipped when server-managed settings can't be read","tier":"notice","area":"Sessions","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.304\/e\/remote-settings-unknowable-pause-for-retention-cleanup-disk","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.304","markdown":"### Cleanup is skipped when server-managed settings can't be read\n\nBackground and retention cleanup now pause when a session can't know its server-managed settings, and some disk writes bail out in a new session mode\n\n**What**\n\nClaude Code periodically cleans up old files in the background, such as past conversation transcripts. Retention cleanup is the part that deletes old ones. It now checks whether server-managed settings (settings an organization pushes from Anthropic's servers) can be known first:\n\n- When the session reads no stored server-managed settings and holds none of its own, retention cleanup stops and returns `remote_settings_unknowable`. The log reads \"Skipping retention cleanup: this session reads no stored server-managed settings\". Before, cleanup only looked at user settings and policy settings.\n\n- Background housekeeping waits for that result. When it is `remote_settings_unknowable`, it does not write the `.last-cleanup` marker and skips a later cleanup step. Before, it always wrote `.last-cleanup`.\n\n- Cleanup gains a helper that waits for `settings.read` hooks before the sweep starts.\n\n- A new check, read by the finding as a test for a session with no disk, makes several disk writes give up: saving remote settings, peer file transfer, file attachments, reading an update result, and writing an inbound attachment.\n\n**Why**\n\nIf a setting that controls how long files are kept could only come from the server and is not available, Claude Code no longer goes ahead and deletes files under rules it can't see.\n\n- Area: Sessions\n- Names: `cleanupPeriodDays`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: no"}