The Honest LLM Bill — Join-Side Today, Tags at Capture

2026-09-05 · 2 min read

The honest LLM bill

Part 5 exported the data. Part 6 counts the money: pulse costs attributes spend per team two ways — a join-side CSV for teams with a session registry (zero capture change), and capture-side tags baked into traces at session start. Unmapped sessions land in an unmapped bucket, never silently dropped.


Join-side: the registry you already have

sessions.csv maps session_id → team. Two rows, matching two traces in the corpus:

uv run pulse costs --corpus corpus --join /tmp/sess.csv
team                 sessions  total_usd  by_task
research                    1     0.0225  chat:0.0225
unmapped                    8     0.0010  chat:0.0010
platform                    1     0.0000  chat:0.0010

The research row’s $0.0225 is the cost-unit-test sidecar’s cost_usd, joined through. The 8 sessions with no registry row aren’t dropped or zeroed — they’re unmapped, with their own total. An attribution tool that silently drops unknowns is a lying tool; the bucket is the honesty.

Capture-side: tags at session start

For teams without a registry, set tags once and forget:

UNROLL_SESSION_TAGS="team-a,feat-x" hermes chat

Unroll captures them onto the session and emits a SESSION_TAGS constant in the trace (HERMES_SESSION_TAGS also works as a legacy fallback). Pulse sidecars carry session_tags, and --group-by tag needs no CSV at all:

uv run pulse costs --corpus corpus --join /tmp/sess.csv --group-by tag
team                 sessions  total_usd  by_task
untagged                   10     0.0235  chat:0.0235

All untagged — correct, because the local corpus predates the tags feature. New sessions with tags set group by sorted tag set; multi-tag sessions count once, never double. (--group-by task is the third axis: cost per task type, no join file needed.)

The claim, kept small

“The first honest LLM bill” holds after the grouping key exists — join-side today, tags at capture for new sessions. Sums, per-task splits, sessions per group, and the unknowns bucketed in plain sight. That’s the whole invoice.

Next post: Quarantine Your Flaky Agent — replay N times, read the diverging steps.

Written from the workshop — every cent attributed, every unknown bucketed.