Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.304 ·

Cleanup is skipped when server-managed settings can't be read

Background 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

Group of 2 You'll notice Improvements
JSON All of v2.1.304
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SessionsArea: what it touches
ImprovementsKind: in v2.1.304,
ImprovementsSection of the release

What

Claude 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:

  • 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.
  • 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.
  • Cleanup gains a helper that waits for settings.read hooks before the sweep starts.
  • 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.

Why

If 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.

Read from
Names in the bundlecleanupPeriodDays
Since it was published

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.

Confirmed since Anthropic's documentation has since written up cleanupPeriodDays, on Hooks reference. There is no timeout or retry limit. The session remains on disk until you resume it, subject to the [`cleanupPeriodDays`](/docs/en/settings-reference#cleanupperioddays) retention sweep, which deletes session files after 30 days by default,… hooks see the edit
How sure we are
Two sources agreeTwo things we can check say the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up cleanupPeriodDays, on Hooks reference.
Anthropic's release notes agreeChanged mods' settings.read hooks to receive each settings layer and rewrite the merged settings, so a managed mod can make an…

See this entry in the whole of v2.1.304 →

Feedback