Session transcripts silently deleted by automatic cleanup — no user consent, no warning, no setting to disable
Summary
Claude Code automatically deletes session transcript files without user consent, without any warning, and with no setting to disable or configure the retention period. This is unacceptable behaviour for a paid product.
What happened
A cleanup routine ran at approximately 07:09 AM BST on 2026-08-11 and permanently deleted all session history files from ~/.claude/sessions/. The Recycle Bin was bypassed — files were hard-deleted. No shadow copies exist. The data is unrecoverable.
Evidence
~/.claude/.last-cleanuptimestamp:2026-08-11T07:09:06.625Z- Sessions directory before cleanup: many months of research conversations
- Sessions directory after cleanup: 4 files, all from the same morning
- Recycle Bin: empty of any
.claudefiles - VSS: none configured on this machine
Impact
Months of research conversations, backtesting discussions, strategy development, and technical context were permanently destroyed. This was active, ongoing work being used daily. There is no way to recover it.
Why this is a serious bug
- No consent — the user never agreed to have their history deleted
- No warning — no notification before or after deletion
- No setting — there is no documented way to disable cleanup or set a retention period
- Bypasses Recycle Bin — hard deletes, making recovery impossible
- Paid product — users are paying a subscription and have a reasonable expectation that their data is preserved
Expected behaviour
- Session history should be retained indefinitely, or until the user explicitly deletes it
- At minimum, a configurable retention period with a default of >= 90 days
- Cleanup should move files to Recycle Bin, not hard-delete
- A warning/notification before any cleanup runs
- A
cleanupSessions: falseorsessionRetentionDays: Noption insettings.json
Environment
- Claude Code: Windows desktop app
- OS: Windows 11 Pro 10.0.26200
- Sessions path:
C:\Users\<user>\.claude\sessions\
Workaround applied
User has had to set up a manual Windows Scheduled Task to back up sessions daily at 06:00 before the cleanup runs. This should not be necessary.