Dev.to
8/4/2026

The vendor documents this bug. A 30k-star repo shipped it anyway.
Short summary
A detailed bug report on claude-code-templates (30k+ stars) where token analytics over-counted usage by 2.35× because each assistant message's usage object was summed once per JSONL content-block record instead of once per distinct message ID. Anthropic's own SDK documentation warns about this exact pattern and ships a reference fix. The author provides a one-assertion diagnostic and notes the PR has been approved only by AI reviewers with no human response in ten days.
- •claude-code-templates inflated token counts 2.35× by summing usage per JSONL record instead of per distinct message ID
- •Anthropic's SDK docs explicitly warn about this duplication pattern and provide a seenIds deduplication reference
- •The fix PR has been open for 10 days with only AI reviewer approvals and zero human engagement
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



