← All articles

Cost per solved task: what a cheap coding agent really costs on Nim

Budget per solved task, not per attempt: with our verified skills, a solved Nim task cost about $0.05 instead of $0.21.

The same low-cost model passed 18 of 20 runs on four hard Nim tasks with our verified skills and 3 of 20 without. Each skill-guided attempt cost more, and the solved tasks more than paid for it.

A pre-registered study, and our first, smaller one. The newer results on two models are on the benchmarks page.

18 of 20 with the skill, 3 of 20 without

We gave a low-cost model, DeepSeek V4.1 Flash, four hard Nim tasks and ran each one five times with our verified skill and five times without. Every run was blind and sandboxed, scored by deterministic checks, with the plan fixed before the first run.

Same model, 20 trials per armVerified skillNo skill
Runs passed18/203/20
Tokens per attempt3.1M1.6M
API cost per attempt$0.048$0.028
API cost per solved task$0.054$0.206

Why cost per attempt misleads

With the skill loaded, the agent read more, checked its own output more often and made more tool calls. That doubled the tokens per attempt. Compare agents per attempt and the unguided one wins, but only because most of its attempts stopped early with a wrong answer.

Look at the totals instead. Twenty skill-guided attempts cost $0.97 and produced 18 solutions. Twenty unguided attempts cost $0.62 and produced 3. On three of the four tasks the unguided agent never passed in five tries, so its cost per solved task there is not higher; it is undefined. You can keep paying for attempts and still have nothing to merge.

The API bill is a few cents either way. The expensive part is an engineer reviewing a confident, plausible result that is wrong. The skill cut that from 17 results in 20 to 2 in 20.

The four tasks

Each task is work where an agent can produce something that compiles and looks finished but fails a check that matters in production. Task contents stay private so that models cannot be trained to the test.

Task (5 runs per arm)Verified skillNo skillFisher pCost per solve
Bug report with a reproducer for an intermittent crash5/50/50.008$0.028 / –
C-to-Nim port of a tool with a latent bug5/50/50.008$0.060 / –
Error handling across modules and a teammate’s API3/50/50.17$0.055 / –
Manually managed container with lifecycle hooks5/53/50.44$0.074 / $0.108
Total18/203/20$0.054 / $0.206

Cost per solve is skill / no skill; a dash means no run solved the task. The bug report and the port are five passes against zero, each significant on its own. Error handling, 3/5 against 0/5, is a large gap that five runs cannot confirm alone. The design rule the unguided runs missed is in stop your agent validating trusted data twice.

“Just use a bigger model?”

We put the question to OpenAI’s frontier model. GPT-6.1 Sol, at maximum reasoning effort, ran the same four Nim tasks three times with the verified skill and three times without, blind and sandboxed, under the same checks.

GPT-6.1 Sol (3 runs per arm)Verified skillNo skill
Bug report with a reproducer1/10/3
C-to-Nim port2/30/3
Error handling across modules3/30/3
Container with lifecycle hooks3/31/3
Total9/101/12

Two skill runs on the bug report were blocked by the provider’s content filter, which flagged the crash reproducer as a possible security risk, and were not scored.

Without the skill, the frontier model passed 1 of 12. On the container task it reused a moved-from value in 2 of 3 runs, the exact bug behind why a moved-from object segfaults on reuse. More reasoning does not surface Nim-specific rules a model never learned, and a frontier model bills more on every call (list prices). The skill puts those rules in front of the agent, so a cheap model gets them right.

Where the skill didn’t pay

On the container task the model already copes: 3 of 5 without the skill, 5 of 5 with it. That gain is not significant, and each skill-guided attempt cost about 30% more. Cost per solved task was still lower, but we would not sell a skill on that margin. Every line of guidance costs tokens on every run, so when a model starts solving a task unaided, we prune the guidance for it.

Method

How the study ran

Tasks, arms, metrics and scorers were fixed in writing before the first run. Each trial ran blind in a fresh sandbox; a pass meant every deterministic check passed. Costs are recomputed from logged token counts at the provider’s off-peak API rates; at peak rates every dollar figure doubles and the ratios stay the same. The tasks were picked because they had separated skill from no skill before, so the gaps are a best case for hard Nim work, not an average. The frontier check ran three times per arm on one frontier model. Each task ran five times per arm, so treat the per-task rates as small samples.

For the kind of Nim code that compiles, passes a quick test and is still wrong, see why a moved-from object segfaults on reuse.