Custom agent name set via /rename or swarm configuration.
Agent preset name used for this session (from --agent CLI flag or settings.agent).
Displayed as @<agentSetting> in the Claude Code session list.
AI-generated title. Fallback after customTitle.
API duration in milliseconds — sum of system/turn_duration.durationMs events.
The time Claude spent processing requests, excluding user idle time.
Always less than ParsedSession.durationMs (wall-clock).
Number of unique assistant API calls.
Stricter than CC's raw count: deduplicated on messageId+requestId (so /resume
replays of previous assistant entries are counted once) and excludes <synthetic>
sentinel messages (compact summaries injected internally by CC).
Like CC's own metric, includes subagent assistant turns — there is no isSidechain
filter on the assistant side, mirroring the asymmetry with ParsedSession.userMessageCount.
Characters written by Claude per file path, from the last attribution-snapshot entry.
Last-wins — CC never shrinks fileStates, so the final snapshot holds cumulative totals.
undefined when the session has no attribution-snapshot events.
Note: attribution-snapshot is gated behind CC's internal COMMIT_ATTRIBUTION
feature flag and is not emitted by public CC builds. This field will be undefined
for all users of the public CC release.
Mirrors CC commitAttribution.ts restore logic: only the last snapshot is used,
never summed across snapshots (which would cause quadratic count inflation).
Per-turn token snapshots, ordered chronologically. Useful for rendering context window fill over time.
User-defined title set via /title. Wins over all other title sources.
Wall-clock duration in milliseconds (lastTimestamp - firstTimestamp).
First meaningful user prompt, extracted with CC-exact logic
(mirrors extractFirstPromptFromHead from sessionStoragePortable.ts):
<bash-input>cmd</bash-input> → ! cmd<tag>), [Request interrupted...], tool results,
isMeta, isCompactSummary, and subagent turns…<command-name> value (e.g. /voice → "voice")ISO timestamp of the first entry.
Git branch at session end (last-wins, mirrors Claude Code convention).
Human user message count per local hour of day [0..23].
Mirrors insights.ts in Claude Code — tracks when the user actively typed,
not when the model responded. Useful for "when do you work" heatmaps.
Context window fill at session end: input + cacheRead + cacheCreation of the last
deduplicated assistant turn. output is excluded because it is not part of the prompt
sent to the model — it represents what you'd resume from if you called /resume now.
0 if the session has no assistant turns with token data.
Model used in the last assistant turn.
CC uses the sentinel string '<synthetic>' for internally-injected messages
(e.g. compact summaries) — those are excluded here.
Last user prompt captured by Claude Code at session end.
ISO timestamp of the last entry.
Session mode: 'coordinator' when orchestrating subagents, 'normal' otherwise.
Permission level active for the session (from permission-mode events).
Observed values: 'default', 'acceptEdits', 'plan'. Not exhaustive —
CC may emit additional values in future versions.
Most-used model by turn count (statistical mode). Excludes '<synthetic>' sentinel.
Differs from lastModel when the user switched models mid-session.
Tie-breaking is insertion-order dependent (first model with the highest count wins).
GitHub PR number linked to this session.
Repository in owner/repo form.
Full PR URL as written by Claude Code. Never reconstructed from prRepository.
Session UUID. undefined if the file is empty or contains no entry with a sessionId field.
Skill invocation counts keyed by skill name.
Skills are Claude Code slash-command extensions invoked via the Skill tool
(e.g. ultrareview, voice). Keyed by input.skill from the tool_use block.
Most recent auto-compact summary injected when CC compressed the context. Last-wins — a session can have multiple compaction events.
User-defined tag label attached to the session.
Most recent periodic fork summary written every min(5 steps, 2 min).
Mirrors what claude ps shows as the current task description.
Cumulative token usage for the session.
Deduplicated on messageId+requestId — /resume replays are counted once.
Token usage broken down by model key.
Key format: <model> normally, <model>-fast when usage.speed === "fast" (Claude Code fast mode).
Tool invocation counts keyed by tool name (e.g. Read, Bash, Edit).
Deduplicated on tool_use.id — streaming entries sharing the same call counted once.
Skill invocations (Claude Code slash-command extensions) are tracked in skillUsage instead.
Number of human user messages in the main transcript.
Stricter than CC's userMessageCount (which only filters tool-result-only entries
via isHumanMessage): also excludes isMeta, isCompactSummary, and subagent turns
(isSidechain && agentId !== undefined). The intent is "actual user typing in the
main thread", not "every user-typed entry CC writes to disk".
Git branch of the worktree when the session ran inside claude --worktree.
undefined when no worktree event was seen, or after a worktree-exit event
(mirrors worktreePath semantics: both reset to undefined / null on exit).
Worktree path if the session ran inside a claude --worktree.
null = a worktree-exit event was seen (user left the worktree).
undefined = no worktree event at all in this session.
Aggregated data extracted from a Claude Code session.