Founders

When to Replace a Human Coder with a Model: A Decision Rule

Antonio Evans8 min read

A split desk scene: on the left a developer writing code at a terminal with a cost meter; on the right the same task handled by a model with a separate audit checklist clipped to the monitor.
Key points

Key points

  1. 1Move a task to model-plus-audit when the fully loaded human cost is more than roughly three times the model cost plus audit time.
  2. 2That threshold only holds when a test, linter or type checker catches most failures and a bad output is stopped before production.
  3. 3Estimate both sides in the same unit (loaded engineer hours per completed task), then compare the ratio, and watch which component moves the decision.
  4. 4A model update resets your evidence: re-run the audit sample, the failure taxonomy and the escape-rate baseline before widening scope.

The rule, stated precisely

Most teams argue about whether a model can do a task. That is the wrong question. The right question is whether model plus human audit beats a human doing the whole thing, once you price in the failures that slip through.

Move a task to model-plus-audit when all three of these hold:

  1. Cost ratio. Fully loaded human cost of the task is more than roughly three times the model cost plus audit time. The buffer covers rework you have not measured yet and the decay in audit attention as volume rises.
  2. Detection. A test, linter, type check, snapshot or schema validation catches the majority of failures automatically. If a bad output can only be caught by a human reading carefully, you are not auditing, you are peer reviewing at machine speed.
  3. Containment. A bad output is stopped before production or a customer. Staging, feature flags, canaries and review gates count. A prompt writing straight to a production database does not.

If any one fails, keep a human on it, or shrink the task until all three hold. Shrinking is usually better: "migrate the module" fails containment, but "generate the migration for one table, run it against a staging copy, diff the schema" passes.

The ratio is deliberately conservative because the human side is routinely understated. Practitioners studying code review report that developers at large organizations spend between ten and fifteen percent of working hours reading and commenting on others' code, and that review latency from pull request to actionable feedback routinely stretches past twenty-four hours (Monperrus, The End of Code Review). Those are the hours you must count.

Pricing the human side honestly

Most failed calculations get the human number wrong in the same direction: salary divided by working hours, then stop.

Fully loaded cost per engineering hour is wage plus benefits plus the share of the manager, tooling, recruiting fee amortized over tenure, and the onboarding ramp. A defensible method is to take the team's fully loaded annual cost and divide by hours actually spent producing code, not by 2,080.

Then add coordination cost that never appears on a time sheet. A model that drafts a patch in two minutes and a reviewer who looks at it four hours later has a cycle time of four hours. If delivery depends on same-day merges, the bottleneck moved rather than disappeared.

Two corrections to apply:

  • Count audit time as production time. A human writing a function and a human auditing a generated function are both doing the task. If the audit takes 40 percent of the human build time, model-plus-audit cost is model cost plus 0.4 of the human figure.
  • Count rework from accepted bad output. Use your defect escape rate, the share of defects found in production versus all defects found across the lifecycle (Opsera on defect escape rate), multiplied by a rough cost per escaped defect. A metric like that is most useful interpreted in context alongside other quality signals rather than as a standalone verdict (Umbrex on defect rate per release).

Pricing the model side honestly

Three components matter, and only one of them is the one teams measure.

Inference cost per task, not per token. A task that takes three attempts, a retry after a failed test and a long context window costs several times a single successful call. Log spend per task identifier.

The audit. A useful audit is not "read the diff." It is a checklist with a pass condition, and it costs time to run. Time twenty real audits and take the median.

The harness. Tests, fixtures, sandbox environments and CI minutes belong on the model side, because without them the audit is unreliable and the calculation collapses. If you must build a test suite to move the task, that build cost is a first-period cost, not an amortized footnote.

A worked example. Take a task a mid-level engineer does in 6 hours once fully loaded (reading context, writing, self-testing, opening a reviewable change). Measured audit time for a model's output is 1.5 hours. Inference and harness cost works out to 0.4 engineer-hours equivalent.

LineHuman onlyModel plus audit
Build6.0 h0.4 h (inference and harness)
Audit or self-review0.5 h1.5 h
Expected rework from bad output0.6 h0.9 h
Total7.1 h2.8 h

The ratio is 7.1 / 2.8, about 2.5x. Below the threshold, so the rule says keep a human or shrink the task. Now drop audit time to 1.0 hour once the reviewer has a checklist and a fast suite: the total becomes 2.3 hours and the ratio crosses 3x.

That is the insight the first search result will not give you. The threshold is usually crossed by making the audit cheaper and detection stronger, not by waiting for a better model.

The evidence you need before you switch

You cannot run the calculation on intuition. Four measurements get you there in a week without a formal study.

  • Baseline human time. Time ten real instances from pickup to mergeable change. Use the median.
  • Audit time under a checklist. Write the checklist first, then time twenty audits. A checklist without a pass condition is not an audit.
  • Detection rate. Of the outputs your audit rejected, how many would the tests have caught? This tells you whether the automated gate or the human is doing the work.
  • Escape baseline. Your current defect escape rate in the task area, measured before the switch.

The audit checklist benefits from the same loop human evaluators use. The recommended method is to have two or three experts judge a first group together, writing down decision rules, then iterate: rate independently, compute agreement, discuss disagreements, update the rules until agreement reaches a target such as Krippendorff's alpha above 0.8 (LLM Guidelines for Software Engineering on human validation). A two-person team does not need the statistics, but the loop is exactly what makes an audit reliable.

Agreement metrics exist because raters agree by chance more often than intuition suggests; Cohen's kappa corrects for that (McHugh, the kappa statistic). If two auditors agree 95 percent of the time on a heavily skewed pass/fail split, chance agreement is doing most of the work (Wikipedia on inter-rater reliability). One caution from the same literature: high agreement between automated judges can reflect shared bias rather than correctness, so a sample must still be validated against humans before automated judgment substitutes for human work (LLM Guidelines). A second model is a fast pre-filter, not the audit.

A worked migration: which subtasks cross the line

Leads ask the question at the wrong granularity. "Should we use a model for backend work" has no answer. The decision applies per task type.

SubtaskHuman hoursAudit hoursDetectionContainmentRatioDecision
Scaffold a CRUD endpoint3.00.5StrongStrong~4.5xMove to model plus audit
Write unit tests for an existing module4.00.7MediumStrong~3.5xMove, with mutation gate
Fix a failing test in unfamiliar code2.51.5StrongStrong~1.4xKeep human
Design a schema migration5.03.0WeakWeak~1.5xKeep human
Rename a symbol across the repo1.00.2StrongStrong~3.5xMove to model plus audit

Two rows deserve comment. The failing-test fix stays with a human not because models cannot patch it but because audit time approaches human time: the reviewer must reconstruct the mental model the model lacked. The migration stays because detection and containment are both weak at once.

This is also the honest answer to the claim that agents make human review redundant for routine changes (Monperrus). The argument is strongest where detection is automated and weakest where the stakes are highest.

For teams generating patches faster than they can review, the fix is a pipeline that separates detection from judgment. Automated reviewers that post severity-ranked inline findings exist, and one vendor's internal testing reported the share of pull requests receiving substantive review comments rising from 16 percent to 54 percent, with fewer than 1 percent of findings marked incorrect (tessl.io on AI code review agents). Read that as a vendor's own testing, not an independent result, and use it for what it is: evidence that a cheap first pass raises coverage before a human spends minutes. Coverage is not correctness, and false assurance is the failure mode to design against (Codacy on the PR bottleneck).

What to re-check after a model update

A model update resets your evidence. Behavior changes are not always improvements for your task, and they are not always in the release notes. The model-side cost moves too, since a new version can shift both price and tokens per task.

Re-run this list before widening a task's scope or after any model or provider change.

  • The audit sample. Re-run the same twenty audited outputs against the new version and compare rejection reasons. More style rejections and fewer logic rejections means the checklist needs updating.
  • Inter-auditor agreement. Recompute agreement on the new sample. Falling agreement means the rules no longer describe the output.
  • Detection rate. Recompute how many rejected outputs your tests would have caught. A drop means your automated gate is thinner than you assumed.
  • Escape rate. Compare production defects in the task area before and after. A rise means the ratio was optimistic; revert until you know why.
  • Cost per task. Re-measure inference spend, retries and harness runtime. A cheaper token price with more retries can cost more.
  • Prompt assumptions. Any prompt encoding "the model tends to do X" is an unverified claim. Re-verify the ones the checklist leans on.
  • Tool permissions. If the update touches tool use or file access, re-check what the agent can reach. More reach means more places to fail.

Keep the audit in place for at least as long as it takes to gather the new sample. Removing it because an update feels better is how teams find a regression in production.

If you switch between several models or providers, re-checking becomes the dominant cost. One endpoint and one key for text, image, video and embedding models makes the spend comparison mechanical instead of a per-vendor integration project; Quanta Inference is OpenAI-compatible and prepaid in US dollars, so the cost-per-task number in your spreadsheet maps to one invoice.

Where the rule breaks down

Four failure modes to know so you do not apply the rule mechanically.

Unmeasured rework. If you cannot estimate the cost of escaped defects in the task area, the ratio is fiction. Use a conservative multiplier over no multiplier.

Audit fatigue. Audit time is not linear. The tenth output in an hour gets less attention than the first. Rotate auditors, cap batch size, keep the checklist short enough to finish in one sitting.

Coordination tax on knowledge. Review also transfers knowledge and builds shared awareness of the codebase, and those goals do not vanish when the writer is a model (Monperrus). If your team learns the system by reading each other's code, an all-model pipeline starves that channel. Schedule design walkthroughs to replace it.

Scope creep after a good week. One clean batch is not a detection rate. The inputs are medians over a sample, so re-scope only when the sample says so. Counting how often a theme appears is useful, but frequency is not importance and the denominator must be reported (skimle on quantifying qualitative data).

FAQ

FAQ

What is the 3x threshold actually protecting against?

It is a buffer for costs you have not measured: rework from accepted bad outputs, context switching, and the decline in audit attention as volume rises. At 1.5x you are likely already losing on quality. At 3x the margin absorbs some error in your estimates. Teams with strong automated detection and tight containment can lower it; teams without those gates should raise it.

Why not just compare token price to hourly rate?

Because token price ignores retries, context length, harness runtime and the audit, while hourly rate ignores fully loaded cost and review latency. Both naive numbers are wrong in different directions. Estimate cost per completed task in loaded engineer hours on both sides, then compare the ratio.

Does a stronger model change where the line sits?

Not as much as teams expect. A better model usually lowers audit time and raises the detection share only if you also invest in tests and a checklist. The worked example crosses 3x because audit time fell from 1.5 to 1.0 hours, not because inference got cheaper. Wait for a model upgrade to fix the economics and you will usually wait too long.

How do I handle a task where a human and a model both struggle?

Split it. Separate the part with strong detection and strong containment (generating a candidate, scaffolding a file, renaming a symbol) from the part with weak detection (schema design, unfamiliar bug diagnosis). Move only the first part, keep a human on the second, and re-run the inequality per subtask rather than per project.

What if two auditors disagree about whether an output passes?

That disagreement is data. Write down the case, add a rule to the checklist, and re-rate. Falling agreement after a rule change means the checklist is too abstract. If agreement stays low, the construct you are auditing is too subjective for the threshold to apply and a human should own the task.

Sources

Sources

  1. The End of Code Review:Coding Agents Supersede ...
  2. Defect Escape Rate (DER): A Comprehensive Guide - Opsera
  3. Defect Rate per Release | Product Management Playbook - Umbrex
  4. Use Human Validation for LLM Outputs
  5. Interrater reliability: the kappa statistic - PMC - NIH
  6. Inter-rater reliability
  7. Claude Code's new AI code review agents scan pull ...
  8. AI Is Breaking Code Review: How Engineering Teams Fix ...
  9. How to quantify qualitative data: 5 techniques, mixed ...
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles