← ClaudeAtlas

claude-session-doctorlisted

Diagnose and fix common Claude Code session and disk problems. Reach for it when the disk is full or a command dies with ENOSPC / "no space left on device" / "/tmp is full"; when `claude --resume` history is missing, reverted, empty, or shows sessions in the wrong order (an old chat on top, the latest one buried); or when a session transcript looks truncated or corrupt. Trigger phrases: "ENOSPC", "no space left on device", "disk full", "/tmp full", "resume history missing", "resume order wrong", "session corrupt/truncated", 以及 "磁盘满了", "空间不足", "resume 历史丢了", "会话顺序不对", "记录损坏/截断". Everything is READ-ONLY except one explicit --apply that only rewrites file modification times.
MLliu6/lMl_skills · ★ 0 · AI & Automation · score 67
Install: claude install-skill MLliu6/lMl_skills
# claude-session-doctor **English** | [中文](#中文) A first-aid kit for the two things that most often break a long Claude Code session: **the disk fills up**, and **`--resume` history goes wrong** (missing, out of order, or truncated). It is a set of small, self-contained scripts that **diagnose read-only** and fix exactly one thing — resume ordering — and only when you explicitly ask with `--apply`. ## What it assumes (and nothing more) Only the generic Claude Code layout: ``` ${CLAUDE_CONFIG_DIR:-~/.claude}/projects/<encoded-cwd>/<session-id>.jsonl ``` `<encoded-cwd>` is your working directory with the path separators encoded (e.g. `/home/alice/work/myproject` → `-home-alice-work-myproject`). Each `<session-id>.jsonl` is one conversation; `--resume` lists these files. No host, account, or environment specifics are baked in. ## The two failure families ### A. Disk full / ENOSPC / `/tmp` full Symptoms: writes fail with `ENOSPC`, a tool reports "no space left on device", or Claude Code cannot save. Causes are usually one of: - a filesystem at **100% bytes** (`df`); - a filesystem out of **inodes** even though bytes look free (`df -i`); - a big directory/file you forgot about (`du`, large-file scan); - **deleted-but-still-open files** — space that `du` cannot see because a running process still holds the handle. Restarting that process reclaims it. ### B. `--resume` history missing / reverted / out of order / truncated - **Missing/reverted**: the transcript store moved