The Question Behind ROI
“Did the assistant make developers faster?” is too vague to measure. A serious evaluation asks:
For which task, under which workflow, did the intervention increase successful delivery without unacceptable quality, security, privacy, learning, or operational cost?
An assistant may reduce typing while increasing review, debugging, context switching, or dependency risk. A larger pull-request count may reflect smaller changes rather than more value. ROI is an empirical claim about a workload, not a property of a product name.
Treat Published Numbers as Context
Vendor experiments, internal reports, field studies, and independent controlled trials answer different questions. Before comparing two numbers, record:
| Dimension | Questions |
|---|---|
| outcome | time, accepted patch, merged change, issue resolution, or user value? |
| task | toy task, unfamiliar repository, maintenance, feature, or incident? |
| participants | experience, selection, training, and opt-in effects? |
| comparator | no tool, another tool, or historical baseline? |
| protocol | randomization, observation window, exclusions, and retries? |
| quality | tests, review, defects, rollback, and rework? |
| scope | individual, team, repository, or organization? |
| uncertainty | confidence interval, missing data, and sensitivity? |
A controlled result on a narrow task does not predict a company-wide result. An internal report may be useful context while still being subject to selection and reporting bias. Do not turn heterogeneous studies into a tool leaderboard.
METR's July 2025 randomized study is a useful example of why the boundary matters. Sixteen experienced open-source developers working on 246 tasks in repositories they knew well took an estimated 19% longer with the early-2025 tools available to them. METR now labels that result out of date and says it does not reflect the current impact of AI models on this population.
The February 2026 follow-up did not replace the slowdown with a trustworthy universal speedup. Its raw estimates moved toward faster completion, but METR concluded that the new estimate was unreliable: developers who valued AI were less willing to enter an AI-disallowed condition, 30% to 50% reported withholding some tasks for the same reason, the pay rate changed, and concurrent agents made task time hard to measure. The correct lesson is not “AI slows developers” or “AI now speeds everyone up.” It is that tool generation, developer selection, task selection, quality, and time-accounting rules can change the estimand.
Build a Baseline Before a Pilot
Choose a bounded workload such as bug fixes, dependency upgrades, test writing, documentation changes, or a particular service. Define inclusion and exclusion rules, then record a baseline long enough to contain ordinary variation.
Capture:
- active human time, agent wall time, queue time, time to first usable patch, and time to merge;
- successful task rate and abandonment;
- review rounds, review minutes, and rework;
- test, security, and defect outcomes;
- rollback or post-release incidents;
- developer interruption and satisfaction;
- model, tool, repository, and policy versions.
Do not require a fixed number of weeks or tasks. Use power analysis or a practical precision target appropriate to the workload, and report when the sample cannot support a conclusion.
Collect append-only events from issue assignment, agent runs, commits, CI, review, merge, deployment, and incident systems. Do not reconstruct all effort from pull-request timestamps: a developer may supervise several agents, wait on CI, or switch to unrelated work. Declare how overlapping work is allocated before analysis.
An Outcome Matrix
| Layer | Example measure | What it does not prove |
|---|---|---|
| delivery | successful task per engineer-hour | long-term product value |
| flow | cycle time, queue time, review time | code correctness by itself |
| quality | tests, escaped defects, rework, rollback | maintainability in every future release |
| security | secret findings, dependency risk, policy violations | absence of unknown vulnerabilities |
| developer experience | interruption, cognitive load, satisfaction | customer impact |
| economics | cost per successful task | opportunity cost without assumptions |
| learning | explanation quality, independent follow-up | durable skill growth |
Keep numerator and denominator visible. “Code generated” and “suggestions accepted” are activity signals, not outcomes.
A Defensible ROI Model
Separate measured quantities from assumptions:
package main
import (
"errors"
"fmt"
)
type ROIInput struct {
IncrementalSuccessfulOutcomes float64
ValuePerOutcome float64
AssistantCost float64
TrainingCost float64
ReviewCost float64
ReworkCost float64
SecurityCost float64
MigrationCost float64
}
type ROIResult struct {
IncrementalValue float64
NetValue float64
ROI float64
}
func calculateROI(input ROIInput) (ROIResult, error) {
value := input.IncrementalSuccessfulOutcomes * input.ValuePerOutcome
investment := input.AssistantCost + input.TrainingCost +
input.ReviewCost + input.ReworkCost +
input.SecurityCost + input.MigrationCost
if investment <= 0 {
return ROIResult{}, errors.New("investment must be positive")
}
return ROIResult{
IncrementalValue: value,
NetValue: value - investment,
ROI: (value - investment) / investment,
}, nil
}
func main() {
result, err := calculateROI(ROIInput{
IncrementalSuccessfulOutcomes: 18,
ValuePerOutcome: 240,
AssistantCost: 900,
TrainingCost: 700,
ReviewCost: 850,
ReworkCost: 500,
SecurityCost: 600,
MigrationCost: 300,
})
if err != nil {
panic(err)
}
fmt.Printf("net=%.2f roi=%.2f\n", result.NetValue, result.ROI)
}
This is a structural example, not a claim about currency, salaries, or savings. ValuePerOutcome needs a documented business assumption, and IncrementalSuccessfulOutcomes must be estimated against the declared comparator. Run sensitivity analysis across plausible ranges and include costs that are easy to hide:
- subscriptions and inference;
- onboarding and policy work;
- review and rework;
- tests, security review, and incident response;
- provider migration and lock-in;
- developer learning and reduced independent practice;
- privacy, licensing, and data processing obligations.
Report cost per successful, reviewed, accepted outcome rather than cost per generated line.
Design the Pilot
- Pre-register the question. Example: does the intervention reduce time for a defined maintenance task without increasing review rework?
- Select comparable work. Stratify by language, repository familiarity, change size, and risk.
- Declare treatment. Record model, tool version, context files, permissions, prompts, and allowed actions.
- Choose a comparator. Randomized assignment is strongest; a matched or interrupted time-series design can be useful when randomization is impossible.
- Define time accounting. Separate active human effort, unattended agent runtime, waiting, and concurrent work.
- Keep quality gates constant. Tests, code review, security scanning, and merge approval must not be weakened for the treatment group.
- Collect failures. Record abandonment, hallucinated APIs, insecure patches, duplicate work, and rollback.
- Analyze slices. Report uncertainty and heterogeneity rather than only an average.
- Decide with a reversible gate. Expand, adjust, pause, or roll back based on predeclared evidence.
Do not hide a negative result. A tool that helps unfamiliar migrations but slows routine edits has a useful, narrower adoption boundary.
Acceptance Is Not Quality
Suggestion acceptance can be informative, but it is confounded by:
- interface defaults and auto-commit behavior;
- developer review habits;
- task difficulty;
- code ownership;
- later rewrites and defect discovery.
Treat it as a diagnostic signal. Pair it with tests, review rework, escaped defects, and successful task completion. Never define a “healthy” acceptance interval without workload evidence.
Adoption Is a Socio-Technical Change
Repository and Data Policy
Classify repositories and data before enabling a provider. Decide whether prompts, code, logs, or dependencies may leave the environment; document retention, training use, residency, deletion, and incident notification. Redact secrets and personal data at the producer.
Capability Boundaries
Coding agents can read files, run commands, change dependencies, call services, and create external side effects. Start with least privilege:
- read-only by default;
- isolated worktrees or sandboxes;
- allowlisted commands and network egress;
- pinned dependencies and reproducible builds;
- human approval for merges, releases, credential changes, and external writes;
- auditable identity and tenant context.
Prompt instructions, generated plans, tool annotations, or a model refusal are not authorization.
Review and Ownership
The author remains responsible for understanding and testing the change. Require a meaningful diff, tests, dependency and license checks, secret scanning, and review appropriate to risk. Avoid a workflow where junior engineers copy unknown code without being able to explain its behavior.
Team Learning
Share failed cases and effective patterns, not only success stories. Measure whether engineers can maintain, debug, and modify the resulting code without the assistant. Learning is an outcome to observe, not a reason to ban or mandate a tool.
Selecting a Tool Without a Sales Ranking
Create a comparison sheet for the actual workload:
| Criterion | Evidence to collect |
|---|---|
| coding quality | blinded task results, tests, review outcomes |
| context handling | repository slices, retrieval errors, stale context |
| agent control | permissions, sandbox, cancellation, audit events |
| privacy | retention, training terms, residency, deletion |
| operations | latency, quotas, outages, version pinning |
| economics | subscription, inference, review, migration cost |
| exit cost | export, workflow portability, lock-in |
Pricing and capabilities change. Verify the current terms directly and record the date and plan instead of embedding a permanent price table in a methodology article.
Common Failure Modes
- comparing vendor claims measured on incompatible tasks;
- treating LOC, acceptance, or PR count as customer value;
- assuming individual speed becomes organization throughput;
- removing review or security gates to demonstrate speed;
- giving an agent broad shell, network, or credential access;
- sending source code or secrets to a provider without a data policy;
- ignoring rework, debugging, queue, and incident costs;
- forcing a single tool or workflow on every repository;
- using a short pilot to claim durable skill or productivity gains;
- publishing a point estimate without uncertainty or failed cases.
Decision Record Template
Question:
Workload and risk:
Baseline window and comparator:
Treatment version and permissions:
Primary outcome and denominator:
Quality/security guardrails:
Costs included:
Uncertainty and slice plan:
Expansion, pause, and rollback criteria:
Owner and review date:
This record makes a pilot auditable and prevents a favorable anecdote from becoming policy.
Summary
AI coding ROI is not a universal percentage and should not be inferred from a product label. Measure successful outcomes on a declared workload, preserve quality and security gates, count review and rework, account for privacy and learning costs, and report uncertainty. Adopt the capability where evidence supports it, keep permissions narrow, and make the decision reversible.
Primary Sources
- METR: Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity
- METR: We Are Changing Our Developer Productivity Experiment Design
- SPACE Framework for Developer Productivity
- DORA: 2025 State of AI-Assisted Software Development
- NIST Secure Software Development Framework
- NIST AI Risk Management Framework