desktopSessionCleanupPeriodDays 設定でこの例外の上限を指定できる英語原文を表示英語原文を閉じる
desktopSessionCleanupPeriodDays setting caps the exemptionnumber記述場所ユーザー設定または管理者設定Claude Desktop または Cowork で開始、あるいは最後に継続したセッションのトランスクリプトに、日数単位の期限を設定する。このキーがない場合、Claude Code はこれらのトランスクリプトを期限なく保持する。Claude Code は、この上限と cleanupPeriodDays の両方を超過したものを削除するため、cleanupPeriodDays の既定値が 30 である場合、値が 7 でもトランスクリプトは 30 日間保持される。cleanupPeriodDays が代わりに適用されこのキーが無視されるケースは参照先に列挙されている。Claude Code v2.1.248 以降が必要。
既定値0 であり、期限を設けない。
{
"desktopSessionCleanupPeriodDays": 90
}Set an age limit in days for the transcripts of sessions you started or most recently continued in Claude Desktop or Cowork. Without this key, Claude Code keeps those transcripts at any age. Claude Code deletes each one once it's older than both this limit and [cleanupPeriodDays](#cleanupperioddays), so with cleanupPeriodDays at its default of 30, a value of 7 still keeps them 30 days. Cleaned up automatically lists the cases where cleanupPeriodDays applies instead and Claude Code ignores this key. Requires Claude Code v2.1.248 or later.
desktopSessionCleanupPeriodDays 設定でこの例外の上限を指定できるdesktopSessionCleanupPeriodDays setting caps the exemption