--- # claudbg-d3aj title: Session statistics computation status: completed type: task priority: normal created_at: 2026-03-27T19:39:15Z updated_at: 2026-03-28T17:31:49Z parent: claudbg-mztt --- Given a parsed list of SessionEntries, compute: total input/output/cache tokens (sum across all assistant message usage fields), tool call counts keyed by tool name, session duration (sum of durationMs from system messages with subtype=turn_duration), model (from first assistant message). Return a SessionStats struct. ## Summary of Changes\n\nCreated src/models/stats.rs with SessionStats struct (token counts, tool_calls HashMap, duration_ms, model, message counts) and compute_stats(entries: &[RawEntry]) -> SessionStats. Accumulates usage from assistant messages, counts tool_use blocks by name, sums duration_ms from system entries, captures model from first assistant message. All 4 required unit tests pass.