[BUG] Session transcripts expire/disappear silently while still listed in the sidebar — should not happen unless archived
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Here's a draft you can paste directly into a new issue at github.com/anthropics/claude-code/issues:
---
Title: Session transcripts expire/disappear silently while still listed in the sidebar — should not happen unless archived
Environment:
- Claude Code desktop app version: 1.22209.3 (babe11), 2026-07-19
- macOS (Darwin 24.6.0)
- Usage pattern: project sessions worked on intermittently (e.g. weekly), not daily
Description:
Older sessions still appear in the recent-sessions sidebar with their correct titles, but clicking them shows:
Session not found on disk Send a message to start fresh in this directory.
with only Archive/Delete as options.
Diagnosis:
I inspected the underlying session metadata files directly (~/Library/Application Support/Claude/claude-code-sessions/*/*/*.json). Each broken session's JSON contains an explicit flag:
"transcriptUnavailable": true
This is present on a large number of session files, not an isolated case — it does not appear to be file corruption, a pathing bug, or related to using multiple accounts on one machine (I confirmed both a working and a broken session live under the identical account/org folder). It looks like transcript content is being pruned/expired after some retention period, while the lightweight metadata entry (title, timestamps, isArchived: false) is retained indefinitely and continues to render normally in the sidebar.
Why this is a problem:
- Data loss without consent or warning. Sessions disappear (their content becomes unrecoverable) with no indication this will happen, and no way to opt out short of manually archiving every session before it ages out. Users who work intermittently (e.g. weekends only) are disproportionately affected, since more time elapses between visits.
- Misleading UI state. A session with
transcriptUnavailable: trueis visually indistinguishable from a healthy one in the sidebar — same title, same normal appearance — until you click it and hit a dead end. There's no visual cue (graying out, icon, badge) that content is gone or at risk.
What Should Happen?
Requested behavior:
- Transcripts should not be deleted/expired for sessions the user has not explicitly archived. If storage/retention limits require pruning, archiving should be the mechanism that opts a session in or out of it — not a silent, time-based purge applied uniformly.
- If some form of expiry must remain (e.g. for storage management), the sidebar should visually distinguish sessions whose transcript is no longer available (or approaching expiry) before the user clicks in, rather than presenting them identically to live sessions.
Error Messages/Logs
Steps to Reproduce
Reproduction:
grep -l "transcriptUnavailable" ~/Library/Application\ Support/Claude/claude-code-sessions///*.json
returns numerous session files where this flag is true, spanning sessions from several weeks back, while more recent sessions do not have it set.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code desktop app version: 1.22209.3 (babe11), 2026-07-19
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗