DeepSeek Harness Token Counting Has Four Measurable Bugs, Audit Finds
A developer auditing DeepSeek Harness, released on August 13, identified four token-counting bugs in the nine-day-old codebase through independent testing across two providers. The most consistent flaw causes every session's total token count to be exactly doubled, because each model call reports its usage twice — once as a stream chunk and once on the assembled message. Forked sessions compound the problem further, with one fork overstating its token use by 23 times because its log contains a full copy of the parent session's history. Additionally, 48,895 tokens spread across three compaction events went entirely uncounted, including by the official projection that most plugins rely on. The auditor noted that DeepSeek Harness does get its append-only log design right — a structural strength absent in several rival tools — but recommends fixing the compaction gap as the highest priority.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in