How each source format maps to the minitrace schema during conversion
Each conversion subcommand uses an adapter that reads a native session format and maps it to the minitrace schema. This page documents what each adapter reads, what gets preserved, what gets synthesized, and what is lost.
Source: JSONL v2 transcripts in ~/.claude/projects/
Source format: claude-code-jsonl-v2 (main), claude-code-jsonl-v2+subagent (subagent)
Converter version: go-minitrace-claude-adapter-dev
Claude Code stores one JSONL file per session. Each line is a JSON event with a type field. The adapter processes:
Additionally, dir-v1 tool-results sessions (an older format that stores tool results in a directory structure) are detected and converted.
| Minitrace field | Source |
|---|---|
environment.model | Extracted from assistant message metadata |
environment.agent_framework | claude-code |
environment.platform_type | agent |
environment.provider_hint | anthropic |
environment.tools_enabled | Unique tool names from tool use blocks |
timing.* | Computed from message timestamps |
title | First 80 characters of the first human message |
turns[].thinking | Extracted from thinking blocks if present |
turns[].usage | Per-message token counts |
| Tool name | Operation type |
|---|---|
Read, Grep, Glob | READ |
Edit | MODIFY |
Write | NEW |
Bash | EXECUTE |
Agent | DELEGATE |
| Everything else | OTHER |
When a session directory contains a subagents/ subdirectory, each subagent JSONL file becomes its own minitrace session. The parent session's Agent tool call receives a spawned_agent field with the subagent's sub_session_id. The subagent session's title is prefixed with [subagent].
Claude Code now keeps additional raw metadata in minitrace without promoting it into shared schema fields:
operational_context.framework_config.entrypointturns[].framework_metadata:
entrypointslugparent_uuidis_sidechainstop_reasonstop_sequencecache_creationtool_calls[].framework_metadata:
callerentrypoint, slug, parent_uuid, is_sidechainSource: Session and exec JSONL files in ~/.codex/
Source format: codex-session-jsonl-v1 or similar
Converter version: go-minitrace-codex-adapter-dev
Codex stores sessions as JSONL files under ~/.codex/sessions/ and optionally logs exec operations as JSONL. The adapter processes:
codex exec --json outputunsupported Codex format hint: unknown-jsonl errorsCodex keeps richer raw metadata in the adapter-specific metadata/config fields:
operational_context.framework_config:
approval_policysandbox_policycollaboration_mode_detailtruncation_policyrate_limitssession_sourceoriginator, personality, reasoning_effort, timezoneturns[].framework_metadata:
turn_idphasememory_citationtool_calls[].framework_metadata:
codex_functionjustification (also promoted to input.justification)sourceparsed_cmdstdoutstderrstatusturn_idexit_code (also promoted to output.exit_code)Source: JSONL v3 session files in ~/.pi/agent/sessions/
Source format: pi-agent-jsonl-v3
Converter version: go-minitrace-pi-adapter-dev
Pi stores one JSONL file per session in workspace-named directories (e.g., --home-manuel-code-foo--/). Each line is a structured event. The adapter processes:
| Minitrace field | Source |
|---|---|
environment.model | From assistant message metadata |
environment.agent_framework | pi |
environment.tools_enabled | Unique tool names used in session |
turns[].usage | Token counts from usage events |
Pi tools are mapped similarly to Claude Code:
| Tool name | Operation type |
|---|---|
read, Read | READ |
edit, Edit | MODIFY |
write, Write | NEW |
bash, Bash | EXECUTE |
mcp tools | OTHER (unless name suggests read/write) |
Pi now preserves additional raw metadata alongside the normalized schema:
turns[].framework_metadata:
stop_reasonerror_messagetool_calls[].framework_metadata:
difffirst_changed_lineUse --source-session to convert one specific JSONL file without scanning the full directory:
go-minitrace convert pi --source-session /path/to/session.jsonl --output-dir ./output
Source: Privacy export ZIP from claude.ai
Source format: claude-ai-privacy-export-v1
Converter version: go-minitrace-claudeai-adapter-dev
The ZIP contains a JSON file with all conversations. Each conversation has an array of message objects. The adapter maps:
Use --uuid-filter to convert only specific conversations by UUID prefix:
go-minitrace convert claude-ai --source export.zip --uuid-filter abc123,def456
Source: Data export ZIP from ChatGPT
Source format: chatgpt-export-zip-v1
Converter version: go-minitrace-chatgpt-adapter-dev
The ZIP contains conversations.json with all conversations. The adapter processes the nested message tree structure that ChatGPT uses internally.
Source: Per-conversation JSON files
Source format: chatgpt-json-transcript-v1
Converter version: go-minitrace-chatgpt-adapter-dev
Each JSON file represents one conversation in a richer format than the standard export. The adapter extracts:
This format includes tool call details that the standard export ZIP does not provide.
Use --id-filter to convert specific conversations:
go-minitrace convert chatgpt-json --source-dir /tmp/exports --id-filter 69c7,69c8
Source: SQLite turns.db from Geppetto/Pinocchio
Source format: pinocchio-turns-sqlite-v1
Converter version: go-minitrace-turnsdb-adapter-dev
The turns.db SQLite database stores conversation snapshots rather than individual turns. Each row is a full snapshot of the conversation at a point in time. The adapter:
This snapshot-diffing approach is fundamentally different from the other adapters and is necessary because the database does not store individual turn events.
Use --conv-id to convert one specific conversation:
go-minitrace convert turnsdb --source /tmp/turns.db --conv-id 5cf06c5f-0460-485e-a7c5-92d56af826f9
All adapters use the same quality grading logic after conversion:
| Grade | Criteria |
|---|---|
| A | Has turns, has tool calls with output, >10 tool calls, >5 turns |
| B | Has turns (but doesn't meet A threshold) |
| C | No conversation turns |
go-minitrace help convert-commands — conversion command flags and usagego-minitrace help minitrace-schema — the target schema these adapters producego-minitrace help framework-metadata-mappings — detailed per-adapter metadata preservation tables