Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.248 Home All releases olderv2.1.247 v2.1.250newer
Claude Code v2.1.248

Transcripts owned by the Claude desktop app are exempt from the retention sweep

Use it now
Useful4 Signal4
Transcript Retention Notable

Desktop-owned transcripts survive the retention sweep, capped by a new desktopSessionCleanupPeriodDays setting.

desktopSessionCleanupPeriodDayscleanupPeriodDays
What

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.

Details
  • desktopSessionCleanupPeriodDays is 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 entrypoint field.
  • 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.json and its .desktop-released.json.tmp temporary 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 transcriptsExemptedDesktop in the tengu_retention_sweep event and as transcripts_exempted_desktop in the OTEL-style record.
  • There is no flag to turn the exemption on or off; only the compliance posture or an org-set cleanupPeriodDays suppresses 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.
Evidence

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

See this entry in the whole of v2.1.248 →