{
  "id": 129956,
  "title": "The vendor documents this bug. A 30k-star repo shipped it anyway.",
  "url": "https://urgent.news/2026/08/04/the-vendor-documents-this-bug-a-30k-star-repo-shipped-it-anyway",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-04T13:03:18.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/lizhuojunx86/the-vendor-documents-this-bug-a-30k-star-repo-shipped-it-anyway-27pb"
  },
  "original_language": "en",
  "account": null,
  "summary": "The Claude Code Templates repository, which has 30.1k stars and 3.3k forks, was found to be undercounting token usage by 2.35×. This issue was documented in Anthropic's own SDK, which includes a warning box and a reference implementation for the fix. Despite four separate mechanisms attempting to address the issue, no human has replied to the open fix for ten days. The bug was caused by the calculateRealTokenUsage() function summing message.usage over every parsed record, resulting in each assistant message being counted once per block. This led to downstream inflation of token usage figures, including conversation.tokens, summary.totalTokens, per-project rollups, and the Total Tokens figure on the analytics dashboard.",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}