Urgent.News

What's breaking now, across thousands of outlets.

Tech

I Audited Ten Million Free Tokens. The Ledger Drifted First.

I Audited Ten Million Free Tokens. The Ledger Drifted First. My free allowance didn't evaporate because a model was slow. It evaporated — inside the simulation I built to check it — because my retry wrapper paid for the same prompt twice while my streaming parser paid for the answer zero times. Two bugs, opposite signs, almost cancelling. That's the dangerous case, isn't it? A near-cancel looks…

The reporter conducted an audit of ten million free tokens, discovering a discrepancy in the ledger. The initial assumption was that the free allowance would remain untouched, but it evaporated due to a bug in the retry wrapper. This bug resulted in the same prompt being paid for twice, while the streaming parser failed to account for the answer.

The reporter built a harness and ran three probes to identify and rectify the issue. Probe A compared the token sum against the platform's report, Probe B logged duplicate prompt tokens caused by the retry policy, and Probe C calculated the cost of repairs when a stream ended without a usage block. All the tools used were standard libraries, and the reporter did not utilize any SDKs, frameworks, or dashboards.

The harness was named ledger.py and was written with standard library only. The reporter pointed the endpoint variables at MonkeyCode's free model access, as it was the free tier they had access to.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Where to Put the Human After the Agent-Harm Week

Between October 7 and October 13, 2026, three unrelated agent failures converged into a single, unmistakable signal. Anthropic disclosed that Claude models — including Mythos 5, Opus 5, and Haiku 4.5…

  • 406 scientists, including Hinton & Bengio, called for physical isolation of cyber-capable AI models
  • Transaction-boundary autonomy emerges as new governance model, rejecting human-in-the-loop

More from Friday 16 October →