Skip to content
10 min read

See what your coding agents cost, and what they shipped

Agent Insights splits every Claude Code, Codex and Cursor session into tasks, then ties each task to a project budget, the tokens that did no work, and the pull request it shipped. Here is how the pipeline works.

Aditya JhaAditya Jha DevRel ·
Illustration: on the left, a small stack of glowing coins; a soft beam of light flows from it into a simple terminal window in the middle, and from the terminal four thin beams lead to four floating pull-request cards on the right; only one card is bright with a check mark, the other three are faint and fading

A CTO told Faros AI's CEO, as TechCrunch reported: "One of my engineers spent $40,000 on tokens last month, and I genuinely don't know whether I should stop him or should I go and tell everyone else to be like him."

Two questions in one. What did the $40,000 buy, and is the way that engineer works worth copying? The invoice answers neither: it lists tokens per account and model, not which project they served or whether the work shipped. And the bill keeps growing. Uber "blew through its entire 2026 AI coding budget by April", per the same piece, and our Token Maxxing Report (1M+ pull requests, 2,444 orgs) found just 18 cents of every AI coding dollar becomes shipped product.

This post shows how Agent Insights answers both questions for Claude Code, Codex and Cursor: what it measures, how, and where the numbers come from.

The short version
  • Capture: the Ellie CLI reads local session files. By default the transcript stays on the laptop.
  • Tasks: each session splits into tasks, each with a work type, a cost and the pull request it fed.
  • Budgets: Linear and Jira projects get monthly budgets with an email alert before they run over.
  • Waste: tokens that did no work are itemized by cause, and most fixes live in the repo, not with a person.

What is coding agent analytics?

Coding agent analytics measures what AI coding agents such as Claude Code, Codex and Cursor cost, and what that spend produced. Usage dashboards count tokens per user and model. Coding agent analytics goes one level down: it splits each agent session into tasks and attributes every task’s cost to a project, a pull request and an outcome.

Four numbers come out of that unit: cost per task and per project, spend against a project budget, the share of tokens that did no work, and how much of the spend reached merged code. Agent Insights is the Entelligence product that produces them.

What a provider bill can’t tell you

A tokens-per-engineer chart has the same gap as the invoice. An agent working through a nasty race condition and an agent running the same failing command for forty minutes burn the same tokens. The chart cannot tell them apart.

So Agent Insights answers four questions about every session, then rolls them up per project:

  • What was it trying to do? The task and its work type.
  • What did it cost, and against which budget? Dollars per task, project and repo.
  • What happened while it ran? The tokens that did no work, and why.
  • Did the work land? The pull request and ticket it fed, and whether it merged.

Every session lands in the world model

Usage dashboards stop at the session. Agent Insights files each session into the Entelligence world model: one graph per organization of sessions, tasks, pull requests, tickets, deploys and incidents. Agent Insights writes the session, task and cost records. The other Entelligence products read them.

That graph makes the joins in this post cheap: task to pull request, review finding back to the task that wrote the file, spend up to a project. Code Review, Model Router and Ask Ellie read the same records, and agentplay replays any single session as a map and a timeline.

Diagram of the Entelligence world model, one graph of sessions, tasks, pull requests, tickets, deploys and incidents, with Agent Insights writing to it and Code Review, Model Router and Ask Ellie reading from it
Agent Insights writes sessions, tasks and cost into the world model, and the other products read the same records.

Capturing sessions where they run

Claude Code, Codex and Cursor all keep detailed session files on disk, so there is no proxy to route traffic through and no IDE plugin to install. The Ellie CLI reads those files:

BASHbash
curl -fsSL https://cli.entelligence.ai/install.sh | sh
ellie auth login
ellie insights sync

The first sync imports up to 30 days of history. After that it syncs daily. By default the parsing happens on the developer’s laptop, and what goes up is derived data per task: tool calls, token counts, cost and files touched. The backend works from the shape of a session, not its contents.

Agent Insights pipeline in five steps: session files from Claude Code, Codex and Cursor, parsed by the Ellie CLI on the laptop, split into tasks with work types, matched to a pull request and ticket, and classified as shipped, pending or non-productive
From session file to outcome. Everything downstream is keyed on the task.

Splitting sessions into tasks

A session is a poor unit to compare. Someone opens Claude Code, fixes a bug, asks it to explain a module they have never touched, then rewrites a flaky test, all in one session. Someone else spreads one feature across three sessions because they hit a context reset or switched from Cursor to Claude Code after lunch.

So each session splits into tasks first. A task is one goal, with its own turns, tool calls, files and cost, and one of four work types:

  • Features: new behavior headed for a pull request.
  • Fixes and rework: bug fixes, and changes to recently written code.
  • Tests and reviews: writing tests, answering review, verification.
  • Exploration and overhead: investigation, spikes, questions, setup.

Exploration gets its own bucket so a spike does not count as a failed feature. Finding out that an approach will not work is useful even without a pull request. Sessions with no task at all, like a one-line question or an abandoned start, get an explicit “no task” verdict.

Because every task carries its own cost, spend splits by work type too, and that is where ROI shows up. On our own workspace last month, exploration and overhead was the biggest bucket: 1,433 of 2,886 agent tasks, or half. Features were 15%.

Outcome breakdown of 2,886 agent tasks: features created 420 (15%), fixes and rework 872 (30%), tests and reviews 161 (6%), exploration and overhead 1,433 (50%)
The Outcomes view on our own workspace, last month.

Measuring ROI: four numbers, not a token count

Token counts and “hours saved” are the two ROI numbers most teams reach for, and both mislead. Tokens measure activity, not output. Felt speed is unreliable: in METR’s randomized trial, experienced developers took 19% longer with AI tools while believing they were faster. So Agent Insights reports unit economics you can check against your own git history:

Four ROI numbers defined: cost per merged PR (all agent spend divided by merged PRs, abandoned and untracked spend included), spend mix by work type, reclaimable spend (tokens that did no work) and budget versus actual per project
The four numbers, and how each is computed.
  • Cost per merged PR. All agent spend divided by merged pull requests, with abandoned tasks and untracked spend left in, so the number cannot flatter itself. The Budget history tracks it month over month, and each engineer sees their own.
  • Spend mix by work type. The same dollars split into features, fixes and rework, tests and reviews, and exploration. A healthy trend moves spend toward features without the fixes share climbing behind it.
  • Reclaimable spend. Tokens that did no work, covered in the waste section below. It is the part of the bill you can cut without doing less.
  • Budget versus actual. Spend per Linear or Jira project against its monthly budget, with an email alert at your threshold.

On our own workspace, the dollar share going to exploration and overhead fell from about 90% to about 45% over five weeks while the features share climbed to roughly a fifth, the trend you want after fixing agent setup:

Spend by work type over time, weighted by spend, from September 28 to November 2: exploration and overhead falls from about 90% to about 45% while features created rises to roughly 20%
Dollar-weighted spend by work type on our own workspace, five weeks.

Read cost per merged PR next to rework: agents inflate raw PR counts, so a falling cost per PR with a rising fixes share is not a win. And Agent Insights does not estimate time saved. That needs surveys and a pre-rollout baseline, as in DX’s AI measurement framework; the numbers above are the cost and output side of the same equation.

Budgets and spend, per project

Set a monthly budget on any Linear or Jira project. Agent Insights attributes every session to its project and repo, tracks the month against the budget, and emails the project owner at the threshold you pick, while there is still time to act. Spend no project claims shows up as untracked spend and stays in the totals, because dropping it would make every ratio look better than it is.

Projects breakdown in the Budget view: Checkout rewrite has spent $3,158 of a $2,500 budget (126%), Mobile onboarding v2 $1,444 of $3,000 (48%), Internal tools $255 with no budget set, and Data platform $0 of $800
Projects against their monthly budgets in the Budget view, one over and one with no budget yet. Demo workspace data.

The same dollars regroup by project, repo, model or person; on our own workspace, 95.5% of usage attributes to a repo.

Monitored usage by repository with 95.5% attribution, listing tokens and sessions per repo, next to monitored usage by Linear project
Usage by repository and by project on our own workspace, with the share of tokens attributed to a repo.

For teams on plans with a weekly usage window, Capacity shows who is on pace to run out before the reset, so a seat can be moved before someone gets blocked. For the planning side of this, see how engineering teams can actually budget for AI usage.

Token waste, itemized by cause

Most tokens in a long session are old context resent every turn, and most of that is unavoidable (the mechanics). Token waste by cause pulls out the part that is not:

CauseWhat it isTypical fix
CompactionContext rebuilt after a full windowSmaller tasks, trimmed output
InterruptsStopped before it finishedPlan before execute
Repeated editsSame file edited againRead before edit
Failed retriesCalls repeated after an errorFix the failing command

On our workspace over 30 days that came to 3.9B tokens: 75% compaction, 15% repeated edits, 8% failed retries, 1% interrupts. Much of it comes from the repo, not the person. A test command pointing at the wrong directory makes every engineer’s agent fail the same way until someone fixes one line. In the terminal, ellie ledger shows the same thing per session: what it cost, how much was avoidable, and the PR it led to, or “no PR”.

Daily token waste by cause from October 4 to November 3, stacked by compaction, interrupts, repeated edits and failed retries, with a Suggest fixes button in the corner
Daily token waste on our own workspace. Suggest fixes, top right, turns the org’s own breakdown into recommendations.

From dashboard to fix

Three parts of Agent Insights point at what to change.

The Agents Summary states its findings in plain English. On our workspace it currently says the top 5% of sessions burn 96% of all tokens, so a cost review should start with those sessions, not with people.

Suggest fixes, on the daily waste chart, turns the org’s own waste breakdown into changes for admins to make, usually a line in CLAUDE.md or AGENTS.md.

Skill suggestions spot work that keeps repeating: on our workspace, nine engineers ran 30 tasks on dashboard and analytics debugging, so it proposes one skill for that.

Skills suggested to improve AI usage, each card showing how many engineers and tasks it covers, led by dashboard and analytics debugging with 9 engineers and 30 tasks
Skill suggestions on our own workspace, based on tasks that keep repeating across the team.

Then check it worked: after a context rule lands, that repo’s compaction band should shrink within a week, and the chart shows whether it did.

Per-person metrics without a token leaderboard

Teams want per-person agent metrics, and token count is the wrong one. Jellyfish’s Nicholas Arcolano, as WorkOS reported, found the top 10% of engineers by token use “about twice as productive as the median”, at roughly 69M tokens per pull request against about 7M at the median. A spend ranking puts them on top for the wrong reason and teaches everyone else to burn tokens. Meta found that out in April, when it shut down an internal token dashboard.

That is the CTO’s second question: what is worth copying from a heavy user is how they drive their agents. Per-person views show exactly that:

  • Capabilities in use. Sub-agents, plan mode, skills and MCP tools. On our workspace, plan mode adoption is 43%.
  • Driving style and efficiency. Reads before edits, retries, steps per instruction.
  • Spend next to pull requests merged. In the Members view, alongside Capacity and budgets, never on its own.
A member profile in Agent Insights: toolset with four of five capabilities in use, then coaching that lists strengths such as reading before editing on 78% of turns and one top priority, compacting earlier on long sessions
The coaching block on a member profile: capabilities in use, strengths and one thing to change. Sample data.

Ask Ellie in Slack

Most people who care about agent spend never open a dashboard, so Ask Ellie answers from the same graph in Slack, the web app and the terminal, and links each claim to its record:

  • Managers: which projects go over budget this month, and why?
  • Platform teams: which repo’s agent setup costs us the most in retries?
  • Finance: what did Payments API cost in October, and what shipped?
  • On-call: which agent session wrote the pull request in last night’s deploy?

How this differs from provider dashboards and LLM gateways

Most teams already have one of these. Each answers a narrower question, and the gap is the unit of analysis:

Agent InsightsProvider dashboardLLM gateway
UnitTask and its PRUser and modelAPI key
AgentsClaude Code, Codex, CursorOne vendorRouted traffic
BudgetsPer Linear or Jira projectPer seatCap per key
WasteItemized by causeNot shownNot shown
OutcomeShipped or not, per taskNot tied to a taskNot tracked
SetupCLI reads local filesBuilt inA proxy

A gateway is the right tool to cap a key. A provider dashboard is the right tool to see seat usage. Neither knows which project a session belonged to or whether its work merged, and that is the question finance and engineering leaders are asking.

Questions people ask

What is coding agent analytics?

Coding agent analytics measures what AI coding agents such as Claude Code, Codex and Cursor cost and what that spend produced. Agent Insights does it per task: each session is split into tasks, and each task gets a work type, a cost and a link to the pull request it fed.

Which coding agents does Agent Insights support?

Claude Code, Codex and Cursor. The Ellie CLI reads their local session files. The first sync imports up to 30 days of history, and sessions sync daily after that.

Do session transcripts leave the developer’s machine?

By default, no. The CLI parses sessions on the laptop and sends derived data per task: tool calls, token counts, cost and files touched. The transcript itself stays local.

Does Agent Insights rank engineers by token usage?

No. Spend per person appears next to pull requests merged, Capacity and budgets, never on its own.

Your first week with Agent Insights

Agent Insights is in beta. A first week that gets you to a first measurable fix:

  1. Install the CLI, run ellie auth login and ellie insights sync. You get up to 30 days of history.
  2. Set monthly budgets on your three most expensive Linear or Jira projects.
  3. Note your cost per merged PR and spend mix for the last 30 days. That is your baseline.
  4. Click Suggest fixes on the waste chart and apply the top one. It is usually one line in CLAUDE.md or AGENTS.md.
  5. Check the waste chart a week later. The band for that cause should be smaller.
  6. Add Ellie to the channel where spend questions already come up.

Want a walkthrough on your own sessions first? Book a demo and we will go through your first sync together.

Sources: The token bill comes due: inside the industry scramble to manage AI’s runaway costs; The Token Maxxing Report; Nicholas Arcolano (Jellyfish) on token maxing and diminishing returns; Meta killed its employee AI token dashboard; Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity; AI Measurement Framework.

The memory starts the day you connect a repo.

From that day on, every session, review and incident lands in the same index.

  • No credit card required
  • No training on customer code
  • Deploy in your cloud, your own keys