Spooling
Providers
Back to spooling.ai

Claude Code

How Spool ingests Claude Code sessions.

Claude Code is Anthropic's CLI for Claude. Spool's deepest provider: the JSONL session format gives us full message history, tool calls with inputs and outputs, sidechain (subagent) structure, model usage, and cost.

Where sessions live

~/.claude/projects/<encoded-project-path>/<session-uuid>.jsonl

The project directory name is the cwd with / replaced by - (e.g. -Users-you-toebox). Each session is one JSONL file, one record per line, types user and assistant.

What we parse

  • Messages: role, content, timestamp, cwd, git branch, model.
  • Tool use: every Claude Code tool call (Read, Edit, Write, Bash, Grep, Glob, Agent, WebSearch, etc.) with input args and output preview.
  • Trace structure: parentUuid and isSidechain are walked to reconstruct the agent/subagent tree. Each Task tool call becomes an agent span; sidechain messages parent under it.
  • Usage and cost: input/output/cache tokens from each assistant message, costed against the model's published rates.

The legacy flat session view and the new trace tree are written in the same pass, so you get both.

Gotchas

  • cwd captured at session start. Claude launched from ~ will tag every session in that run with cwd=/Users/you, even if the model worked on files in subdirectories. Filter by --title instead when this happens. See spooling push --title.
  • Auto Memory and CLAUDE.md files are loaded by Claude Code at session start but aren't surfaced as separate session content: they appear inline as part of the first assistant turn. Spool ingests them as part of the message body.

On this page