[BUG] Desktop: deleting a session from the sidebar now permanently deletes its local transcript (since Claude Code 2.1.284), wiping usage stats for that day
Status Open
Reported on v2.1.284
Maintainer reply None cached
Activity 0 comments · opened Oct 1, 2026
What changed
Since the Desktop update on 2026-09-29 (Claude Desktop 2.16120.0, bundled Claude Code 2.1.284, previously 2.1.281), deleting a session from the Code tab sidebar also removes, with no undo:
- the transcript
.jsonlunder~/.claude/projects/ - that session's prompts in
~/.claude/history.jsonl - its
file-history/andsession-env/entries
Before this update, deleting a session only hid it: the app wrote a deleted_<id> marker under claude-code-sessions/, and the transcript stayed on disk.
Evidence (macOS, Darwin 27.0.0)
- Sessions I deleted on 2026-09-28 (on 2.1.281): their transcripts are still on disk.
- Sessions I deleted on 2026-09-29 21:58 and 2026-09-30 12:14 / 13:58 / 18:11 / 19:12 (on 2.1.284): no transcript, no
history.jsonlentries, nofile-history. The sessions definitely existed: they made dozens of git commits in my repos during those hours. cleanupPeriodDaysis set to9999999999, so this is not the retention sweep.- A Time Machine backup taken at 21:07 the same evening already lacks them, so the files are removed at the moment of deletion.
I inferred this from the evidence above and have not reproduced it with a throwaway session.
Impact
- The Desktop usage heatmap shows 2026-09-30 as empty, although I worked all day. The stats cache only computes completed days, so a session deleted the same day is never counted, and there is no way to rebuild it.
- I set
cleanupPeriodDayshigh specifically to keep my history. Deleting a session from the sidebar now silently overrides that. - I delete sessions to keep the sidebar short, not to erase my history. Those are two different things, and until 2.1.284 the app treated them as different.
What I'm asking for
- Deleting a session from the sidebar should only remove it from the sidebar, as it did before 2.1.284. The local transcript, prompt history and usage stats should stay.
- If some users want deletion to erase the transcript too, make that an opt-in setting (for example "Also delete local transcripts when deleting a session"), off by default. A warning dialog does not solve this: I want to be able to clear the sidebar without ever losing the transcript.
- Mention behavior changes like this in the release notes.
Related: #62476 (transcripts deleted silently), #94479 (stats history loss when transcripts are gone).