Expand description
Claude Code transcript parsing.
Reads a JSONL session
transcript and extracts ordered ToolInvocations (matching tool_result
blocks back to their tool_use by id), plus a TranscriptSummary with
deduped token totals, wall-clock duration, and the final assistant text.
Also resolves subagent transcripts by their .meta.json description.
Structs§
- Subagent
Entry - A discovered subagent transcript and its metadata sidecar.
- Subagent
Meta - Metadata sidecar (
<base>.meta.json) written alongside a subagent transcript. - Transcript
Summary - A transcript boiled down to the artifacts the pipeline needs.
Functions§
- find_
by_ description - Find the subagent whose meta
descriptionmatches. On duplicates (a retry within the same run), returns the most-recently-written transcript. - list_
subagents - List subagent transcripts (each a
<base>.meta.jsonwith a sibling<base>.jsonl) undersubagents_dir. Returns[]if the dir is missing. - parse_
transcript - Parse the transcript at
jsonl_pathinto ordered tool invocations. - parse_
transcript_ full - Parse the transcript into a full
TranscriptSummary.