NeoDevEx case studies

Cost per line of code · October 2026

Our agent writes 100 lines of working, tested code for about 12 cents.

We gave our agent five coding jobs, from a two-line bug fix to a feature spread over three new files, and ran each one three times on Gemini 4 Argon, our default AI model. We counted every line it changed with git, checked every result with tests the agent never saw, and read the exact cost from the AI provider.

What we found

Where to be careful

Bottom line: new code costs cents, not dollars. Price it per job, because a line count says little about what the work was worth.

Full technical write-up, for engineers

Module 08 · Lines of code vs cost · 15 runs, 2026-10-29

1,444 changed lines for $1.70: what each line of agent-written code costs.

Five coding tasks of increasing size, three runs each, on Gemini 4 Argon with medium thinking, the model and settings the app ships. Lines come from git diff --numstat against the starting commit; cost and tokens are what the provider reported. Every run passed hidden checks the agent never saw.

$0.118AI cost per 100 lines changed, all tasks
$0.092per 100 lines on the three feature tasks
1,370tokens processed per line changed
63%of added lines are tests (909 of 1,435)

Results by task, median of 3 runs

TaskPassedLines addedSource / testsCostNCUCost per 100 linesModel callsTime
L1 · Fix two bugs3/32 (+3 removed)2 / 0$0.0570.14$1.26453 s
L2 · Add one function with a test3/3195 / 14$0.0720.18$0.44650 s
L3 · Add a coupons module3/37835 / 43$0.1480.37$0.1711175 s
L4 · Add an inventory class3/320364 / 138$0.1170.29$0.067118 s
L5 · Receipt feature across three modules3/317567 / 108$0.1470.37$0.099164 s
All 15 runs (totals)15/151,435 (+9 removed)526 / 909$1.704.24$0.12–29 min

Cost per 100 lines is each task's total cost over its total lines changed (added + removed) across its three runs. NCU is cost ÷ $0.40, the metered work in one Neo Credit Unit. Runs of the same task differ: L5 wrote 131 to 219 lines, L3 67 to 104.

Cost does not grow with lines

Median cost per task against median lines added. A hundred times more code cost about twice as much.

L1 · 2 lines$0.057
L2 · 19 lines$0.072
L3 · 78 lines$0.148
L5 · 175 lines$0.147
L4 · 203 lines$0.117

An agent run is a loop of model calls, and every call resends the instructions, the files read so far and the conversation. Across the 15 runs the model processed 1.98M tokens, of which only 60,582 (3%) were output, thinking included. The cost follows how many steps the agent takes and how much it reads, so a small fix that needs a test run to confirm still pays for several steps.

In Neo Credit Units

  • About 340 changed lines per NCU across all tasks, about 435 on feature work (L3–L5), in this codebase.
  • At the $1.60–2.00 NCU price, that is roughly $0.47–0.59 per 100 lines to a customer.
  • An everyday coding job here used 0.14–0.37 NCU.

How we measured

  • The harness (run_lines.py) runs each task with OpenHands SDK 1.42.1, the version the agent-server ships, building the agent from the frozen copy of the settings the app sends (the same copy as the chat study: working rules v5, output style, skills). Model gemini/gemini-4-argon, reasoning effort medium. The browser tool was off.
  • Each run starts from a fresh copy of a small JavaScript cart service (45 lines of source and tests, two planted bugs) committed to git. After the run every change is staged and counted with git diff --cached --numstat; node_modules, lockfiles and .gitignore are excluded, and source (src/) and test (test/) lines are counted separately. Blank lines and comments count as lines.
  • Each task has a hidden check written before the runs: the agent's own tests must pass, and a separate script calls the new code with inputs the agent was not shown (for example a coupon over the 90% limit, a reservation that must change nothing when one line lacks stock, a receipt total of $58.57).
  • Token counts and cost are what Google reported for each call, summed by the SDK.

What could skew this

  • A small codebase. In a real repository the agent reads more files before writing, which raises the cost per line.
  • Three runs per task. Lines and cost vary run to run; we report medians and totals.
  • Lines measure output, not value. The agent decides how much test code to write, and it wrote more tests than code.

Raw data