{% if not cost_ctx.has_data %}

No assistant messages yet — nothing to cost.

{% else %}

Estimated cost: {{ cost_ctx.total_cost }}

Prices are 2026-04-21 list rates per Anthropic's pricing page. Synthetic / unknown models bill as $0.

Per-model breakdown

{% for m in cost_ctx.per_model %} {% endfor %}
Model Messages Input Output Cache read Cache write 5m Cache write 1h Cost
{{ m.model }} {{ "{:,}".format(m.messages) }} {{ "{:,}".format(m.input) }} {{ "{:,}".format(m.output) }} {{ "{:,}".format(m.cache_read) }} {{ "{:,}".format(m.cache_creation_5m) }} {{ "{:,}".format(m.cache_creation_1h) }} {{ m.cost }}

Cumulative cost over time

{% if cost_ctx.chart_error %}
Chart unavailable. Per-model breakdown and bloat tables below are still computed.
Details
{{ cost_ctx.chart_error }}
{% elif cost_ctx.chart.messages %}

Drag to box-select a range or click a marker to filter the bloat tables below. Toggle which series are visible with the buttons.

{{ cost_ctx.chart.messages }} messages{% if cost_ctx.chart.points != cost_ctx.chart.messages %} (bucketed to {{ cost_ctx.chart.points }} points, {{ cost_ctx.chart.bucket_size }} per bucket — selection rounds to bucket edges){% endif %}

{% else %}

No cost data to chart.

{% endif %}
{% if cost_ctx.chart.invocation_summary %}

Subagent invocations by cost

One row per Task/Agent call, ranked by cost. The top {{ cost_ctx.chart.invocation_summary | length if cost_ctx.chart.invocation_summary | length < 12 else 12 }} also appear as individual lines in the chart's By invocation view — outliers here are the "bad apples" to investigate.

{% for inv in cost_ctx.chart.invocation_summary %} {% endfor %}
# Subagent type Messages Cost
{{ inv.rank }} {% if inv.first_uuid %} {{ inv.subagent_type }} {% else %} {{ inv.subagent_type }} {% endif %} {{ "{:,}".format(inv.messages) }} {{ inv.cost }}
{% endif %} {% include "_session_cost_bloat.html" %} {% endif %}