{"version":"2.1.248","anchor":"transcripts-owned-by-the-claude-desktop-app-are-exempt-from-","canonical_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","tier":"use","area":"Transcript Retention","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248\/e\/transcripts-owned-by-the-claude-desktop-app-are-exempt-from-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.248","markdown":"### Transcripts owned by the Claude desktop app are exempt from the retention sweep\n\nDesktop-owned transcripts survive the retention sweep, capped by a new desktopSessionCleanupPeriodDays setting.\n\n**What**\n\nThe 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.\n\n**Details**\n\n- `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 }`.\n- The cleanup pass now iterates both retention keys rather than only `cleanupPeriodDays`.\n- Ownership is decided by reading the head and tail of each transcript and inspecting its `entrypoint` field.\n- 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.\n- Claude Code only reads that marker and never writes it, so the desktop app is the sole producer.\n- `.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.\n- 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.\n- There is no flag to turn the exemption on or off; only the compliance posture or an org-set `cleanupPeriodDays` suppresses it.\n- 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.\n\n**Evidence**\n\n`.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`\n\n- Area: Transcript Retention\n- Names: `desktopSessionCleanupPeriodDays`, `cleanupPeriodDays`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 4\/5"}