🪙 Logs Are Gold
Before measuring anything, you need to know where the gold is buried. This path maps where Claude Code conversations live, dissects the anatomy of a JSONL session, and separates the bloat of the gold.
Track map
Detailed content
📂 Where Conversations Live and the Anatomy of a Session
The disk, the JSONL format, the anatomy of an event, and the field that distinguishes the models.
Each session is one file ~/.claude/projects/<projeto>/<sessão>.jsonl; there are thousands in total.
It's the raw source of everything. Knowing the path is the first step to mining.
One file per session; one folder per project; no database.
It's not a single JSON: each line is an independent JSON object, appended as the conversation progresses.
You read line by line without loading the entire file—and parsing becomes trivial.
Append-only; one line = one event; resilient to interruptions.
Fields like type, message, timestamp, uuid, cwd, gitBranch.
Knowing what each field contains lets you filter, group, and measure.
type ∈ user/assistant/system/summary; timestamp determines order; cwd/gitBranch provide context.
The assistant speaks in blocks: text, thinking, tool_use, tool_result. Claude Code records EACH block on a separate LINE.
It’s the detail that changes everything in the count: “per line” dilutes the signal, so we group by turn.
One physical turn = one line = one block; multiple blocks make up one logical turn.
The field that says which model wrote each turn: claude-fable-5, claude-opus-4-8, claude-haiku-4-5...
It’s what lets you filter by model and separate each model’s corpus.
Only assistant events have a model; it’s the key to comparing Fable vs. Opus.
Physical turn = one line. Logical turn = 1 human prompt up to the next human prompt (everything in between).
Measuring by line dilutes the signal; the logical turn is the unit that reveals the work pace.
Group by human prompt; count the presence of thinking and tool_use per logical turn.
⛏️ Fluff vs. Gold — and the Myth of Mineable Reasoning
What to discard, what to keep, why literal thought isn’t there, and the ethics of the corpus.
tool_result echoed, full file dumps, command output, attachment blobs (base64), harness accounting (usage, sidechain, isMeta).
It’s most of the file’s size—and almost none of the behavioral signal.
Fluff = echoed output + opaque bytes; discard it without losing the pace.
Your prompts, the assistant’s text, the PRESENCE of reasoning, the sequence of tool_use and the timestamps.
It’s what reveals how each model works—the material for the playbook.
Gold = decisions + action order + cadence, not output bytes.
The thinking comes EMPTY/encrypted in the logs (only the signature). You don't mine literal thoughts.
It’s the course’s honest differentiator: you measure the presence and pace of reasoning, not its content.
Presence ≠ content; signature proves that reasoning occurred without revealing it.
Reasoning presence + tool cadence + action order reveal a model’s work “rhythm.”
That exact pace becomes an injectable playbook rule.
Pace = think before acting + tool density + read before editing.
Debloating reduces a typical session by about 74%—most of it is bloat.
Sets expectations: the signal fits in a small, readable file.
−74% typical; the remaining gold is what you analyze.
The logs contain YOUR code and data; treat the corpus as sensitive and redact it before sharing.
Mining is no excuse to leak secrets; the corpus may contain keys and paths.
Treat it as personal data; redact secrets; the value is in the rhythm, not the data.