HaiAI123

Curated Global AI Tools Directory

NewIndustry update
New

Summing Claude Code JSONL per line double-counts token usage

10/19/2026 — 10/19, 19:19·1 sources (all)·1 reports (all)

Key takeaways

  • Claude Code stores each session as JSONL, and a single API response can span multiple lines that each carry a full usage object, so summing…

Background & analysis

On October 19, 2026, a DEV Community post reported that summing Claude Code usage line by line roughly doubles the token count. According to the article, Claude Code stores each session as JSONL, and a single API response may be written across multiple lines, with every line carrying the full usage object for that response. Adding up the lines therefore counts the same tokens more than once. The author cites a session from August 2026 in issue #87303: summing cache_creation_input_tokens line by line gives 1,075,420, while deduplicating by message.id gives 560,751, an overcount of about 1.92x. The post notes that Anthropic closed the issue as "documented behavior." That is where the matter currently stands, and the source material contains no further developments.

AI-generated from 1 reports · updated 4 hours ago

Latest turnClaude Code stores each session as JSONL, and one API response can span several lines that each carry the full usage object, so summing lines counts the same tokens again. In an August 2026 session cited from issue #87303, cache_creation_input_tokens summed to 1,075,420 versus 560,751 after deduplicating by message.id. Anthropic closed the issue as documented behaviour.

Related AI tools

24-hour heatHeat index 89 · peak 97 · 3h ago
24 hours agonow

Reports on this story headlines open the original

Today
  1. Claude Code stores each session as JSONL, and one API response can span several lines that each carry the full usage object, so summing lines counts the same tokens again. In an August 2026 session cited from issue #87303, cache_creation_input_tokens summed to 1,075,420 versus 560,751 after deduplicating by message.id. Anthropic closed the issue as documented behaviour.

    DEV Community · AIAI score 61

Other stories people are talking about

How is heat calculated?About the method

Heat counts how many independent sources covered a story in the last 48 hours: one source counts once no matter how many posts it published, decaying with a 24-hour half-life. What ranks first is what many people are talking about.

This page aggregates public feeds. Headlines and summaries are machine-organized and remain the property of the original authors; verify important facts at the source. If you believe a headline or summary infringes your rights, email the contact address in the footer with the page URL and basis of your claim, and we will remove or replace it after review.

Surge
Discussion rising fast
New
First report within 6 hours
Rising
Still gathering discussion

Back to AI industry updates →