STUPID-2026-0102
Claude Code's silent retention cleanup deleted a user's conversation transcripts 71 days early, with no warning, soft-delete, or restore path (GitHub #59248)
Instruction given
None — the deletion was performed by Claude Code's own built-in retention cleanup process, not triggered by a user instruction. The user was simply running Claude Code (via the Cursor extension, build anthropic.claude-code-2.1.141-darwin-arm64) in a workspace whose path contained a space.
Expected behavior
Per Claude Code's documented 30-day default retention, conversation transcripts from the previous 30 days should remain resumable and recoverable, and deletion should happen through a disclosed, auditable process — ideally with a soft-delete window rather than an immediate unlink().
Actual behavior
A cleanup pass ran roughly 12 minutes after a new session started in the workspace and silently deleted every prior conversation transcript, including a session from the previous day, with no confirmation prompt and no in-product warning. Deletion went straight to unlink() with no soft-delete folder, no grace period, and no restore command; on macOS the files bypassed Trash entirely. The observed retention was far shorter than documented: with the report filed 2026-05-14, sessions back to 2026-04-14 should have survived under the stated 30-day default, but the most recent surviving transcript material in the workspace dated to 2026-03-04 — 71 days earlier. Eight orphaned `<sessionId>/subagents/` directories (about 15 MB, 72 files) survived with no parent `.jsonl` for any of them, and none of the six session UUIDs Claude Code's own file-history log recorded as active the previous day had any surviving session directory anywhere under `~/.claude/projects/`.
Damage
All resumable conversation history for the affected workspace older than the current session was permanently lost, including the prior day's session, with no way to view, resume, or recover it — the built-in cleanup has no restore mechanism and macOS Trash was bypassed. The reporter documented the loss with file-level evidence: a `.last-cleanup` timestamp update at 13:13:20 PT matching the deletion window, orphaned subagent transcript directories left with no parent session file, and a file-history log confirming six sessions from the prior day had vanished entirely from disk. Filed by the affected user (FTSBrand) with labels `area:core`, `bug`, `data-loss`, and `has repro`; open with no maintainer response as of publication.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Scope Misunderstanding
- Domain
- Infra
- Source
- Github Issue
Related incidents
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.
This database is callable over MCP — query it from inside your agent.