blog

Cursor AI Spend by Repo and Model

Cursor shows how much of your plan you have used, in the editor settings and at cursor.com/dashboard/usage, but it does not break spend down by git repository. To see which repo and which model drove your Cursor spend, capture each agent turn locally with its token counts, model, and git context, then roll it up. PromptConduit does this with Cursor’s agent hooks: every turn is priced on your machine and tagged with the repo and branch it ran in.

This guide compares the ways to see Cursor usage, sets up per-repo tracking, and covers the pitfalls that make local numbers differ from your invoice.

The options compared

ToolWhere the data comes fromGranularityCost shown?Repo / branch attributionLocal only?
Cursor settings and usage dashboardCursor billingAccount, per usage pool (Cursor Models, Other Models), per billing cycleYesNoNo, hosted by Cursor
Cursor Admin API and Analytics APICursor billing and analyticsTeam, member, model usageSpending data via Admin APINoNo; Enterprise teams
Cursor AI Code Tracking APICursorCommit and change level code contributionsNo (code attribution, not spend)Commit levelNo; Enterprise teams
PromptConduit CLI + editor extensionCursor stop / afterAgentResponse hook payloadsPer request, per conversation, per modelYes, API-equivalent USDYes: repo, branch, commit, open PRYes on the Free tier

If you also use Claude Code, ccusage is a good terminal reporter for it and several other agents, but its README does not list Cursor as a source.

How Cursor bills usage

Per Cursor’s models and pricing page, checked on 2026-10-08:

  • Usage is split into a Cursor Models pool (Grok and Composer) and an Other Models pool. Pro, Pro Plus, and Ultra include both.
  • Third-party models are charged at the model’s API price. After included usage runs out, on-demand usage is billed at the same API rates.
  • Auto bills at the list price of whichever model each request is routed to.
  • Each model lists separate cache write and cache read rates. Some models have no cache write charge.
  • On Teams and Enterprise, third-party model requests carry a $0.25 per million token Cursor Token Rate on top of API pricing. Grok and Composer are exempt.

That last point matters when you compare models: the same token count can cost differently depending on plan and pool. PromptConduit’s rate card lists the per-token rates it prices against, including Composer and Cursor’s Grok models.

How to track Cursor spend by repo and model

1. Install the CLI and the Cursor hooks.

curl -fsSL https://promptconduit.dev/install | bash
promptconduit install cursor

This writes hooks to ~/.cursor/hooks.json. No account is needed: in Free mode events are written to ~/.promptconduit/events.jsonl and nothing is sent anywhere. See the quick start and the supported tools list.

2. Run an agent turn in Cursor, then check the cost from the workspace folder.

cd ~/code/web
promptconduit cost            # latest session for this workspace
promptconduit cost --json     # machine-readable summary

Illustrative output (real format, made-up numbers):

AI session cost — cursor  (exact)
  Total: $0.0635 USD
    composer-2.5           $0.0635     in 40000 · out 3000 · cache-read 180000 · cache-write 0
  Signals: cache-hit 82% · input-share 18% · tier standard
           cache-miss cost share 31%

Cursor sessions have no tool-call line, because the token-bearing hook payload does not carry tool names.

3. Install the editor extension. Search “PromptConduit” in Cursor’s Extensions pane (Open VSX listing). The status bar shows the last request’s cost and the session total; its tooltip names the tool and the repo. PromptConduit: Show Cost Breakdown opens a per-prompt ledger with This branch and This PR scopes, which sum spend across every session on the current branch of the same repo. PromptConduit: Show All Sessions Cost lists every conversation.

4. Roll up spend by repo and model from the local log. End-of-turn events carry a cost enrichment (priced requests with request_id, model, tokens, usd) and a vcs enrichment (repo, branch, commit). Save this as by-repo.jq:

[ .[]
  | select(.enrichments.cost)
  | (.enrichments.vcs.repo // "(no repo)") as $repo
  | .enrichments.cost.requests[]
  | {repo: $repo, model, id: .request_id, usd: .usd.total} ]
| unique_by(.id)
| group_by([.repo, .model])
| map({repo: .[0].repo, model: .[0].model, requests: length, usd: (map(.usd) | add)})

Then run:

jq -s -f by-repo.jq ~/.promptconduit/events.jsonl

The unique_by(.id) step matters. Cursor fires both stop and afterAgentResponse for one generation with the same generation_id, which becomes the request_id, so summing every event would count each turn twice. The log includes Claude Code events too, so the result is total AI spend per repository across both tools.

Reading the token columns

Each Cursor request has four token counts, and the panel and promptconduit cost keep them separate:

  • Input: fresh context sent to the model.
  • Output: generated tokens, usually the most expensive per token.
  • Cache read: context served from the provider’s prompt cache at a reduced rate.
  • Cache write: context written into the cache. For Composer and Grok, Cursor publishes no cache write rate, so these tokens are priced at $0. Claude models are priced at Anthropic’s 5-minute cache write rate because Cursor reports no TTL split.

The cache hit rate signal is cache_read / (cache_read + cache_write + input). A low rate on a long conversation usually means context is being rebuilt; the cache hit rate guide explains what to change. The tier signal buckets the model (Composer is “standard”, Opus-class and GPT-5-class models are “premium”, Haiku, mini, nano, and flash models are “economy”) so you can spot premium models on routine work.

The Cost Breakdown panel’s Advanced drawer also has a what-if comparison that reprices your actual token counts at other models’ rates. It is a rate comparison, not a capability comparison: another model would take different turns and use different tokens.

Common pitfalls

  • Expecting invoice numbers. PromptConduit computes API-equivalent cost. It does not know whether a request drew on included usage or on-demand usage, and it does not add the Cursor Token Rate on Teams and Enterprise plans.
  • Multi-root workspaces. Attribution uses the first entry in the hook’s workspace_roots. If you open several repos in one window, spend lands on the first root.
  • Folders that are not git repos. With no git context the event has no vcs enrichment, and the recipe above files it under (no repo).
  • Unpriced models. If a model id is not in the rate table, tokens are exact but the cost shows as unpriced. Run promptconduit cost refresh-card to fetch the latest card from /model-rates.
  • Pricing is fixed at capture time. Cursor turns are priced when the hook fires, so a later rate change does not reprice old entries.
  • Undocumented token fields. Cursor’s hooks reference does not list the token fields yet. PromptConduit reads them when the payload carries them; a payload with no tokens produces no cost record.
  • Too many MCP tools in context. Tool definitions are sent with requests. See right-sizing MCP servers.

Claude Code in the same repository

Many developers run Cursor and Claude Code against the same codebase. Install both with promptconduit install cursor claude-code; both write to the same local log, so a per-repo rollup covers both tools. Claude Code cost comes from its local transcripts, so it is priced the same way whether the model runs on Anthropic’s API, Amazon Bedrock, or Google Vertex. Anthropic’s docs note that its analytics dashboards do not cover cloud-provider usage. The price is still the list API rate, so check your cloud bill for actual charges. For the Claude Code side, see Track Claude Code token usage and cost.

Privacy and cloud history

Cost records hold numbers and identifiers only: token counts, dollars, model, request and conversation ids, and the workspace folder’s basename. The hook payload’s response text is never stored in the cost feed. See the security page.

Local tracking is free. If you want 90-day history across machines (Pro, $10 per month) or shared rollups and member-level cost dashboards for a team (Team, $15 per seat per month), see pricing.

Frequently asked questions

Where can I see my Cursor usage?

Cursor shows usage for its two pools (Cursor Models and Other Models) in the editor settings and on the dashboard at cursor.com/dashboard/usage. Both pools reset with your monthly billing cycle.

Can Cursor show spend per repository?

Cursor's dashboard reports account-level usage, not spend per git repository. To attribute spend to a repo, capture each agent turn locally with the workspace's git context, which is what PromptConduit's Cursor hooks do.

How is Cursor usage priced?

Per Cursor's docs, third-party models are charged at the model's API price, and Auto bills at the list price of whichever model each request is routed to. Composer and Grok are first-party Cursor models in the Cursor Models pool. On Teams and Enterprise, third-party requests carry a $0.25 per million token Cursor Token Rate.

Does Cursor have a usage API?

Cursor's Admin API and Analytics API cover team usage, spending, and model usage, and both are listed as available to Enterprise teams. Cursor's docs do not describe an individual-plan usage API.

How does PromptConduit get Cursor token counts?

promptconduit install cursor adds hooks to ~/.cursor/hooks.json, including stop and afterAgentResponse. When those payloads carry input, output, cache read, and cache write token counts and a model id, the CLI prices the turn locally and tags it with the workspace's repo and branch.

Is PromptConduit's Cursor cost the same as my Cursor invoice?

No. It is an API-equivalent figure from token counts and published rates. It does not know whether a request came from included usage or on-demand usage, and it does not add the Cursor Token Rate.