AI CLI Disk Full And Session Not Saved
When Gemini CLI, Claude Code, Codex, or another local agent hits ENOSPC, the worst failure mode is not a loud crash. It is continuing the session while logs, transcript files, task output, or recorder state are no longer being persisted.
Check if your AI session is still being saved.
Copy the read-only check first. If the result still needs judgment, send the output and we will offer the free SafeDisk AI deletion trial only when review is useful.
- Safe first
Large generated caches, old worktrees, and package/build outputs that can be recreated.
- Confirm first
Active transcripts, recent agent sessions, task output, and browser profiles tied to current work.
- Protect
Credentials, config, plugins, databases, and any session state needed to resume safely.
First Response Runbook
If a CLI disables recording or claims it can resume a session after an ENOSPC event, verify persistence before continuing. A working chat UI does not prove the transcript, recorder, or task output is still durable.
df -h . "$HOME" /tmp 2>/dev/null
df -i . "$HOME" /tmp 2>/dev/null
touch "$HOME/.safedisk-write-test" && rm -f "$HOME/.safedisk-write-test"
du -sh "$HOME/.gemini" "$HOME/.claude" "$HOME/.codex" 2>/dev/null
find "$HOME/.gemini" "$HOME/.claude" "$HOME/.codex" -maxdepth 4 -type f -size +100M -print0 2>/dev/null | xargs -0 du -h 2>/dev/null | sort -hr | head -30
What To Guard
- Recorder files or conversation JSONL that can be set to null or abandoned after ENOSPC.
- Task output capture files that can report disk full while normal writes still work.
- Per-agent worktrees, build outputs, browser profiles, model caches, and package caches.
- Exit summaries or resume commands that imply a session is restorable when no transcript was saved.
Use this when a CLI keeps running after ENOSPC.
This keeps the thread focused on recorder durability and safe deletion judgment instead of broad cache deletion.
One thing I would verify before continuing the session: after ENOSPC, prove the recorder/transcript is still durable, not just that the interactive CLI is still responding.
Read-only checks:
df -h . "$HOME" /tmp 2>/dev/null
df -i . "$HOME" /tmp 2>/dev/null
touch "$HOME/.safedisk-write-test" && rm -f "$HOME/.safedisk-write-test"
du -sh "$HOME/.gemini" "$HOME/.claude" "$HOME/.codex" 2>/dev/null
find "$HOME/.gemini" "$HOME/.claude" "$HOME/.codex" -maxdepth 4 -type f -size +100M -print0 2>/dev/null | xargs -0 du -h 2>/dev/null | sort -hr | head -30
If the recorder file was disabled or abandoned, the UI should surface that immediately and avoid printing a misleading resume command. Cleanup should start with rebuildable caches/worktrees, while active transcripts, credentials, plugins, and session state stay confirm-first.
SafeDisk AI deletion trial
The SafeDisk AI deletion trial reviews one short scan or summary and returns a safe first deletion judgment plus a persistence checklist. The free SafeDisk AI deletion trial turns one incident into rules for when to pause agents, what to clean first, and what must be preserved.
Need a delete / confirm / protect answer for AI CLI files?
Email is enough to start. The AI CLI symptom or command output can follow; we only ask for the free SafeDisk AI deletion trial when review is still useful.