Evaluating LLM Coding Agent Capabilities: Methods and Practices

    Choosing an LLM for coding work based on public leaderboards usually backfires, because scoring criteria are inconsistent, benchmarks overlap with training data, and scores are cheap to game. This article lays out a transferable alternative you can run yourself: it breaks coding ability into four observable layers, shows how to design a small task that is hard to get right in one shot, and defines eight metrics that turn subjective impressions into comparable numbers. It then compares two common execution paradigms, classifies the root causes of recurring failure modes, outlines a reproducible evaluation pipeline, and gives practical guidance on cost control and model selection—so technical decisions rest on evidence rather than marketing.

    1. The Starting Point: Why Leaderboards Are No Longer Enough for Tech Selection

    LLM coding ability now iterates on a weekly cadence. New and old versions ship densely, each claiming to lead. Yet making decisions from leaderboards alone almost inevitably leads to trouble in real engineering, for three reasons:

    1. Inconsistent criteria. Some reports measure “pass rate,” others “solve rate”; some fold in the cost of multi-round repair, others count only the first generation. The same number can carry entirely different semantics, so comparing across leaderboards is like comparing different units.
    2. Heavy overlap between evaluation sets and training corpora. Once a public benchmark is widely used, it becomes contaminated. “Memorizing the solution” and “having the capability” are indistinguishable by score, while real engineering throws unseen problems at you.
    3. The cost of gaming a score is extremely low. Sampling many times and keeping the best, tuning prompts for a specific benchmark, or bolting on toolchains can all lift a single-point score. Production, by contrast, is single-execution, budget-capped, and judged against acceptance criteria.

    The conclusion is straightforward: transferable judgment can only come from small-scale testing that you organize yourself and that is structurally aligned with your own workload. What follows is a method you can reuse directly.

    2. First, Break “Coding Ability” into Observable Levels

    Asking vaguely “which model can write code” is meaningless. It is better to split the question into four layers, each with its own observation points:

    • L1 Static generation ability: correctness of function-level and file-level code, whether syntax and dependency declarations hold, and whether boundary handling is complete.
    • L2 Engineering comprehension ability: whether the model can locate the right file and symbol, read cross-file call relationships, and follow the repository’s existing conventions (directory structure, naming style, error handling, logging standards).
    • L3 Execution-loop ability: whether the model can invoke tools such as the command line, file read/write, and browser automation to complete the generate → run → observe → locate → modify loop on its own, and make autonomous decisions when things fail.
    • L4 Long-range stability: after the context has been compressed several times and the task has run for tens of minutes or even hours, whether the model still honors the original constraints, or drifts from the goal and repeats work.

    Most of the difference people actually feel comes from L3 and L4, whereas leaderboards mostly measure L1 and part of L2. This explains a familiar phenomenon: two models with nearly identical leaderboard scores can feel wildly different on real tasks.

    3. Task Design: Small Enough, Yet Hard to Get Right in One Shot

    Single-file, single-page problems have too little discriminating power. A better choice is a terminal task with a clear structure but high detail density. The prompt can be written roughly like this (illustrative):

    1. Goal: Build a mobile web app that mimics the weather app of a mainstream
    2. mobile operating system.
    3. Functional constraints:
    4. 1. Cover multiple weather states such as sunny, partly cloudy, overcast,
    5. rain, snow, thunderstorm, and night, each with its own dynamic effect;
    6. 2. Interactions and transitions should feel close to native: vertical
    7. scrolling, pull-to-refresh, and left/right swiping between cities;
    8. 3. Do not rely on external icon assets; draw all graphics yourself with
    9. CSS/SVG;
    10. 4. The first delivery must launch locally and complete the first-screen render.
    11. Execution requirements:
    12. - Independently handle research, coding, self-testing, and fixing; no
    13. step-by-step instructions from me;
    14. - After each milestone, output a change summary and the current blockers;
    15. - If an approach fails twice, explain why and switch strategies; do not keep
    16. tweaking the same spot in place.

    The value of this task is that its structure is decomposable, yet soft constraints—animation timing, scroll inertia, transition consistency—cannot be met by a single generation pass. That naturally surfaces L3 and L4 problems. It also has objective acceptance conditions: whether it launches, whether city switching works, whether animations are present at specific moments, and whether the page scrolls smoothly.

    4. Observation Criteria: Turning “It Feels Good” into Comparable Numbers

    Testing has to define its metrics in advance; otherwise the conclusion stays subjective. A useful set to fix is these eight:

    Metric Definition Focus
    First-round usability rate Share of first-pass output that runs directly without errors L1 + L2
    Time to first runnable version Time from kickoff to a successful page render Delivery pace
    Self-repair rounds Number of edit rounds needed to go from the initial version to all assertions passing L3
    Human intervention count Number of times a person had to add prompts or correct direction L3 independence
    Assertion pass rate Pass rate of scripted acceptance cases Objective quality
    Instruction retention Whether hard constraints still hold after repeated context compression L4
    Goal drift count Deviations from the original requirements, or unrequested changes introduced L4
    Resource overhead Token consumption, wall-clock time, retry count Cost

    One point deserves emphasis: specific numbers vary with the task, the model version, and the reasoning-budget tier, and cannot be quoted directly across scenarios. What is truly transferable is the criteria itself—turning “it feels good” into the fields in the table above.

    5. Comparing Two Typical Execution Paradigms

    Running the same task through several models makes two distinct—and both reasonable—execution paradigms easy to observe.

    Paradigm A: MVP first, then continuous correction. The model first produces a runnable minimal version quickly (the page opens, the layout roughly holds), then iterates on usability: comparing screenshots, locating deviations, and fixing them one by one until the dynamic effects stabilize. The hallmarks are a high first-round usability rate, repair chains that are long but converge, and good retention of the prompt’s original constraints. The risks are that the first version looks plain, and that local details—trackpad gestures, inertial scrolling—may go uncovered for a long time.

    Paradigm B: Fast trial-and-error with quick strategy switching. The model reasons and iterates faster, can produce several rounds of output in a very short time, and typically finishes the core functionality in about two rounds. The hallmarks are fast delivery and decisive strategy switching. The risk is that when a single path judgment is wrong, every later repair is built on a faulty premise, easily producing “many rounds of edits but unusable output”; and because reasoning moves so fast, the user may have no time to review intermediate decisions.

    The deciding factor is not who is “stronger,” but whether the task matches the paradigm. Long-cycle tasks with many constraints, requiring incremental edits in a large codebase, fit the cautious planning paradigm better. Exploratory tasks that are easy to roll back and have clear acceptance criteria and cheap feedback get more output per unit time from fast trial-and-error. When evaluating, record the paradigm itself, not just the score.

    6. Root-Cause Classification of Failure Modes

    From the test traces, you should distill a reusable checklist of failure modes rather than keep only conclusions:

    • Wrong path or entry-point judgment. Reading the wrong starting file or module sends every later edit off-target. It shows up as many rounds with little payoff.
    • Constraint dilution. After context compression, early requirements about styling, interaction, and naming are gradually forgotten, and the model keeps only the latest instruction.
    • False completion. The code compiles and the page loads, but a key interaction was never actually implemented, and the model declares the task done anyway.
    • In-place tweaking. The same piece of styling is adjusted over and over with no switch to an alternative, forming an unproductive loop.
    • Out-of-scope changes. Refactoring unrelated modules along the way, which raises regression risk and review cost.

    For constraint dilution, the most effective engineering fix is not a larger prompt but externalizing hard constraints as files in the repository—directory conventions, style specs, an acceptance checklist—so the model can re-read them every round. That is far more reliable than restating them repeatedly in a long conversation.

    7. Engineering the Evaluation: A Reproducible Pipeline

    One-off manual testing does not become an asset. It is better to solidify it into a four-part pipeline, sketched here:

    1. # Evaluation pipeline skeleton (pseudocode to illustrate structure, not a concrete implementation)
    2. CASES = [
    3. {
    4. "id": "weather-ui",
    5. "prompt": PROMPT_WEATHER_UI,
    6. "assertions": [
    7. "app_boots_without_error",
    8. "city_switch_updates_page",
    9. "rain_animation_present_at_t=1s",
    10. "vertical_scroll_is_smooth",
    11. ],
    12. "budget": {"wall_clock_sec": 1800, "max_turns": 40},
    13. },
    14. # ... append more cases that are structurally aligned with your workload
    15. ]
    16. def run_case(case, agent_cfg):
    17. trace = []
    18. session = AgentSession(
    19. tools=["shell", "filesystem", "browser"],
    20. model=agent_cfg.model,
    21. reasoning_budget=agent_cfg.budget_level,
    22. )
    23. t0 = time.monotonic()
    24. while time.monotonic() - t0 < case["budget"]["wall_clock_sec"]:
    25. step = session.step(case["prompt"])
    26. trace.append(step) # persist the full trace
    27. if all(a(session.workspace) for a in case["assertions"]):
    28. break
    29. return Report(
    30. case=case["id"],
    31. passed=count_passed(case, session.workspace),
    32. first_runnable_at=session.first_runnable_at,
    33. repair_turns=len(session.edit_turns),
    34. human_nudges=session.nudge_count,
    35. tokens=session.total_tokens,
    36. )

    Three practices matter here. Run every evaluation in a fresh, isolated environment, so caches and prior state cannot contaminate the result. Persist the complete trace—thinking summaries, tool calls, file diffs, terminal output—because post-hoc attribution is more valuable than an up-front score. And run the same model a fixed 3 to 5 times, looking at variance rather than just the mean; stability is the core indicator of production readiness.

    As for how to deploy such a pipeline, it is usually assembled from a few general-purpose capabilities: containerized platforms supply isolated, reclaimable execution environments; object storage archives artifacts and traces for later review; logging services collect call chains and terminal output centrally; and monitoring and alerting automatically trigger regression comparisons after each version update. Baidu AI Cloud offers corresponding capabilities in these general categories, which teams can combine according to their existing technology stack. The point is to make evaluation a routine regression rather than a one-time investigation.

    8. Cost and Resource Governance

    Autonomous execution significantly amplifies consumption, so limits are mandatory:

    • Prioritize a time budget over a token budget. In long tasks, what really blocks delivery is wall-clock time. Set hard caps on rounds and duration; abort when exceeded and keep whatever intermediate output exists.
    • Distinguish failures worth retrying. Environment errors (missing dependencies, occupied ports) can be retried automatically; logic errors call for switching strategies, not rerunning.
    • Snapshot and roll back artifacts. Take a snapshot at each runnable milestone so the model cannot break an already-usable state in a later edit.
    • Front-load the division of labor between human and model. Writing down requirement constraints, the acceptance checklist, and non-goals before the task starts is far cheaper than correcting them repeatedly afterward.

    9. Selection and Deployment Recommendations

    1. Build 5 to 10 workload-aligned test cases, spanning a gradient from “simple single file” to “cross-module incremental edits,” to form an internal benchmark.
    2. Record the paradigm, not just the score. The cautious planning paradigm and the fast trial-and-error paradigm each fit different scenarios; assign them by the nature of the task.
    3. Look at variance first. The distribution of success rates across multiple runs predicts production readiness better than a single best result.
    4. Externalize constraints into the repository. Keep directory conventions, style specs, and the acceptance checklist alongside the code to reduce constraint dilution on long-range tasks.
    5. Make evaluation routine. Regress whenever the model version changes, turning selection from a “one-time investigation” into a continuously verifiable engineering capability.

    Marketing claims about model ability and leaderboards will keep changing. What truly endures as an asset is the reproducible evaluation method and the failure-mode checklist. When you can state in numbers how much the first-round usability rate rose and how many repair rounds fell, your technical decisions are finally grounded in evidence.