Where new context tokens (cache writes) came from. Categories describe what was added; the Main/Subagent split shows which agent caused it (subagents do reads, writes, and conversation too). Cost is the cache-write portion only — see the per-model table above for the full session cost. Total accounted: {{ "{:,}".format(cost_ctx.bloat_total_tokens) }} tokens / {{ cost_ctx.bloat_total_cost }} of cache writes.
| Category | Main agent | Subagent | Total | ||||
|---|---|---|---|---|---|---|---|
| Tokens | Cost | Tokens | Cost | Tokens | Cost | % | |
| {{ r.category }} | {{ "{:,}".format(r.main.tokens) }} | {{ r.main.cost }} | {{ "{:,}".format(r.subagent.tokens) }} | {{ r.subagent.cost }} | {{ "{:,}".format(r.total.tokens) }} | {{ r.total.cost }} | {{ "%.1f"|format(r.total.pct) }}% |
| Total | {{ "{:,}".format(cost_ctx.bloat_rollup_totals.main.tokens) }} | {{ cost_ctx.bloat_rollup_totals.main.cost }} | {{ "{:,}".format(cost_ctx.bloat_rollup_totals.subagent.tokens) }} | {{ cost_ctx.bloat_rollup_totals.subagent.cost }} | {{ "{:,}".format(cost_ctx.bloat_rollup_totals.total.tokens) }} | {{ cost_ctx.bloat_rollup_totals.total.cost }} | 100.0% |
| Bucket | Category | Agent | Tokens | Cache write cost | % of cache writes | Worst message |
|---|---|---|---|---|---|---|
| {{ b.bucket }} | {{ b.category }} | {{ b.agent }} | {{ "{:,}".format(b.tokens) }} | {{ b.cost }} | {{ "%.1f"|format(b.pct) }}% | {% if b.top_uuid %} {{ b.top_cost }} {% endif %} |
…and {{ cost_ctx.bloat_extra_count }} more buckets not shown.
{% endif %} {% else %}{% if cost_ctx.bloat_filter_active %}No cache writes in this range.{% else %}No bloat data — this session has no cache-creation tokens.{% endif %}
{% endif %}