Build1 distinct publisher3 min readUpdated
An independent recount of six usage trackers found gaps of 2.00x to 8.09x. The bigger problem is that none of them, and no invoice, can say which number was right.
The Engineer · Build desk

Compiled by The EngineerSomething wrong?How this is made
A developer publishing on dev.to spent five months pulling apart the folding logic in six token usage trackers and recomputing each one with an independent implementation [1]. The totals disagree by 2.00x to 8.09x, in both directions [2], and the second finding is the one that should worry anyone running a cost or context-budget dashboard: none of these tools knows whether its own number is right, because there is nothing to check it against [4]. The audit did not begin as a bug hunt. According to the author, they were reading their own session logs with two tools and noticed the totals did not match; a rounding-sized gap would have been written off, but this was close to double [7]. The failure modes are structural rather than sloppy. First, streaming double counting: a streaming response emits a usage chunk and then assembles a complete message when the request finishes, both carrying the same usage, so summing everything you see yields exactly 2x [11]. On the deepseek-harness corpus, naive folding came out at 2.000000x of the official projection, with two provider routes computed separately agreeing to six decimal places [12]. The same hole wears different clothes as per-content-block counting: claude-code-templates, at 30,276 stars, measured 2.36x [13], and Clawdmeter measured 2.34x to 2.37x before its author shipped v3.0.1 on 2026-08-08 under the release title "token counts corrected (~2.5x lower)" [14]. That release also noted that the percentage progress bar was never affected, because it reads Anthropic's rate-limit header rather than the folded total [15]. Second, session forks. A child session's log file physically contains the parent's full prefix, so any aggregation that walks every session file and sums counts that prefix twice [16]. The two forks the author caught were inflated 5.18x and 23.05x, and the ratio gets worse the later the fork point, because the inherited prefix grows while the child's own contribution shrinks [17]. The correct test is seq >= seedLength; checking origin === 'subagent' alone misses ordinary user-created forks, which inherit a prefix too [18]. Third, compaction, which fails in the other direction. Context compaction is a real model call and the provider reports usage for it, but it is not a loop step, so it produces neither an assistant chunk nor an assistant message, and folding logic that matches only those two event types never sees it [19]. Measured: three compaction events, 48,895 tokens, none counted [20], an average of roughly 16,300 tokens per event missing from the ledger [23]. The largest summarize call reported 44,444 tokens, 41,472 of them cache reads, to replace a history range of 19,962 tokens [21], about 2.2x the tokens it removed [24]. Compaction fires most often on long sessions, which are exactly the sessions where the number matters [22]. None of this would be more than a patch queue if there were an invoice to reconcile against. For subscription users there is not: the fee is flat, so Anthropic never sends a per-token bill [9], and Claude Code's own dollar figure carries a docs warning that usage for Max and Pro subscribers is included in the subscription and so is not relevant for billing purposes [10]. Where a gap is large enough to see, it does close fast. In tokscale issue #76, johnpyp reported a near-2x difference against ccusage; maintainer junhoyeo labelled it a bug within twenty minutes and closed it within five hours, tracing the cause to Claude Code upstream duplicating session history under stream-json rather than to tokscale [8]. Ten fixes have landed across five repositories so far [3]. The author is upfront that two still-open items are their own filings: tokscale issue #1011, filed July 2026 and still open and unlabelled as of Aug 18 [5], and claude-code-templates PR #754, still unmerged as of Aug 18 [6]. That is a fair disclosure and it lowers the temperature: "not fixed" here means "not yet picked up", not disputed.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
Over five months the author took apart the folding logic in six token usage trackers and recomputed each one with an independent implementation.
The trackers do not agree; the gaps run from 2.00x to 8.09x, in both directions.
None of the audited tools knows whether its own number is right; there is nothing for them to check against.
In tokscale issue #76, johnpyp reported tokscale and ccusage differing by close to 2x; maintainer junhoyeo labelled it a bug within twenty minutes, closed it within five hours, and traced the root cause to Claude Code upstream duplicating session history under stream-json (anthropics/claude-code#5034), not a tokscale bug.
On the deepseek-harness corpus, naive folding came out at 2.000000x of the official projection, with two provider routes computed separately agreeing to six decimal places.
claude-code-templates (30,276 stars) counts once per content block and measured 2.36x.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Detailed but single-observer
The material is unusually specific for a single-source cluster: named repositories, issue and PR numbers, dated releases, exact multipliers, and a documented vendor caveat. One measurement is anchored to an external reference (2.000000x of a provider's official projection on two routes). Against that, the whole cluster rests on one dev.to post by the auditor; the independent implementation and corpora are not published, several figures (fork inflation, compaction totals) are single observations from private session logs, and the top-of-range 8.09x claim rests on an issue the author himself says is unconfirmed. Mechanism-level claims are well evidenced; magnitude-level claims are only partially so.
Partial remediation, wide exposure
There is concrete uptake evidence: ten fixes landed across five repositories, Clawdmeter shipped a dated corrective release (v3.0.1) that openly announced ~2.5x lower counts, and tokscale issue #76 was triaged and closed within five hours with the root cause pushed upstream to Claude Code. Offsetting that, the highest-exposure case remains unpatched (claude-code-templates at 30,276 stars with PR #754 unmerged) and tokscale #1011 sits open and unlabelled, so the corrective wave is real but incomplete and concentrated in the projects whose maintainers engaged.
Slightly overstated at the range's top end
The headline range '2x to 8x' is technically drawn from the reported measurements, but its upper bound comes from the one finding the author says is unconfirmed and asks readers to discount, and the most dramatic figure in the body (23.05x on a fork) sits outside the headline entirely. That is a mild upward stretch. It is largely offset by unusual restraint elsewhere: explicit disclosure that two findings are the author's own unaccepted submissions, refusal to attach a multiplier to the fifth bucket, credit to a project that fixed its bug, and clarification that a near-2x case was an upstream defect rather than a tracker bug. Net effect is close to aligned with a small positive tilt.
Disclosed practitioner stake
The author is not a neutral observer: two of the five findings are his own pending submissions, and a merged PR or labelled issue is a reputational outcome he benefits from, while a widely read audit post creates pressure toward acceptance. He discloses this explicitly, says 'not fixed' means 'I filed it and it hasn't been picked up', and asks readers to discount the unconfirmed item. No vendor sponsorship, commercial product, or competing tracker of his own is disclosed in the supplied material, and no Anthropic or maintainer statement is present to weigh against. Incentive pressure is therefore present, self-disclosed, and moderate.
Moderate
Confidence is limited chiefly by cluster structure: one publisher, one item, one observer, no maintainer or vendor response, and no published reproduction path. Within those limits the internal consistency is high (mechanisms explain the observed multipliers, three independent codebases exhibit the same duplication pattern, and one figure matches an external provider projection to six decimals), and the author's explicit demarcation of confirmed versus unconfirmed findings makes the reliable subset identifiable. Mechanism claims can be relied on with moderate confidence; specific magnitudes should be treated as indicative pending independent recount.
product
A 2x LLM bill is not a bug report: token spend is an observability problem1 distinct publisher
build
Your Multi-Key Failover Is The Most Expensive Line On Your Coding Agent Bill1 distinct publisher
build
The $559M-versus-$12.3B quarter matters more than the $65B run rate4 distinct publishers
build
A 12MB Go binary bets agent cost control is cache stickiness, not a dashboard1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 18, 2026