# `ClaudeWrapper.History.SessionSummary`
[🔗](https://github.com/genagent/claude_wrapper_ex/blob/main/lib/claude_wrapper/history.ex#L20)

Summary of one session `.jsonl` file.

See `ClaudeWrapper.History` for how these are produced.

Two fields deserve a note:

  * `total_tokens` counts throughput -- fresh input, output, and cache
    *creation* -- and **excludes** cache-read tokens. Cache reads re-count
    context already tallied when it was first cached, so including them
    inflates a long session 10-100x and makes the figure track
    conversation length rather than work done. The raw per-turn usage is
    still available via `ClaudeWrapper.History.read_session/2`.
  * `total_cost_usd` is almost always `nil`: Claude Code does not persist
    per-message cost in its transcripts, only token usage.

# `t`

```elixir
@type t() :: %ClaudeWrapper.History.SessionSummary{
  first_timestamp: String.t() | nil,
  first_user_preview: String.t() | nil,
  last_timestamp: String.t() | nil,
  message_count: non_neg_integer(),
  project_slug: String.t(),
  session_id: String.t(),
  size_bytes: non_neg_integer(),
  title: String.t() | nil,
  total_cost_usd: float() | nil,
  total_tokens: non_neg_integer() | nil
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
