AI & MLCodexPython

Measuring Coding Agent Usage Without Confusing Tokens and Allowance

When an AI-assisted task spans many requests, a usage total can look precise while hiding how it was assembled. Did the collector see the same event twice? Did a counter reset? Does a local token count describe the same thing as a product's allowance display?

The token-usage dashboard project focuses on those accounting questions. Its retained state includes a collector foundation and work on event reconciliation, while further development remains paused.

Treat usage records as data

The first problem is to establish what each record means. Some values describe a particular event; others can be cumulative counters. Adding both indiscriminately can double-count activity.

Counter resets and repeated records create further problems. A collector needs enough provenance to recognize what it has already seen and to keep a new session or accounting period from being interpreted as another increment of an old one.

These are familiar data-engineering concerns, applied to an AI workflow.

Project attribution needs care

A project-level dashboard is only as useful as its assignment rules. Work can involve shared tools, several folders, and a long-running conversation. A directory label is a starting point, not necessarily a complete account of where effort belongs.

I would want a dashboard to show its attribution rule and any unassigned records rather than hide ambiguous activity inside a confident total.

Tokens and allowance are separate measures

The project explicitly avoids treating local token totals as a direct measurement of subscription allowance. A local collector can summarize the records it observes; it cannot infer every rule behind another accounting system.

That makes the dashboard a tool for examining local activity, with scope and assumptions attached to its numbers.

The current checkpoint

The README records a paused checkpoint in November 2026. This post describes that state rather than implying a continuously running collector or a finished billing analyzer.

A public version would use fabricated usage events. Raw conversations, thread details, account data, and laptop diagnostics should stay outside the example. The reusable contribution is the reconciliation logic and the visibility of its assumptions.