Evaluating AI Coding Agents: Four Dimensions That Matter Beyond Code Completion

    AI coding agents are judged differently than autocomplete tools. Instead of checking a function body against a signature, teams now hand an agent a natural-language goal and evaluate a whole deliverable: directory structure, dependency declarations, UI behavior, tests, and the failed attempts it made along the way. This article lays out four practical evaluation dimensions — long-horizon iteration and self-repair, cost per completed task, single agent versus multi-agent orchestration, and engineering/governance support — with concrete signals to watch, a minimal cost-ledger script, an orchestrator skeleton, and a seven-day evaluation process you can run against your own repositories and real issues.

    1. Background: the standard is shifting from code completion to task delivery

    Evaluating a coding tool used to be simple: hand it a function signature and check whether the completion was right. Once tools became agentic, the interaction changed fundamentally. The input is no longer a code fragment but a natural-language goal, such as “build me a lightweight dashboard that tracks earnings season.” The output is no longer a snippet either — it is a full set of artifacts: directory structure, dependency declarations, UI interactions, test scripts, and often a record of several failures and fixes the agent made on its own.

    That shift drives three changes in evaluation:

    1. Time horizon: from second-scale completion to hours of continuous progress, where the tool has to stay aligned with the goal over a long stretch.
    2. Success criteria: from “the code looks reasonable” to “it starts, passes the tests, and meets the acceptance criteria.”
    3. Cost structure: from estimating per call to accounting per completed task, with failed retries on the bill.

    Those three changes determine which dimensions a pragmatic evaluation framework needs. The four below follow from them.

    2. Dimension 1: long-horizon iteration and self-repair

    2.1 What counts as a “long task”

    A long task is an engineering goal that, within a single session, spans multiple rounds of edits, touches multiple files, and will inevitably hit errors along the way. Four pressure points stand out:

    • Goal drift: by round five, the output has drifted from the original requirement — for example, quietly dropping a requirement to route around an error.
    • Context bloat: file contents, error stacks, and dependency notes fill the context window quickly, diluting early constraints.
    • Quality of error handling: does it read the full error message and locate the root cause, or randomly tweak parameters and hope?
    • Delivery boundaries: does it state plainly what layer was actually finished this round, or vaguely claim the whole thing is done?

    2.2 Delivery boundaries should be confirmed, not treated as defects

    A common scenario is “build a web app from scratch.” In practice, these tasks usually deliver a highly polished front end first: layout, charts, and filtering interactions all work, but the back end still runs on placeholder data. That is not a capability gap; it is sensible layering, because a front end validates product shape and interaction assumptions at the lowest cost. The professional move is to define that delivery as a prototype milestone and hand the next phase an explicit data contract, so back-end work has a clear target:

    1. # contracts/report.yaml — shared data contract, defined before the back end exists
    2. resource: financial_report
    3. fields:
    4. - {name: symbol, type: string, desc: ticker symbol}
    5. - {name: period, type: string, desc: reporting period, e.g. 2025Q3}
    6. - {name: revenue, type: number, unit: millions of reporting currency, nullable: true}
    7. - {name: revenue_yoy, type: number, unit: percent}
    8. - {name: surprise, type: number, desc: deviation of actual value from consensus}
    9. endpoints:
    10. - {path: /api/reports, method: GET, query: [symbol, period]}
    11. acceptance:
    12. - returns null rather than an error for tickers with missing fields
    13. - empty result sets return 200 with an empty array, not 500

    With a contract in place, “only the front end was done” stops being vague dissatisfaction and becomes a schedulable, verifiable item for the next iteration.

    2.3 “One-shot generation” versus autonomous iteration

    Two behavior patterns are possible, even when the task is the same:

    • One-shot: emits a large block of code, then relies on the user to paste logs when something fails and to explain what the error means.
    • Autonomous iteration: runs commands itself → reads the output → locates the failure → applies a fix → runs again, until the checks pass.

    Only the second pattern deserves the name “agent.” The test is straightforward: in a repository that ships its own test script, file a requirement you already know will fail, and watch three signals — does it run the tests on its own, does it read the full error stack rather than just the first line, and does it lean toward editing tests to turn red lights green. The third behavior is the cheating path to watch for most closely, because it corrupts code quality and test validity at the same time.

    2.4 Replace self-assessed completeness with a runnability checklist

    Do not accept a verbal “done.” Use a short, objective checklist instead:

    • Are all dependencies written into declaration files, rather than implicitly relying on some global environment?
    • Is there a single, documented start command?
    • Is there a smoke test that passes with one command?
    • Do failure paths emit structured logs so production issues can be traced?
    • Do sensitive settings come from environment variables, rather than being hardcoded in source?

    3. Dimension 2: cost per completed task and quota cadence

    In the agent era, cost-effectiveness sometimes becomes decisive before raw capability does. Run the arithmetic: suppose tool A is 10% more capable than tool B but consumes three times the resources to finish the same task. If a team pushes twenty tasks a day, A’s marginal gain falls far short of the time and budget it costs. Gaining 10% capability for 100% more cost is, in effect, a reduction in overall productivity.

    So the metric should shift from total quota to Cost Per completed Task (CPT):

    1. CPT = (input + output + compute cost of failed retries × unit price + human intervention time cost) / number of successfully delivered tasks

    Three practices to pair with it:

    1. Look at quota cadence, not just the total. The damage from a single long task eating several hours of quota is not the number on the bill — it is the broken rhythm. The team stalls and waits, then fills the gap with low-value work.
    2. Separate gifted quota from purchased quota. If trial resources come from a promotion or an evaluation channel, the consumption curve may not reflect real behavior once you pay. Re-run a round on your own paid quota before judging whether volume-based access holds up for long-term use.
    3. Keep a minimal ledger. No complex system is needed — one table and one script are enough to make CPT computable:
    1. # usage_ledger.py — minimal task-level cost ledger, standard library only
    2. import csv, json, time
    3. from pathlib import Path
    4. LOG = Path("usage_ledger.csv")
    5. FIELDS = ["ts", "task", "mode", "rounds", "in_tok", "out_tok",
    6. "wall_min", "human_edit", "success"]
    7. def record(task, mode, rounds, in_tok, out_tok, wall_min,
    8. human_edit, success):
    9. """mode: single / swarm; human_edit: lines changed by a human takeover"""
    10. row = [time.strftime("%Y-%m-%dT%H:%M"),
    11. task, mode, rounds, in_tok, out_tok,
    12. round(wall_min, 1), human_edit, int(success)]
    13. new = not LOG.exists()
    14. with LOG.open("a", newline="", encoding="utf-8") as f:
    15. w = csv.writer(f)
    16. if new:
    17. w.writerow(FIELDS)
    18. w.writerow(row)
    19. def report(price_in, price_out):
    20. """Aggregate CPT by unit price: only tasks with success=1 count in the denominator"""
    21. rows = list(csv.DictReader(LOG.open(encoding="utf-8")))
    22. ok = [r for r in rows if r["success"] == "1"]
    23. if not ok:
    24. return {"cpt": None, "success_rate": 0.0}
    25. cost = sum(int(r["in_tok"]) * price_in + int(r["out_tok"]) * price_out
    26. for r in ok)
    27. total = len(rows)
    28. cpt = cost / len(ok)
    29. # key supporting metric: rework rate, approximated by human takeover lines
    30. rework = sum(int(r["human_edit"]) for r in ok) / len(ok)
    31. return {"cpt": round(cpt, 4),
    32. "success_rate": round(len(ok) / total, 3),
    33. "avg_human_edit_lines": round(rework, 1),
    34. "samples": total}
    35. if __name__ == "__main__":
    36. print(json.dumps(report(0.000002, 0.000008), ensure_ascii=False, indent=2))

    The avg_human_edit_lines column is often more persuasive than any benchmark: it measures how much of the tool’s output a human had to overturn, which speaks directly to real productivity.

    4. Dimension 3: single agent or multi-agent swarm

    Multi-agent swarms — several agents receiving tasks from a coordinator, running in parallel, then merging results — have drawn a lot of attention over the past two years, but their fit needs to be drawn clearly.

    Default to a single agent when the requirement boundary is clear, changes are concentrated in a few files, and consistency of code style matters. Every extra orchestration layer adds context loss and information distortion.

    Consider a swarm when the task splits into independent subproblems (research across multiple repositories, batch refactors spanning modules, large-scale regression runs), when wall-clock time needs to be compressed, or when you need an independent reviewer role to reduce self-confirmation bias — separating the implementer from the reviewer works far better than letting one agent check its own work.

    Three costs deserve honest treatment: coordination overhead (splitting, dispatching, and merging all consume compute), duplicated context transfer, and failure amplification — when a single worker fails, the coordinator’s retry policy decides whether cost grows linearly or exponentially.

    A minimal orchestration skeleton looks like this:

    1. # orchestrator.py — minimal skeleton for one coordinator with multiple workers (pseudocode)
    2. from dataclasses import dataclass
    3. @dataclass
    4. class Task:
    5. id: str
    6. spec: str # input boundaries and acceptance criteria
    7. depends_on: list # explicit dependencies, avoiding implicit ordering
    8. def run(targets, agents, verify, max_retry=2):
    9. done = {}
    10. for t in topo_sort(targets): # only dependency-free tasks can run in parallel
    11. if unmet(t.depends_on, done):
    12. done[t.id] = ("skipped", "upstream did not pass")
    13. continue
    14. for attempt in range(max_retry + 1):
    15. out = agents["worker"].run(t.spec, ctx=relevant(done, t))
    16. verdict = verify(out) # machine-decidable acceptance check
    17. if verdict.ok:
    18. done[t.id] = ("ok", out)
    19. break
    20. # feed back only structured failure info, avoid resending the whole context
    21. t.spec += f"\n[attempt {attempt}] acceptance failed: {verdict.reason}"
    22. else:
    23. done[t.id] = ("failed", "retry limit exceeded")
    24. review = agents["reviewer"].run(digest(done))
    25. return review

    Two design points are worth stressing. topo_sort ensures only dependency-free tasks enter the parallel branch, so the swarm does not burn compute on false concurrency. And verify must be machine-decidable — tests passing, field validation passing, static checks passing. Otherwise “acceptance” degrades into another agent’s subjective opinion, and the swarm’s reliability collapses quickly.

    5. Dimension 4: engineering and governance support

    Beyond raw model capability, the surrounding setup often explains why the same tool performs several times better for one team than another.

    • Repository-level context file: place a conventionally named document at the project root covering directory conventions, build and test commands, coding standards, and a “do not modify” list. This is the highest-leverage investment for long-task stability, at almost zero cost.
    • Executable tests: provide a test entry point that runs with one command. Without it, no agent can close the loop, and it falls back to one-shot output.
    • Permissions and sandboxing: define write scope explicitly, and put confirmation or allowlist mechanisms in front of dangerous operations such as deletion, formatting, and outbound network calls. Credentials belong in environment variables or a secrets manager, never in the repository.
    • Code egress compliance: complete redaction and licensing checks before sending private code to an external service. For strict data-residency requirements, consider weight-open models that support private deployment.
    • Path from prototype to production: once a prototype is validated, the service can be deployed to a public cloud container platform (for example, Baidu AI Cloud, where available), static assets and report files can go to object storage, scheduled scraping can run as cloud scheduling jobs, and observability can be handled by logging plus monitoring and alerting services. These generic categories are enough to support the full path from prototype to production.

    6. A practical seven-day evaluation process

    Day Activity Output
    D1 Pick 10 real issues from your own repositories and design 2 build-from-scratch tasks internal evaluation set
    D2–D3 Run blind evaluations, logging rounds, compute, and human-takeover lines with the ledger script raw logs
    D4 Compute CPT, success rate, and average human-takeover lines side-by-side comparison table
    D5 Run the same batch of parallelizable tasks with a single agent and with a swarm swarm gain ratio
    D6–D7 Lock in context documentation, test entry points, and permission policy team standards

    The decision rules reduce to three: anything with a success rate below baseline does not become a candidate; a significantly higher CPT requires a proportional capability advantage; a swarm is enabled only when wall-clock time or review quality improves measurably. The evaluation set must come from your own codebases and real requirements — generic benchmarks measure a model’s average level, while what a team cares about is its actual gain on its own stack and its own legacy code.

    7. Conclusion

    The discussion around any new model release ultimately asks one question: can it reliably finish tasks inside your workflow? Split that question into the four dimensions above, and the answer stops depending on benchmark scores or word of mouth and starts depending on data you recorded yourself. Long-horizon iteration sets the capability ceiling, cost per completed task determines whether you can keep using it, the single-agent-versus-swarm choice determines how efficiently complex work advances, and engineering governance determines how much of the first three you actually realize.

    The pragmatic stance is to treat every new model as a candidate to be validated: run it against your own evaluation set, re-test on paid quota, use the ledger to compute CPT, and only then decide where it belongs in the toolchain. That gets you closer to real productivity than any launch-day feature list.