TraceRecord
The top-level record. One per JSONL line, one per agent session.
Identification
| Field | Type | Required | Description |
|---|---|---|---|
schema_version | string | yes | Schema version, e.g. "0.2.0" |
trace_id | string (UUID) | yes | Unique identifier for this trace |
session_id | string | yes | Agent session reference |
content_hash | string | no | SHA-256 of the serialized record, populated when written |
execution_context | string | no | "devtime" (code-editing agent) or "runtime" (action-trajectory / RL agent). Null for pre-0.2 traces. |
Timestamps
| Field | Type | Required | Description |
|---|---|---|---|
timestamp_start | string (ISO8601) | no | Session start time |
timestamp_end | string (ISO8601) | no | Session end time |
Task
{
"task": {
"description": "Fix the failing test in src/parser.ts",
"source": "user_prompt",
"repository": "owner/repo",
"base_commit": "abc123def456..."
}
}
Agent
{
"agent": {
"name": "claude-code",
"version": "1.0.83",
"model": "anthropic/claude-sonnet-4-20250514"
}
}
Model identifiers follow the provider/model-name convention.
Environment
{
"environment": {
"os": "darwin",
"shell": "zsh",
"vcs": {
"type": "git",
"base_commit": "abc123...",
"branch": "main",
"diff": "unified diff string or null"
},
"language_ecosystem": ["typescript", "python"]
}
}
System Prompts
Deduplicated into a top-level lookup table. Steps reference prompts by hash.
{
"system_prompts": {
"sp_a1b2c3": "You are Claude Code..."
}
}
Tool Definitions
The session-level tool schema list.
Dependencies
Package names referenced during the session. Extracted from manifest files or tool calls.
{
"dependencies": ["stripe", "prisma", "next"]
}
Metrics
{
"metrics": {
"total_steps": 42,
"total_input_tokens": 1800000,
"total_output_tokens": 34000,
"total_duration_s": 780,
"cache_hit_rate": 0.92,
"estimated_cost_usd": 2.4
}
}
Security
{
"security": {
"scanned": true,
"flags_reviewed": 3,
"redactions_applied": 1,
"classifier_version": "0.1.0"
}
}
Metadata
Open-ended object for future extensions.
Notes
content_hashis filled in when the record is serialized withto_jsonl_line()task,environment,steps, and the nested blocks all have defaults in the Python modelsecurity.scannedconfirms the security pipeline (scan, redact, classify) was applied