anthropics / anthropics/claude-code

[DOCS] Desktop transcript retention: the "while they are in the app" condition on the sweep exemption is not documented

オープン
#91,464 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:desktop documentation enhancement
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

The 2.1.248 changelog and the settings/directory references describe the Desktop transcript exemption differently, and the difference is the part that decides whether a transcript can still be deleted.

## The two statements

Changelog, 2.1.248:

> Fixed Claude Desktop and Cowork sessions disappearing after 30 days: the transcript cleanup now keeps desktop-written sessions **while they are in the app** (unless org policy manages retention); the new `desktopSessionCleanupPeriodDays` setting caps the exemption

[claude-directory § Cleaned up automatically](https://code.claude.com/docs/en/claude-directory#cleaned-up-automatically):

> **Claude Desktop and Cowork transcripts**: Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age.

[settings-reference § `desktopSessionCleanupPeriodDays`](https://code.claude.com/docs/en/settings-reference#desktopsessioncleanupperioddays):

> Without this key, Claude Code keeps those transcripts at any age.

Both reference pages state the exemption unconditionally. The changelog qualifies it with "while they are in the app", and neither page mentions that qualification or says what it depends on.

## Why it matters

The Desktop session record and the transcript live in two different places: `%APPDATA%\Claude\claude-code-sessions\\\local_.json` holds metadata and a `cliSessionId`, and the conversation itself is `~/.claude/projects//.jsonl`. The transcript is the only copy of the conversation (#81100).

If the exemption is keyed on the app still holding a session record, then removing or archiving a session in the app returns its transcript to the age-based sweep — and a user who removed a stale-looking entry a year ago would find the transcript gone, which is exactly the loss the exemption was added to prevent. If instead the exemption is keyed on a property of the transcript itself, the reference pages are correct as written and the changelog wording is just loose.

Either way a user cannot currently tell which, and the answer changes whether "remove from the list" is a safe action.

## What would resolve it

On both reference pages, say what the exemption depends on, and in particular whether these actions affect it:

* Archiving a session in the Desktop app
* Removing or deleting a session from the Desktop session list
* Deleting the app's own session metadata file, or the whole `claude-code-sessions` directory
* Continuing a Desktop-created session from the CLI afterwards (the settings reference says "started or **most recently continued** in Claude Desktop or Cowork", which implies the attribution can move — so presumably it can move away as well as toward Desktop, and that is worth stating)

If any of those does remove the exemption, the docs should also say what a user can do to keep the transcript anyway, since `desktopSessionCleanupPeriodDays` only caps the exemption and `cleanupPeriodDays` is the floor.

## Environment

Documentation as of 2026-09-02. Reported from Claude Code 2.1.247 in the Desktop app on Windows 11, which predates the 2.1.248 change, so the behaviour itself was not tested here — this is a question about what the documentation states, not a claim about what the code does.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start with the 2.1.248 changelog and the `claude-directory` and `settings-reference` pages, then trace or verify what determines the Desktop transcript exemption and how the listed archive, delete, metadata, and CLI-continuation actions affect it. Update both reference pages to describe that dependency, its effect on cleanup, and any safe retention guidance; done means the pages and changelog wording no longer conflict.

索引モデルが issue の本文から書いたものです。

評価

領域
desktop, documentation
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。