# The AI Era's Lines of Code? A Case Study on What an Engineer's Token Spend Measures

Token spend mostly reflects how much engineers use agents, not their output

Shyam Agarwal, Olga Lvova, Agnia Sergeyuk, Anastasiia Serova, Timofey Bryksin, Thomas Zimmermann and 1 more · arXiv · 2026-11-10

- **Problem** Teams use token spend to rank engineers and judge productivity, but nobody had checked it against output for the same people over time.
- **Method** The authors compare each engineer's weeks with their own other weeks, holding the engineer's usual level fixed instead of comparing engineers with one another.
- **Results** Within an engineer, a week with twice the usual commits carried about 20% more tokens, an elasticity of 0.26.

![Figure 11: Within-person correlation between an engineer’s tokens on a working day and their commitskworking days later, both aslog(1 +x)with person and day me…](https://refivu.com/papers/39d25821-8637-434b-a777-c0a0904348ea/figures/figure-8dd107f5ad66c29e7bd0c54199bff589.png?thumb=512)

**Fig. 11** . Within-person correlation between an engineer’s tokens on a working day and their commitskworking days later, both aslog(1 +x)with person and day means removed. Small negative values at long lags are expected once each engineer’s mean over five weeks is removed.

[Original paper](https://arxiv.org/abs/2611.13396v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Shyam Agarwal, Olga Lvova, Agnia Sergeyuk, Anastasiia Serova, Timofey Bryksin, Thomas Zimmermann, Bogdan Vasilescu · The AI Era's Lines of Code? A Case Study on What an Engineer's Token Spend Measures · Original paper figure · Extracted the figure area from page 13 of the original PDF.

## Why spend looks like an output measure

Many engineers now write software by giving a coding agent instructions, reviewing its work, and asking for changes. Each call to the agent is logged with the tokens sent and received, so summing those counts per engineer and per week gives a token spend figure. That figure counts every exchange, including those that never become a commit, and it says nothing about what each exchange was for.

Some organizations already use this number to rank people: one internal leaderboard of top token users was taken down after press coverage. Analytics vendors go further and divide token cost by merged pull requests, reporting the ratio as a return on investment. That practice assumes an engineer who spends more also produces more, and practitioners have begun to doubt that assumption.

Benchmark studies give mixed answers, since agents that run longer don't reliably solve more tasks. Deployed comparisons show output rising far less than spend, with one press summary reporting that heavier spenders merge about twice as many pull requests for ten times the spend. Those comparisons set different engineers or organizations side by side, so differences in role or team could explain the gap as much as output does.

## The within-engineer comparison

The core idea is to compare each engineer with their own other weeks, so the engineer's usual level stays fixed. Comparing engineers with one another mixes in role, team and work practice, which is why the within-engineer view matters. The model is a Poisson regression estimated by quasi-maximum likelihood, which keeps zero-token weeks in the sample.

For engineer i in week t, the authors model expected tokens as follows. \\\[ E\[\\text{tokens}\_{it}\] = \\exp\\left(c\_i + d\\,\\log(\\text{commits}\_{it}) + t\_t\\right) \\\] Here c\_i is the engineer's own level, t\_t is the week effect, and d is the elasticity, the percentage change in tokens for each percentage change in commits. A value of d = 1 would mean spend doubles when commits double, and d = 0 would mean spend ignores commits.

Commit counts are a rough measure of work and bias the slope toward zero, so the authors re-estimate it with lines changed as an instrument.

## How a week's tokens move with its commits

The within-engineer elasticity of weekly tokens on commits is 0.26, with a 95% interval of 0.19 to 0.32. So a week with twice an engineer's usual commits carries about 20% more tokens. The authors fit this with the Poisson model of Equation 1, using 1,347 engineer-weeks from 344 engineers who had at least two such weeks. The elasticity d equals one when spend doubles with commits, and zero when spend ignores them.

They also estimate the reverse slope, of commits on tokens, which is 0.13 with an interval of 0.03 to 0.32. A week with twice the usual tokens therefore had about 10% more commits.

If spend tracked output one for one, both slopes would sit near one. Their product is 0.03, so the authors reject proportionality at every time unit, with p below 0.001. Commit counts are a noisy proxy for work, so the authors also instrument commits with lines changed. That instrument raises the within-person slope to 0.48, which is still well short of one.

The same-day correlation peaks at 0.33 and fades after about four working days, so a week holds most of the lag.

The slope stays low with other units: 0.30 for days, 0.21 for two-week periods, and 0.19 for lines changed. Between engineers the slope is 0.38, somewhat stronger than the within-person slope of 0.26. Because engineers chose how much to use the agents, the authors read these slopes as associations, not causal effects.

## Why spend spreads so widely

Spend varies far more between engineers than output explains, and the output metrics leave most of the spread unexplained. Within every weekly-commit quintile, the 90th percentile of spend is 39 to 240 times the 10th, so commit counts alone don't narrow the gap. The authors measure commits by author date and track bug-linked commits and issue references alongside them.

The authors compare output metrics with the between-person and within-person parts of the spread, using cross-validation on held-out people and held-out weeks. Commits and lines changed alone explain 38% between people, so bug-linked commits and commit-days add nothing, at −2 points. Adding issue-tracker activity does not help either, while the pre-period work mix adds 3 points.

Even with all four activity metrics, the 90th-percentile person-week still uses 58 times the tokens of the 10th.

Person identity accounts for 79% of the deviance in weekly token use in the sample. Which engineers spend the most stays stable over the five weeks, while who has the highest cost per commit does not. Engineers' pre-period work mix and the 79% person share therefore point to a stable trait of the engineer, not to weekly output.

## How much spend sits outside output

The telemetry doesn't link agent calls to repository artifacts, so the authors can't identify spend outside output directly.

The floor is the lower bound, and it counts only the unambiguous case: tokens spent in person-weeks with no commits. All 207 no-commit weeks together account for 4% of tokens, and the floor depends on the time unit, at 25% for single days and 1% for two-week periods.

The curve estimate is the upper bound, and it predicts spend in a week with no output from how spend varies with output. The authors fit four shapes for the curve: raw counts, square root, log(1 + x), and a linear spline in log(1 + x), each with s(0) = 0. They sum the predicted spend for a week with no output over person-weeks and divide by total spend to get the share.

Raw counts put 89% \[79%, 97%\] of all tokens at zero output, while the square root gives 63%. The log(1 + x) shape gives 42% \[33%, 51%\], and the spline gives 39% \[31%, 46%\], and the authors trust the last two. Spend rises steeply over the first few commits and then flattens, a pattern an exponential-in-counts curve can't capture.

The heaviest third of users spends 79% of all tokens, and its share not tied to output is 36%. The middle and lightest thirds have shares of 51% and 52%, so the heaviest users carry the lowest share.

## What engineers say agents are for

The survey covered 197 evaluations of the two coding agents by 184 technical respondents, which the paper says account for 99.8% of metered tokens. Coding was named in 63% of evaluations, while at least one non-coding activity was named in 89% overall. Among the 100 evaluations of assigned tools, the non-coding share was 83%. The most common non-coding uses were processing and analyzing data (52%), brainstorming (49%), and research on a topic (44%).

Planning work (39%), learning (28%), and writing (23%) followed, as shown in Figure 7.

In 91% of the 167 past-week evaluations, respondents said the tool saved them time that week. The median saving was 10 hours, with an interquartile range of 5 to 20. Hours saved are a self-report, and the paper treats a negative value as time the tool cost. In the regression on all seven predictors, the count of non-coding activity types has a coefficient of 0.24 \[0.06, 0.43\].

The model uses 134 evaluations and reaches an R² of 0.43. Respondents who reported enabled work also chose more activities and named more colleagues, so the paper cannot separate the three.

In their free-text answers, respondents describe the agent's main value as speed on usual tasks (31% of 74 answers) and work in unfamiliar code or domains (30%). Of 44 descriptions of work done only because the agent existed, 36% describe unfamiliar codebases or stacks. On what cost time, 49% of the 67 substantive answers describe wrong or low-quality output.

The cost of verifying output appears in 18% of those answers, and it sometimes exceeds the time saved.

![Figure 9: Thematic coding of the free-text answers on what cost time and on enabled work. Figure 13 in SM B shows the other two questions](https://refivu.com/papers/39d25821-8637-434b-a777-c0a0904348ea/figures/figure-5f7600eadd1669b8b3038ec1e6e244d5.png?thumb=512)

**Fig. 9** . Thematic coding of the free-text answers on what cost time and on enabled work. Figure 13 in SM B shows the other two questions.

[Original paper](https://arxiv.org/abs/2611.13396v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

The hours question misses two costs: cognitive load from working with agents and time spent on colleagues' AI-generated material. Among technical agent users, 31% report higher cognitive load from AI agents, while 51% report lower. Cognitive load is nearly uncorrelated with hours saved (ρ = 0.11), compared with 0.57 for overall productivity.

That handling cost a mean of 1.6 hours a week \[1.2, 2.1\].

## What to do with a spend count

Dividing spend by commits makes an engineer look more efficient in busier weeks, because tokens per commit fall as commits rise. A week with twice an engineer's usual commits has about 1.2 times the tokens, so tokens per commit come out 40% lower. The ratio also ranks engineers consistently overall, with projected reliability 0.80, but it doesn't hold at the top.

A company that divides tokens by commits counts agent work that ends without a commit as cost without return. Companies that want to judge efficiency should compare spend on comparable tasks, which needs task records.

A token threshold for adoption depends on the threshold chosen, and Google and Steve Yegge's numbers both can be right.

The authors recommend keeping spend for resource accounting and judging agent-assisted work by evidence about tasks and outcomes. Analyses that use spend as exposure should separate within-engineer variation from between-engineer variation.

## Limitations

Every estimate is an association, because engineers chose how much to use the agents. The within-engineer slope assumes that spend and the commits made with it fall in the same week. Five weeks per engineer is too short to settle whether the between-minus-within gap is real.

The study covers one company, with about 2,600 employees and 404 engineers in the panel. The gateway meters only coding-agent calls, so chatbots and other assistants aren't in the telemetry. The gateway token data covers only the last weeks of the commit window, so the analysis uses five complete weeks.

Commit counts miss code quality and work that doesn't change the code, such as review and design. The authors considered pull requests but lacked the data, so they couldn't use them as output. The survey hours are one-week self-reports, and survey responses can't be linked to individual telemetry or repository data.

## Paper info

- **Authors**: Shyam Agarwal, Olga Lvova, Agnia Sergeyuk, Anastasiia Serova, Timofey Bryksin, Thomas Zimmermann, Bogdan Vasilescu
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-10
- **Added**: 2026-11-11
- **Updated**: 2026-11-10
- **Version**: v1
- **arXiv**: 2611.13396
- **Category**: cs.SE · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.13396v1) · [PDF ↗](https://arxiv.org/pdf/2611.13396v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Organizations use engineers' token spend to monitor AI adoption, set budgets, and measure productivity, but the metric's relationship with engineering output is unclear. We link five weeks of token usage in coding agents to the commits of 404 engineers at JetBrains, and analyze a company survey of 412 employees. We find that token spend varied mostly between engineers, and which engineers spent the most stayed largely the same over the five weeks. Among weeks with similar commit counts, the 90th percentile of spend was 39 to 240 times the 10th. Within an engineer, doubling spend was associated with about 10% more commits. Available work metrics explained 38% of the variation in spend between engineers and 13% of the week-to-week variation within an engineer. In the survey, respondents in technical roles reported in nearly nine of ten agent evaluations using agents for tasks beyond coding, such as analysis, research, and planning. Token spend therefore measures how much engineers use agents across many kinds of work and not the outcome and value of that work. We recommend using token spend at most for resource accounting, and evaluating agent-assisted work with evidence about tasks and outcomes.

## Quote from the paper

Shyam Agarwal, Olga Lvova, Agnia Sergeyuk, Anastasiia Serova, Timofey Bryksin, Thomas Zimmermann, Bogdan Vasilescu (2026). The AI Era's Lines of Code? A Case Study on What an Engineer's Token Spend Measures. arXiv:2611.13396v1. https://arxiv.org/abs/2611.13396v1

**BibTeX**

```
@misc{agarwal2026lines,
  title = {{The AI Era's Lines of Code? A Case Study on What an Engineer's Token Spend Measures}},
  author = {Shyam Agarwal and Olga Lvova and Agnia Sergeyuk and Anastasiia Serova and Timofey Bryksin and Thomas Zimmermann and Bogdan Vasilescu},
  year = {2026},
  eprint = {2611.13396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.13396v1}
}
```

## Other paper commentary

- [Counting Under Disagreement: Dollar-Weighted Measurement, Selective Machine Labelling and Budgeted Human Review from Disagreeing AI Readers of Administrative Text](https://refivu.com/en/papers/af261e08-56f4-4c82-95e0-57ec1ecf0304-counting-under-disagreement-dollar-weighted-measurement.md)
- [Near-Optimal Sample Complexity of Deterministic Agnostic PAC Learning](https://refivu.com/en/papers/39c5e4f6-4a92-4c1d-b07b-0e6ecad3cdc4-near-optimal-sample-complexity-of-deterministic-agnostic-pac.md)
- [RadRef: A Reference-Free Metric for Radiology Report Generation](https://refivu.com/en/papers/c021bdd5-9b56-4971-9197-cb24eda10255-radref-a-reference-free-metric-for-radiology-report.md)
- [Programming Prescience: Issues in Human Construction of Forecasting Bots](https://refivu.com/en/papers/34469e6b-3cef-4c1e-b57c-1b0537e2c995-programming-prescience-issues-in-human-construction-of.md)
- [Hidden Tails: Certifying Tail-Risk Claims under Selective Labels](https://refivu.com/en/papers/75cb6ab3-f9c1-4466-b415-44269638d62a-hidden-tails-certifying-tail-risk-claims-under-selective.md)
- [Agnostic Marginal-Nonuniform Learning](https://refivu.com/en/papers/016f1038-e984-4177-99de-fa3e2feb1567-agnostic-marginal-nonuniform-learning.md)
- [AdjointFlow: Accelerating Scientific Inverse Problems with Physics-Based Transport](https://refivu.com/en/papers/6b166ed0-3149-42f2-a941-1390dbf83385-adjointflow-accelerating-scientific-inverse-problems-with.md)
- [Robust Flow Matching under Target Corruption and Label Noise](https://refivu.com/en/papers/eb3184e2-769b-4ebb-9354-c5ce375a84f1-robust-flow-matching-under-target-corruption-and-label.md)
- [Wrong the Same Way: Cross-Prompt Sharing Both Suppresses and Amplifies Reward Hacking in RLVR](https://refivu.com/en/papers/5606ee9f-72c8-4ff9-a0b8-f8b75cb81222-wrong-the-same-way-cross-prompt-sharing-both.md)
- [Which Successes Make Good References? Action-Sequence Alignment for Multi-Turn On-Policy Distillation](https://refivu.com/en/papers/6490fb8a-d9fa-46f8-ba9c-bafe7b1c04c5-which-successes-make-good-references-action-sequence.md)
- [How Hyperbolic Are Hyperbolic Vision-Language Models?](https://refivu.com/en/papers/91c1a743-4463-4d27-b5a6-5fff75f9b206-how-hyperbolic-are-hyperbolic-vision-language-models.md)
- [Evaluating Compositional Generalization in Transformers: The Role of Composition Equivalence and Module Coverage](https://refivu.com/en/papers/51035e38-2ad0-44b9-9a53-5f7b0e4038b4-evaluating-compositional-generalization-in-transformers-the.md)

## Terms in this paper

- [cluster bootstrap](https://refivu.com/en/terms/4643ff5f8e99-cluster-bootstrap)
- [coding agent](https://refivu.com/en/terms/e4b553e08438-coding-agent)
- [floor](https://refivu.com/en/terms/f6e91ec9b1a6-floor)
- [Poisson regression](https://refivu.com/en/terms/1cb31c5631a5-poisson-regression)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/39d25821-8637-434b-a777-c0a0904348ea-the-ai-era-s-lines-of-code-a)
