Desktop-owned transcripts survive the retention sweep, capped by a new desktopSessionCleanupPeriodDays setting.
What's wrong with this entry?
The sweep that deletes old local .jsonl conversation transcripts now identifies the ones created or last written by a desktop-host surface (Claude Desktop or Cowork) and keeps them instead of deleting them, giving them a grace period for as long as the desktop client still holds them. A new settings key, desktopSessionCleanupPeriodDays, puts a ceiling on that exemption, and kept files are counted separately from deleted ones in the sweep's telemetry. The exemption is dropped entirely when cleanupPeriodDays is set by org policy or the session runs under the hipaa or zdr compliance posture, so those deployments keep deleting on the old schedule.
desktopSessionCleanupPeriodDaysis a maximum age in days, validated as a non-negative integer, described in the settings schema as "Retention ceiling in days for session transcripts created or last written by a desktop-host surface (Claude Desktop, Cowork), which are otherwise exempt from the cleanupPeriodDays sweep." Its compiled default is 0, meaning no ceiling, so nothing is deleted unless you set it, for example{ "desktopSessionCleanupPeriodDays": 30 }.- The cleanup pass now iterates both retention keys rather than only
cleanupPeriodDays. - Ownership is decided by reading the head and tail of each transcript and inspecting its
entrypointfield. - A companion marker file named
.desktop-released.json, sitting next to the transcript, is how the desktop app hands a file back:reason: "delete"releases it immediately,reason: "archive"releases it once the marker itself is older than the cutoff, and any other value leaves the grace period in place. - Claude Code only reads that marker and never writes it, so the desktop app is the sole producer.
.desktop-released.jsonand its.desktop-released.json.tmptemporary form are themselves sweepable, except that a marker matching a transcript still on disk is skipped.- Kept files get a distinct "grace" outcome rather than counting as deleted or skipped, reported as
transcriptsExemptedDesktopin thetengu_retention_sweepevent and astranscripts_exempted_desktopin the OTEL-style record. - There is no flag to turn the exemption on or off; only the compliance posture or an org-set
cleanupPeriodDayssuppresses it. - Deletion of transcript side files is now staged: paths are collected while walking a directory and unlinked only at the end, and the whole batch is dropped if any error occurred during the walk, so a partial failure no longer leaves half-deleted state.
.desktop-released.json, var U = ".desktop-released.json", transcriptsExemptedDesktop, transient read failure while classifying a transcript for the desktop retention exemption, Retention ceiling in days for session transcripts created or last written by a desktop-host surface (Claude Desktop, Cowork), which are otherwise exempt from the cleanupPeriodDays sweep., transcripts_exempted_desktop
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.224
Settings presence checks can read through the newer settings store
Both mention cleanup period