pub struct Turn {
pub request_id: Option<String>,
pub ts: Option<Timestamp>,
pub model: Option<String>,
pub usage: Usage,
pub cost_usd: Option<f64>,
pub sidechain: bool,
pub summary: Option<String>,
pub tools: Vec<String>,
pub has_thinking: bool,
pub thinking_chars: u64,
pub thinking_encrypted: bool,
}Expand description
One deduplicated API request in a session, enriched for display.
usage is the finalized per-request usage (post-dedup); cost_usd is None
when the model is unpriced (§8.7 — never guessed). summary/tools are
display-only and may be empty without affecting the numbers.
Fields§
§request_id: Option<String>§ts: Option<Timestamp>§model: Option<String>§usage: Usage§cost_usd: Option<f64>USD cost of this request, or None when the model is unpriced.
sidechain: boolThe request came from a sub-agent (sidechain) transcript folded into this session (§8.3).
summary: Option<String>Short visible-text snippet for display (first non-empty across the request’s lines), when available.
tools: Vec<String>Tool names invoked in this request, in first-seen order (deduplicated).
has_thinking: boolThinking blocks were present (measurable or encrypted).
thinking_chars: u64Visible thinking chars in this request — already inside usage.output
(Claude Code), surfaced for attribution, never billed again (§8.2).
thinking_encrypted: boolThinking present but encrypted/unmeasurable: the thinking share of output is unknown (absence ≠ zero, §8.5).