xhkzdepartedream

SessionSweep — Development skill for Claude Code

Development community

Browse every agent session left on your disk, read the conversation, and delete it for real — transcript plus the index entries that would resurrect it.

How to install SessionSweep

This entry records only its repository, not the path inside it, so there is no exact command to give. Open xhkzdepartedream/SessionSweep and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What SessionSweep does

Browse every agent session left on your disk, read the conversation, and delete it for real — transcript plus the index entries that would resurrect it. Claude Code, Codex, DSH, Pi.

Alternatives in Development

  • Gallery — Build a static, shareable gallery from your fidelity reports — an index of score cards plus a permalink page ( 3.6k ★
  • /resume — Pick up where you left off on a target 1.8k ★
  • 01 Fts5 Search — Replace Inkwell's naive LIKE post filter with a real SQLite FTS5 full-text index that ranks 143 ★

README

SessionSweep

Browse every agent session left on your disk, read the whole conversation, and delete it for real.

Coding agents treat sessions as disposable: they create one per conversation and never offer a way to remove it. After a few months you have hundreds of stale transcripts across four different tools, in four different formats, some of them compressed, and no way to see what is in them or get rid of them.

SessionSweep is the vacuum cleaner. It reads each harness's own storage, shows you the transcript, and deletes the transcript *plus the index entries that would otherwise resurrect it*.

Supported harnesses

Harness Transcript Index that must be cleaned too
Claude Code ~/.claude/projects//.jsonl + sidecar dir ~/.claude/history.jsonl
Codex ~/.codex/sessions////rollout-*.jsonl and archived_sessions/ state_*.sqlite threads, thread_history_*.sqlite, session_index.jsonl
DSH ~/.dsh/sessions//session-/session.jsonl.zstd storages/workspace.json, storages/session_projcache.json
Pi ~/.pi/agent/sessions//_.jsonl pi-web-session-index.json, pi-acp/session-map.json

Deleting only the transcript is the trap: for Codex the resume list comes from `state_*.sqlite`'s `threads` table, and for DSH from `workspace.json`. Sweep the file and leave the index alone, and you get a conversation that still appears in `--resume` but errors out when opened.

Usage

uv sync
uv run sessionsweep            # TUI
uv run sessionsweep doctor     # which harnesses were detected
uv run sessionsweep list       # every session, one line each
uv run sessionsweep show   # print a full transcript
uv run sessionsweep purge  --dry-run   # show exactly what would be deleted
uv run sessionsweep purge  --yes       # delete it

TUI

The toolbar dropdown narrows the list to a single harness; the input next to it filters by id, title, cwd, first mes