Part of batch #423
What to build
The per-batch token report gets two figures wrong.
Sonnet 5.5 is unpriced. The price table has claude-sonnet-5 but not claude-sonnet-5-5, so Sonnet 5.5 usage shows up as "unpriced" and is left out of the total. PR #419 had to price it by hand (batch #417 Decision 6). Add a claude-sonnet-5-5 entry with all five rates, read from the pricing page named in the table's source on the day of the change, and update retrieved to that date.
Output tokens are estimated for everyone. The report estimates each agent's output as visible characters divided by 4. That leaves out thinking tokens and undercounts. The lead's own transcript carries the real usage.output_tokens (values in the hundreds to thousands per turn). Subagent transcripts carry only streaming placeholders (single digits to low tens), as batch #417 Decision 3 found. Use the real count for the lead's rows and keep the estimate for subagent rows. Each row, and the report notes, say which figure is measured and which is estimated.
Acceptance criteria
Non-goals
- Re-pricing past batch reports.
- Changing how wall-clock time is worked out.
- Adding prices for models the policy doesn't pin.
- Any other way of recovering subagent thinking tokens.
Part of batch #423
What to build
The per-batch token report gets two figures wrong.
Sonnet 5.5 is unpriced. The price table has
claude-sonnet-5but notclaude-sonnet-5-5, so Sonnet 5.5 usage shows up as "unpriced" and is left out of the total. PR #419 had to price it by hand (batch #417 Decision 6). Add aclaude-sonnet-5-5entry with all five rates, read from the pricing page named in the table'ssourceon the day of the change, and updateretrievedto that date.Output tokens are estimated for everyone. The report estimates each agent's output as visible characters divided by 4. That leaves out thinking tokens and undercounts. The lead's own transcript carries the real
usage.output_tokens(values in the hundreds to thousands per turn). Subagent transcripts carry only streaming placeholders (single digits to low tens), as batch #417 Decision 3 found. Use the real count for the lead's rows and keep the estimate for subagent rows. Each row, and the report notes, say which figure is measured and which is estimated.Acceptance criteria
claude-sonnet-5-5entry with all five rates, taken from the source URL, andretrievedis set to the check date.output_tokens, subagent rows keep the characters-divided-by-4 estimate, and a fixture test covers both.npm testpasses, and theversionin.claude/.claude-plugin/plugin.jsonis bumped.Non-goals