pub struct Event {Show 14 fields
pub kind: EventKind,
pub ts: Option<Timestamp>,
pub request_id: Option<String>,
pub model: Option<String>,
pub usage: Option<Usage>,
pub tool_calls: Vec<ToolCall>,
pub sidechain: bool,
pub content_summary: Option<String>,
pub content_chars: u64,
pub thinking_chars: u64,
pub has_thinking: bool,
pub tool_use_id: Option<String>,
pub attachment_kind: Option<String>,
pub item_count: u64,
}Expand description
One line/turn of a session.
Fields§
§kind: EventKind§ts: Option<Timestamp>§request_id: Option<String>API request id. SEVERAL events may share one request id (one line per content block) — accounting MUST dedup on it first (CLAUDE.md §8.1).
model: Option<String>§usage: Option<Usage>§tool_calls: Vec<ToolCall>§sidechain: boolTrue when the event belongs to a sub-agent (sidechain) transcript.
content_summary: Option<String>Short display-only snippet of visible text.
content_chars: u64Approximate chars of generated content (text + thinking + tool-call JSON). Heuristic input for thinking attribution / context estimation — never billed.
thinking_chars: u64Chars of extended-thinking text in this event — a SUBSET of content_chars
(0 when none, or when the thinking block was encrypted and thus
unmeasurable). Lets context attribution separate thinking from text.
has_thinking: boolThe event carried thinking blocks (possibly encrypted/redacted, i.e. with no measurable text).
tool_use_id: Option<String>For a ToolResult event: the tool_use_id it answers. Lets the result’s
bytes be attributed back to the tool / MCP server that produced them
(the matching ToolCall carries the same id in ToolCall::id).
attachment_kind: Option<String>For an Attachment event: its category — e.g. "deferred_tools_delta",
"skill_listing", "mcp_instructions_delta", "task_reminder".
item_count: u64For an Attachment event: how many named items it added to the window
(deferred tools, skills, MCP servers). 0 elsewhere.