Version: bmad-loop 0.8.1 · Component: run summary / session-end events
Reproduction: run 20260709-172451-0187
Problem
Token accounting uses two different units and labels neither:
- The ATTENTION run summary reported
716,043,403 tokens — raw, with cache reads at full weight.
- The budget machinery uses weighted tokens (
cache_read_weight = 0.1), by which the same run cost ~110M — a 6.5× discrepancy.
- Session-end events carry raw only, so the weighted figure cannot even be reconstructed per session after the fact.
Every cost judgment an operator makes from the summary figure is inflated ~6.5× against actual billing.
Proposed fix
Add a weighted field to session-end events, and lead run summaries with it:
~110M weighted tokens (716M raw incl. cache reads)
Version: bmad-loop 0.8.1 · Component: run summary / session-end events
Reproduction: run
20260709-172451-0187Problem
Token accounting uses two different units and labels neither:
716,043,403 tokens— raw, with cache reads at full weight.cache_read_weight = 0.1), by which the same run cost ~110M — a 6.5× discrepancy.Every cost judgment an operator makes from the summary figure is inflated ~6.5× against actual billing.
Proposed fix
Add a
weightedfield to session-end events, and lead run summaries with it: