Your agents spent $4,054. On what?
That is eight weeks on one Max seat, and no dashboard could say which project any of it was for. Tallyhook reads the session logs Claude Code and Codex already write and turns them into cost per repo, per team and per developer. Find out where your budget actually went — or bill it to a client with your markup on top.
npx tallyhookFree, no account, nothing uploaded. Reads the logs already on your machine and prints what each repo cost.
The hosted plan adds every developer's sessions in one total, history older than your logs, budgets and alerts per group, and a read-only report link. From $49 a month flat, not per seat. No card to start. How it works
northwind/storefront
- Claude Code
- Sessions, subagents and cache tokens, from the JSONL it already writes.
- Codex CLI
- Including the compressed rollouts Codex archives after seven days, on Node 22.15 or newer.
- Any MCP client
- A stdio server, so an agent can ask what its own work cost.
- Discord and any webhook
- Cost alerts where the team already is, or plain email.
Priced against each vendor's published per-model rates, input, output and cache read and write separately. A model with no known price is reported as unpriced rather than guessed at.
See cost per project, not per seat.
Every session lands under the repo it ran in, and repos group into whatever you plan by: a client, a service, a squad. Developer, model, tokens and list price, for any date range.
Catch the expensive session today.
Our most expensive single session has passed $390: one conversation, resumed across nine days, still open. Not a runaway loop, just work nobody priced until the month ended. In Tallyhook that is one row with a price on it, the same day. Set a dollar threshold and an email arrives the moment one crosses it.
Then bill it, or just explain it.
Agencies get an invoice with their markup and a report link to send the client. Everyone else gets the same document as a plain cost report, plus budgets, a month-end forecast and the biggest movers since last period.
Engineering teams: which repo, squad or service is eating the budget, whether it is accelerating, and an alert the moment one session runs away.
For engineering teams →Agencies and consultancies: cost per client, your markup on top, a printable invoice and a read-only report link you can send them.
For agencies →A repo total is not an answer. So group the repos.
Every local cost tool can tell you what a repository cost. None that we know of can roll those repos up into the thing you actually plan by — a squad, a service, a client — and total it. Map the repos once and the group total is there, with a billable figure beside it if you are charging it on.
This runs entirely on your laptop. No account, nothing uploaded, and the mapping lives in a file you own. The contract clause for billing it on is free too.
$ tallyhook clients add "Northwind Trading" northwind --rate 20 $ tallyhook clients add "Brightside Dental" brightside --rate 20 $ tallyhook clients add "Meridian Freight" meridian --rate 20 $ tallyhook --by client CLIENT SESSIONS OUTPUT LIST COST BILLABLE Northwind Trading 218 18.0M $2,318.43 $2,782.12 Brightside Dental 44 3.1M $402.17 $482.60 Meridian Freight 31 2.2M $288.90 $346.68 TOTAL 293 23.3M $3,009.50 $3,611.40 Not counted: $20.36 in repos no client claims.
Example output. tallyhook teams is the same command and the same stored map, so --by team prints these rows without the billable column when nothing is being charged on. Either way it also lists the repos no group claims yet, most expensive first.
Your vendor dashboards count by user and by model. Never by project.
On a subscription seat there is not even a dollar figure. So the cost gets absorbed, or guessed, or billed as a flat fee that is wrong in both directions.
- Claude Team and Console
- Usage and estimated spend per user and per model. Nothing per repo, team or client, and no dollar figure for usage inside a seat.
- Cursor
- Team analytics count AI-written lines per repo and usage per user. No cost per repo.
- OpenAI / Codex
- Workspace analytics show usage per user and per model. Nothing per repo.
- One Max seat, 8 weeks to 29 Sep
- $4,054 of list-price usage across 740 sessions. The dashboard could not say what any of it was for.
Three steps. After that it runs on its own.
- 01
Run one command on each laptop
It registers a Claude Code hook and reads the session logs Claude Code and Codex already keep. History uploads on the spot, so you see real numbers before you finish reading this page.
Terminal$# output tallyhook: installed to ~/.tallyhook/tallyhook.js ✓ Claude Code hooks registered (SessionEnd, Stop) ✓ uploaded 312 sessions as maya@agency.dev
- 02
Put each repo in a group, once
Sessions arrive tagged with their git remote. Choose a group from a dropdown — a team, a service, a client — and every past and future session from that repo follows.
Repos without a groupgithub.com/acme/storefront→ Storefrontgithub.com/acme/patient-portal→ Patient Portalgithub.com/acme/iosPick a groupChoosing a group saves instantly and re-tags every earlier session from that repo.
- 03
Read it, or export it
Cost by group, developer and model for any month, with a month-end forecast. A CSV when you need the numbers somewhere else.
cost-report-2026-09.csvLine Sessions List Storefront 38 $412.30 Patient Portal 21 $188.12 Platform 1,204 $551.02 September total 59 $600.42
# output tallyhook: installed to ~/.tallyhook/tallyhook.js ✓ Claude Code hooks registered (SessionEnd, Stop) ✓ uploaded 312 sessions as maya@agency.dev
Session metadata leaves the laptop. The work never does.
- Tokens by model, cache reads and writes split
- Start and end time, tool and version
- Git remote and branch, and which repos the edited files belong to
- Developer identity from git config, and the machine hostname
- Turn count and tool-call counts
- Paths of files edited
- First 160 characters of the first prompt (optional)
- Transcripts and every later prompt
- Code, diffs, file contents
- Tool output and command results
- Environment variables and secrets
The collector is open source (MIT): one dependency-free file, about 1,019 lines. Read it before you run it on GitHub, or get it from npm.
Or try it with no account at all. This prints what each repo on your machine cost in the last 30 days, and uploads nothing:
npx tallyhook
Flat per workspace. Not per seat.
Unlimited repos, groups and sessions on both plans. Fourteen days free, no card until you decide. Per-seat pricing would punish the one thing that makes this work, which is installing the collector on every laptop.
| Team | Agency | |
|---|---|---|
| Per month | $49 | $149 |
| Developers running the collector | up to 5 | up to 20 |
| More than 20 developers | — | +$7/seat/month, any time |
| Collectors | Claude Code, Codex | Claude Code, Codex |
| Exports | Invoice and session CSV | Invoice and session CSV |
| Alerts and client budgets | Yes | Yes |
| Client report links | Yes | Yes |
| Price overrides | Yes | Yes |
| Start free | Start free |
Costs are list-price equivalents from each vendor's public API pricing. On a subscription (Claude Max, Team, ChatGPT Pro) that is the value of what your team used, not a bill you received. The app says so wherever a number appears.
Only developers who install the collector count toward the seat limit. Anyone else on the team can sign in and view every client, session and invoice for free.
A monthly budget per group with warnings at 80% and 100%, and a month-end projection from the spend so far.
What moved most since last period, in dollars, and eight complete weeks of weekly cost per group.
CSV for a spreadsheet, a printable document, or a no-login link showing one group and nothing else.
Negotiated rates, or a model we do not know yet: set a price and every past session reprices.
Tallyhook is new. Trying it costs you nothing.
It exists because one Max seat quietly ran up $4,054 in the eight weeks to 29 September, across 740 sessions, and no dashboard could say what any of it was for. That is the whole origin story, and those are real numbers from the machine it was built on.
So rather than ask you to take anyone's word for it, here is what you can check yourself in about ten minutes.
- No account to find out
- The free command reads the logs already on your disk and prints the numbers. There is no signup, no card and no trial clock on it.
- One file, and you can read it
- The collector is 1,019 lines of dependency-free JavaScript, MIT licensed. Read it on GitHub before you run it, or read the exact file this site serves at /tallyhook.js.
- One network call, for the free report
- A GET for the per-model price table, which is published and checkable. The free command uploads nothing at all. Installing the collector for a workspace is a separate, opt-in step that does upload session metadata, listed item by item under Privacy above.
- Reversible in one command
- tallyhook uninstall removes the hooks and deletes its directory. Nothing is left behind to find later.
- The arithmetic is checkable
- Costs are list-price equivalents at each vendor's published API rates, and the table we price against is public. On a subscription that is the value of what you used, not a bill.
Questions
What is Tallyhook?+
A cost ledger for teams that use AI coding agents. A small collector on each developer's machine reads the session logs Claude Code and Codex CLI already write, uploads per-session metadata (tokens by model, repo, branch, developer, timing), and Tallyhook prices each session at the vendor's public list rate and attributes it to a repo by its git remote. You then group repos the way your business works: by team or service to see where the budget goes, or by client to bill it back with your markup.
Who is it for?+
Engineering teams and agencies of roughly 2 to 50 developers using Claude Code or Codex. In-house teams use it to answer which repo, squad or service the spend belongs to, whether it is accelerating, and whether any single session ran away. Agencies and consultancies use the same ledger to bill the cost back to the client it belongs to, with a markup. One product, and the grouping is the only difference.
Does this rank developers by how much they spend?+
No, and it is not built to. The default views are per repo and per team, because that is where a spending decision actually gets made. Per-developer totals exist, since you need them to size seats and spot a runaway loop, but they are never the headline, nothing in the product scores or ranks people, and a read-only report shared outside the workspace leaves the per-developer table out entirely. If you are looking for a tool to performance-manage engineers by AI usage, this is the wrong one.
We are on Claude Max or Team seats, so there is no per-session bill. What does the number mean?+
It is a list-price equivalent: what that usage would have cost on the API, priced from the vendors' public rates. On a subscription that is the value of what your team used, not an invoice you received, and the app says so wherever a number appears. It is the only way to get a dollar figure at all for subscription usage, which vendor dashboards leave blank.
How is this different from Anthropic's or OpenAI's own usage dashboards?+
Vendor dashboards report usage per user and per model. None of them know which repo a session belonged to -- let alone which team or client that repo belongs to -- and usage inside a subscription seat has no dollar figure at all. Tallyhook attributes every session to a repo by its git remote, rolls repos up into whatever groups you use, prices it at list rates, and exports a cost report or invoice lines.
Is this just ccusage with a login?+
ccusage is an excellent open-source CLI for one machine and was the reference for token counting. Tallyhook is the team layer on top of the same local logs: every developer's sessions in one place, grouped by team or client, with cost alerts, per-group budgets, a month-end forecast, shareable read-only reports and invoice output. If you only need your own machine's numbers, ccusage is enough -- and so is our own free npx tallyhook. The paid product is for when the question is about a team rather than a laptop.
How accurate is the cost?+
Tokens come from the vendor's own session logs, deduplicated per message (including messages that forked subagents copy from the parent session). Prices are the public API rates per model, including cache reads, 5-minute cache writes at 1.25x input and 1-hour cache writes at 2x input. Claude fast mode is priced at its premium rate. You can override any model's price for negotiated rates. It is a list-price equivalent, not a figure reconciled against your vendor invoice (on subscription plans there is no per-session invoice to reconcile against), and it leaves out server-tool fees such as Claude web search, the 1.1x rate for US-only inference and OpenAI long-context surcharges.
Is the collector open source?+
Yes. The collector is MIT-licensed, one dependency-free Node.js file, with its source on GitHub (github.com/tallyhook/tallyhook-collector) and published on npm as tallyhook, so npx tallyhook and npx tallyhook install <token> both work. You can read exactly what leaves your machine before you run it. The hosted web app and API are not open source.
What leaves the developer's machine?+
Only metadata: token counts by model, start and end time, tool and version, git remote and branch, which repositories the edited files belong to, developer identity from git config (or the OS username if no git email is set), the machine hostname, turn and tool-call counts, paths of edited files, and optionally the first 160 characters of the first prompt. Transcripts, code, diffs, tool output and environment variables never leave the machine.
What counts as a developer seat?+
Only developers who install the collector and upload sessions. Anyone else you invite, such as a project manager or account owner, signs in free as a workspace member (up to 50 people per workspace). The free trial covers whichever plan you are trying — 5 developers on Starter, 20 on Standard — and you can switch between them free in Settings while the trial runs, so you can evaluate with your real team before paying.
What if we have more than 20 developers?+
Add extra seats to the Standard plan any time from Settings: $7 per seat per month, up to 500 developers in total. That is below Standard's own blended rate ($149 / 20 = about $7.45), so growing past 20 never costs more per head.
Does the hook slow Claude Code down?+
Rarely, and briefly. The Stop hook syncs at most once every ten minutes and usually finishes in well under a second. Each upload times out after eight seconds, Claude Code caps the hook at 20 seconds, and the hook always exits cleanly, so it never fails a turn.
I'm a one-person consultancy. Is this for teams only?+
No. The Starter plan at $49 a month works for a single developer, and a solo consultant is the clearest case for it: you are the one eating the agent cost and the one sending the invoice, so there is nobody to roll anything out to. You install the collector on your own machine and get the invoice document with your markup, a read-only link to send each client, and history that outlives the session logs Claude Code eventually deletes. The free npx tallyhook command already groups repos into clients locally; the paid plan is what makes that into something a client can open.
Can I try it without creating an account?+
Yes, two ways. The live demo at tallyhook.dev/demo opens the real app on sample data for a made-up five-developer agency: overview, clients, budgets, sessions and a finished invoice. Or run the collector itself (npx tallyhook, an open-source npm package) to print what each repo on your own machine cost over the last 30 days at list price, and npx tallyhook --by team to roll those repos up into your squads and services — or --by client, the same grouping with your markup on top, if you are billing it. It needs no account or token and uploads nothing; it only downloads the public price list.
Can alerts go somewhere other than email?+
Yes. Add a webhook URL in Settings and both alerts are POSTed there as well as emailed. Discord is verified: a real cost-spike and a real budget alert were both watched arriving in a channel, correctly formatted. The same payload also carries the field Slack documents for incoming webhooks, so it should work there too, but nobody has watched one arrive yet and we would rather say that than imply it is tested. The message is deliberately plain text, because Discord and Slack use different bold syntax and either one would render as stray asterisks in the other. Saving a URL sends a test immediately.
Can I charge different clients different markups?+
Yes. The workspace has a default markup and any client can override it on its own page; an empty field means it inherits. If one invoice covers several clients at different rates, each client's line is priced at its own rate and the per-developer and per-model billable columns come off, because no single markup describes them honestly.
Whose timezone decides when a month ends?+
Yours, once you set it. Workspace owners pick a billing timezone in Settings and every calendar-month range is cut on that clock. It matters more than it sounds: a session run at 8pm on the last day of the month in US Pacific is already the next day in UTC, so without a timezone it would be billed in the following month. Sessions are always stored in UTC and nothing is repriced; only the period boundaries move. The default is UTC.
Can I set a budget per client?+
Yes. Put a monthly budget on any client and workspace owners get one email when that client's month passes 80% of it and another at 100%. Separately, a per-session threshold emails you the moment a single session gets expensive, which is how you catch an agent loop the same day.
What about Cursor?+
Cursor does not write per-request token usage to a local log the collector can read, so it needs a proxy, which is a bigger trust ask than reading a log file. It is not built. There is a one-line way to register interest at the bottom of the features page, and what gets built next comes from those asks rather than a guess.
Can my coding agent ask what it is spending?+
Yes. Run npx tallyhook mcp and you have a Model Context Protocol server over stdio; in Claude Code, claude mcp add tallyhook -- npx -y tallyhook mcp. It exposes four tools: spend grouped by repository, the same grouped by model, the individual sessions that cost the most, and a summary of this period against the equally long one before it. It needs no account and no token and uploads nothing, because it reads the same local logs the free report does. If you have set "privacy": true, it leaves the prompt snippet out too.
Can I turn off the prompt snippet?+
Yes. Set "privacy": true in ~/.tallyhook/config.json and only counts and identifiers are sent.
What happens if I don't upgrade after the trial?+
Nothing is deleted and the collector keeps recording, so your history has no gap. The ledger itself (overview, clients, sessions, invoices, exports and client report links) is paused until you pick a plan, and opens again the moment you do.
Can I switch plans or cancel later?+
Yes, any time, from Settings. Plan switches are prorated with no double charge; cancelling stops billing but never deletes your data. Workspace owners manage billing.