anthropics / anthropics/claude-code

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

Abierto
#91,464 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:desktop documentation enhancement
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
desktop, documentation
Tipo de issue
Documentación
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
52/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.