{% extends "base.html" %} {% block title %}Usage · relaybay{% endblock %} {% block crumbs %}/Usage{% endblock %} {%- macro numbers(total) -%} {{ "{:,}".format(total.tokens) }} {{ "{:,}".format(total.input) }} {{ "{:,}".format(total.output) }} {{ "{:,}".format(total.cache_read) }} {{ "{:,}".format(total.cache_write) }} {{ "{:,}".format(total.messages) }} {%- endmacro %} {%- macro headers() -%} TokensInputOutputCache readCache writeMessages {%- endmacro %} {%- macro summary(title, label, items) %}
{{ title }} ({{ items|length }})
{{ headers() }}{% for name, total in items %}{{ numbers(total) }}{% endfor %}
{{ label }}
{{ name }}
{%- endmacro %} {% block content %}

Usage

{% if message %}

{{ message }}

{% endif %} {% if error %}{% endif %}

Tokens read from the Claude Code transcripts the hooks report. relaybay knows neither prices nor quotas. Subagents count to their session. "unknown" means the data does not say.

{% if not usage_enabled %}

Reading is off (usage_enabled = false): this is what was read before.

{% endif %} {% if report.unknown_lines %}

{{ "{:,}".format(report.unknown_lines) }} transcript line(s) were not understood and are not counted.

{% endif %} {% if report.capped_files %}

{{ report.capped_files }} subagent transcript(s) over the limit per session are not counted.

{% endif %} {% if report.unread_files %}

{{ report.unread_files }} transcript file(s) could not be read at the last pass.

{% endif %}

Budgets

Tokens as in the total above, cache reads included. The day is the UTC day. A budget warns at 80% and at 100%; only one set to Stop agents stops them, at their next tool call, and only you release that. Budgets lag: they are checked after each read of the transcripts, at least once a minute. A session on several tasks counts in full on each; a task counts from the moment a session was bound to it, from version 0.8 on.

{% if not usage_enabled %}

Budgets are blind: reading is off (usage_enabled = false), so no new tokens count against them.

{% endif %} {% include "_budgets.html" %}
{% if not report.rows %}

No usage for this filter.

Usage appears after the Claude Code hooks of a session report its transcript ({{ report.files }} file(s) tracked so far); the reader looks at them in the background.

{% else %}
Tokens per {{ report.group }} · most in one {{ report.group }}: {{ "{:,}".format(chart.top) }}
{% for bar in chart.bars %} {{ bar.title }} {% if bar.height %}{% endif %} {% endfor %}
{{ chart.first }}{{ chart.last }}
{{ summary("By project", "Project", report.by_project) }} {{ summary("By session", "Session", report.by_session) }} {{ summary("By model", "Model", report.by_model) }}
{{ headers() }} {% for row in shown_rows %} {{ numbers(row.total) }} {% endfor %} {{ numbers(report.total) }}
{{ "Day" if report.group == "day" else "Week of" }}SessionProjectModel
{{ row.period }} {% if row.session_id is not none %}{{ row.session }}{% else %}{{ row.session }}{% endif %} {{ row.project }} {{ row.model }}
Total
{% if report.rows|length > shown_rows|length %}

Showing the newest {{ shown_rows|length }} of {{ report.rows|length }} rows; the total counts them all. Narrow the filter to see the rest.

{% endif %} {% endif %}
{% endblock %}