Claude ENOSPC recovery
Claude Code ENOSPC Session History Recovery
If disk space reached 0 GB and Claude's sidebar lost history, do not start by deleting app state. First prove whether the JSONL transcripts still exist, back them up, then rebuild or re-index from a copy.
Protect intact transcripts before touching IndexedDB or cache folders.
The safest path is preserve, inspect, then rebuild. If `~/.claude/projects/*.jsonl` still exists, the session content may not be lost; the broken layer is often the UI index or database state created while the disk was full.
What probably happened
When the system drive hits ENOSPC, Claude can fail while writing an index, database entry, or session metadata. That does not automatically mean the transcript files are gone. If the JSONL files are intact, the next move is to preserve them and avoid letting a later launch overwrite or prune state while you are experimenting.
Safe order of operations
- Free enough disk space for normal writes, then stop Claude completely.
- Copy `~/.claude/projects/*.jsonl` to a dated backup outside the app folder.
- List the largest and newest JSONL files so you know whether the missing sessions are present.
- If the JSONL files exist, try the CLI resume path before modifying Desktop app data.
- Only after backup, inspect Claude's UI index or IndexedDB state. Do not delete whole app-support folders blindly.
- Try recovery on a copy first if you need to reconstruct a sidebar or session list.
If the JSONL files exist, resume from the CLI first
The Desktop sidebar can be blank while the transcript files are still usable. The fastest non-destructive recovery check is to list the JSONL files, take one session id from the filename, and ask the Claude CLI to resume it.
dir "%USERPROFILE%\.claude\projects" /s /b | findstr /i ".jsonl"
claude --resume SESSION_ID_FROM_FILENAME
That does not rebuild the Desktop sidebar, but it can confirm whether the session content is still readable before you touch IndexedDB, app support, cache, or database files.
Before running a metadata rebuild script
A recovery script can be the right tool when the JSONL transcripts survived but Desktop metadata did not. Treat it like a write operation: back up the source transcripts, inspect what metadata is missing, and prefer a dry run or copy-first rebuild before changing live app folders.
- Copy `~/.claude/projects/**/*.jsonl` to a dated backup before running any third-party recovery tool.
- Count existing `local_*.json` metadata files under the Claude app data folder so you know whether metadata is sparse, empty, or only partially missing.
- Run diagnostics before synthesis; save the before/after counts and any generated file list.
- Restart Claude only after the backup and generated metadata can be explained.
- Keep transcript contents private. File counts, paths, sizes, timestamps, and ENOSPC errors are enough for a first review.
Want a private check before writing generated metadata into a live Claude profile?
$29 SafeDisk metadata rebuild review
Request $29 script-safety review
Windows PowerShell evidence
This is read-only except for creating a backup copy on Desktop. It does not upload file contents.
$stamp = Get-Date -Format "yyyyMMdd-HHmmss"
$backup = "$env:USERPROFILE\Desktop\claude-jsonl-backup-$stamp"
New-Item -ItemType Directory -Force -Path $backup | Out-Null
Copy-Item "$env:USERPROFILE\.claude\projects\*.jsonl" $backup -ErrorAction SilentlyContinue
Get-ChildItem "$env:USERPROFILE\.claude\projects" -Recurse -Filter *.jsonl |
Sort-Object Length -Descending |
Select-Object -First 30 FullName,Length,LastWriteTime
Get-PSDrive C
Write-Output "Backup: $backup"
Send the file count and sizes; get the safest next recovery step.
If you are not ready for a paid review, send only the symptom plus the JSONL file count, largest file sizes, and whether a backup exists. We can usually tell whether this looks like recoverable content or an index-only failure without seeing transcript contents.
If you want a second set of eyes, send only the file list, sizes, timestamps, and the ENOSPC symptom first. Do not paste private transcript contents.
liuminsheng3@gmail.com - SafeDisk Claude Session Recovery Payment Link
$29 recovery review for one Claude ENOSPC incident.
We review the symptom, backup evidence, file list, and safest reconstruction path. No remote access and no transcript contents required for the first pass.
What not to do first
- Do not delete `~/.claude` before copying JSONL transcripts.
- Do not run broad cleaner tools against app data while recovering history.
- Do not paste private transcript contents into public issues.
- Do not assume a blank sidebar means every session file is gone.