v2.4.4 — token-throughput display + metric-correctness fixes#5
Merged
Conversation
…nubar/HTML/CLI Token counts now reflect real throughput (input + output + cache read + cache write) instead of input+output-only -- on cache-heavy agentic runs the old figure was ~2-5% of actual usage while cost billed all four buckets, so cost-per-"token" looked absurd and a 1.1M-token workflow read as ~57K. Applied across the macOS menubar, Windows app, GNOME extension, and HTML report; cache volume is forwarded in the menubar payload (current.cacheReadTokens/cacheWriteTokens). Also a sweep of metric-correctness fixes: - cache-hit rate uses one denominator everywhere (input+cacheRead+cacheWrite) - trend "% vs prior" tracks the token metric when tokens are shown - "1-shot" rate exposes its sample size; "Yesterday" distinguishes 0 from no-data - Last 7/30 Days ranges span 7/30 calendar days, not 8/31 - forecast projects from completed days only; week-over-week uses equal windows - leverage is period-normalized; zero-paid 999x sentinel removed - retry detection counts re-edits after any intervening check (not just Bash) - claude-opus-4-8 pricing added to the bundled snapshot (offline fallback) - hero token up/down split follows the in-up / out-down convention 788 tests pass (incl. 6 new retry-detection tests); macOS Swift + Windows React + GNOME all build/typecheck clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The menubar/HTML/CLI reported token usage as
input + outputonly, while cost billed all four token buckets. On cache-heavy agentic runs that made the headline "tok" ~2–5% of real throughput (a ~1.1M-token workflow read as ~57K) and cost-per-"token" look absurd. This release puts the token figure on the same basis cost already uses — total throughput = input + output + cache read + cache write — and fixes a sweep of related metric-correctness issues. Bumps version to 2.4.4.Token display (core fix)
current.cacheReadTokens/cacheWriteTokens).effectiveTokensproxy weights cache-write at 1.25× (was 1×).Metric-correctness
input + cacheRead + cacheWrite); menubar/HTML previously dropped cache writes and disagreed with the TUI.0/1) instead of a bare "100%" over a hidden denominator of 1.Last 7 Days/Last 30 Daysspan 7 / 30 calendar days, not 8 / 31.Forecast / leverage / retry
999×sentinel removed; HTML banner names the actual window.Pricing
claude-opus-4-8added toMANUAL_ENTRIES($5/$25per M) so offline builds don't fall back to the legacyclaude-opus-4rate ($15/$75) and overstate Opus spend ~2.6×.Not included
Verification