TokenSight, AI coding agent usage analytics
milestone ·
TokenSight sits in the macOS menu bar and reads how Codex and Claude Code spend tokens. It watches session files those tools already write and stays off the network.
I started it after posts I kept seeing. Developers on Codex and Claude Code subscriptions were surprised their usage jumped, or that they hit a weekly limit so fast. Sometimes that is a provider bug that later gets fixed. I wanted a local picture of what happened over time, and which parts of the usage grew. That would make those issues easier to spot, and it would show where to spend effort if you want the token count to come down.
On 24 August 2026 I took a snapshot of Codex files and ran two readers over them. They agreed on the six totals the server reports. That set was 173 sessions, 176 files, and 20 weeks. Similar tool names grouped down to 40 labels. I still run this on my own Mac. Cloud Codex tasks that never write a local file stay out of view. The picture on this page is the compare output, not a menu bar shot. I trust that line more than a pretty popover.
The server is exact about a request. It is quiet about which tool inside that request spent the tokens. After each API call, Codex writes a count with the real totals, and TokenSight copies those numbers. The split is a guess. The input change in that request window is spread across items by how large each item was. One request might list a file read and a shell command. The server tells you the request cost. TokenSight estimates how to split it. I care more that the copied totals match than that the guessed split looks tidy. The compare treats a split as close enough when the gap is under 10,000 tokens or under 3 percent of the other reader, whichever limit is larger. A 12.5 percent gap on that guess still passed under the rule. Claude Code is outside that Codex run. It only has tests against saved examples so far.