exploring-claude-sessions
Installation
SKILL.md
Exploring Claude Code Sessions
Set CLAUDE_ROOT="${CLAUDE_CONFIG_DIR:-$HOME/.claude}". Claude Code stores each session as JSONL under $CLAUDE_ROOT/projects/. The usual project slug is the cwd with / changed to -; if CLAUDE_CODE_PROJECT_DIR_NAME is set or uncertain, list/search $CLAUDE_ROOT/projects instead—it cannot be derived before finding the transcript.
Storage locations
| Path | What it holds |
|---|---|
$CLAUDE_ROOT/projects/<project-slug>/<session-id>.jsonl |
Main session transcripts |
$CLAUDE_ROOT/projects/<project-slug>/<session-id>/subagents/agent-<agent-id>.jsonl |
Subagent transcripts (same schema), with agent-<agent-id>.meta.json (agent type, description, spawn depth) |
$CLAUDE_ROOT/projects/<project-slug>/<session-id>/subagents/journal.jsonl |
Subagent lifecycle records: started / result; not a conversation transcript |
$CLAUDE_ROOT/projects/<project-slug>/<session-id>/tool-results/<id>.txt |
Large tool outputs spilled to their own files, pointed at by toolUseResult.persistedOutputPath |
$CLAUDE_ROOT/projects/<project-slug>/<session-id>/workflows/wf_*.json |
Per-session workflow run records |
$CLAUDE_ROOT/projects/<project-slug>/memory/ |
Per-project auto-memory (markdown) |
$CLAUDE_ROOT/projects/<project-slug>/.session-aliases |
Pointers to sibling project directories for the same working dir — one absolute $CLAUDE_ROOT/projects/<slug> path per line. Not session names |
$CLAUDE_ROOT/history.jsonl |
Global prompt history: {display, timestamp(ms), project, sessionId} per line |
$CLAUDE_ROOT/file-history/<session-id>/<hash>@v<N> |
File snapshots backing checkpoint/undo |
$CLAUDE_ROOT/sessions/<pid>.json |
Live registry of running sessions: {pid, sessionId, cwd, version, kind, entrypoint, name, status, …} |