Evaluating the Engineering Execution Capabilities of Next-Gen Coding Agents

    Public leaderboards often fail to reflect real-world development environments. This article explores how to evaluate coding agents beyond simple code generation, focusing on multi-step engineering execution, terminal task failure modes, the practical limits of long-context models, and how to build a reproducible evaluation pipeline tailored to your team's needs.

    1. Why Single Leaderboards Are Insufficient

    Public leaderboards provide a reference frame, but they only answer the questions test designers care about. The same model can score vastly differently across different task sets, toolchains, and prompt strategies. Tests typically run in fixed environments with clear task boundaries, whereas real-world projects often involve ambiguous requirements, heavy legacy codebases, and inconsistent dependency versions.

    Therefore, when reading leaderboards, you should verify three things: whether the test tasks align with your business scenarios; whether the evaluation environment allows the model to call tools and run commands; and whether the results are from a single run or an average of multiple attempts. Without this information, a score only proves the model’s capability under specific conditions and cannot directly predict its performance in your team’s projects.

    When evaluating a model, breaking down capability dimensions is more useful than looking at a total score.

    2. From Code Generation to Engineering Execution

    Early coding model evaluations focused primarily on code generation: given a function specification, can the generated code pass unit tests? Such tasks have complete inputs and clear boundaries, mainly testing syntax and algorithmic understanding.

    Actual development workflows are entirely different. Engineers usually face an existing repository where they must first locate relevant modules, read call relationships, and then decide which files to modify. After modification, they run tests, check logs upon failure, determine whether the issue is a code error, an environment problem, or outdated tests, and then iterate. The entire process is multi-turn, with each step depending on the feedback from the previous one.

    Therefore, when evaluating a coding agent, focus on the following capabilities:

    • Repository understanding: Can it quickly locate relevant code based on directory structure and naming conventions?
    • Cross-file modification: Can it maintain consistency across interfaces, types, and callers?
    • Error diagnosis: Can it find the root cause from test output and stack traces instead of repeatedly trying the same fix?
    • Tool invocation stability: Can it correctly use CLIs, package managers, and version control tools, and recover from permission or path errors?
    • Regression control: Does it break existing functionality after modification, and does it proactively add or preserve tests?

    The commonality among these capabilities is that the model must continuously adjust based on real feedback rather than outputting a one-shot answer.

    3. Why Terminal-Based Tasks Matter

    The terminal is one of the most frequently used interfaces for developers. For a model to complete tasks within a terminal, it must simultaneously process natural language requirements, file system states, process outputs, and error messages. This is significantly more complex than simply outputting a block of code.

    In terminal tasks, common failure modes include:

    1. Jumping to conclusions: Claiming a fix without running tests.
    2. Modifying the wrong files or executing commands in the wrong directory.
    3. Ignoring key lines in error messages and repeatedly executing the same failing command.
    4. Modifying the tests themselves to force a pass, masking the real problem.

    During evaluation, specifically track the frequency of these failure modes. Between two models with similar success rates, the one with fewer type-4 issues generally poses a lower risk in production environments.

    4. The Value and Limits of Ultra-Long Context

    Models supporting million-token contexts can ingest large code repositories, lengthy technical documentation, or multiple reports at once. For tasks requiring cross-file understanding, this reduces the manual effort of splitting materials and lowers the chance of missing information.

    However, a long context window only indicates input capacity; it does not mean the model can effectively utilize every piece of information within it. Common practical issues include: key information placed in the middle of the context being easily ignored; inconsistent conclusions across multi-turn reasoning; and irrelevant content cluttering the judgment process.

    Furthermore, longer inputs generally mean higher inference costs and response latency. Loading an entire project into the context at once is rarely the optimal choice. A more robust approach is to:

    • Use retrieval tools to locate relevant files and functions before adding them to the context.
    • Break down tasks by module or function, retaining only necessary information at each stage.
    • Output intermediate summaries at key checkpoints to serve as inputs for subsequent steps.
    • Conduct specialized tests for long-context performance, such as planting known facts in a document to check if the model can accurately retrieve them.

    5. Building Your Own Evaluation Process

    Your team’s internal evaluation set will reflect real-world needs far better than public leaderboards. A reproducible process typically involves the following steps:

    1. Extract tasks from historical tickets or bug reports, ensuring each task includes initial code, requirement descriptions, and acceptance tests.
    2. Place tasks in an isolated environment with fixed dependency versions to prevent network fluctuations from affecting results.
    3. Run each candidate model multiple times, recording the success rate, average turns, number of tool calls, and total time consumed.
    4. Manually sample failed cases to categorize the reasons for failure.
    5. Calculate the cost per single task to determine the cost per successful execution.

    Below is a simplified evaluation script demonstrating how to batch-run tasks and record results. Each run copies the task directory from a clean template to prevent previous modifications from affecting subsequent results.

    1. import json
    2. import shutil
    3. import subprocess
    4. import tempfile
    5. from pathlib import Path
    6. def run_once(template: Path, agent_cmd: list[str], timeout: int = 900) -> dict:
    7. """Each run copies the task directory from a clean template to prevent previous modifications from affecting results."""
    8. with tempfile.TemporaryDirectory() as tmp:
    9. workdir = Path(tmp) / template.name
    10. shutil.copytree(template, workdir)
    11. try:
    12. subprocess.run(
    13. agent_cmd,
    14. cwd=workdir,
    15. timeout=timeout,
    16. capture_output=True,
    17. text=True,
    18. )
    19. except subprocess.TimeoutExpired:
    20. return {"task": template.name, "passed": False, "reason": "timeout"}
    21. test = subprocess.run(
    22. ["pytest", "-q"],
    23. cwd=workdir,
    24. capture_output=True,
    25. text=True,
    26. )
    27. passed = test.returncode == 0
    28. return {
    29. "task": template.name,
    30. "passed": passed,
    31. "reason": "ok" if passed else "tests_failed",
    32. }
    33. def evaluate(task_root: Path, agent_cmd: list[str], runs: int = 3) -> None:
    34. results = []
    35. for template in sorted(p for p in task_root.iterdir() if p.is_dir()):
    36. for i in range(runs):
    37. results.append({"run": i, **run_once(template, agent_cmd)})
    38. Path("results.json").write_text(
    39. json.dumps(results, ensure_ascii=False, indent=2),
    40. encoding="utf-8",
    41. )
    42. passed = sum(r["passed"] for r in results)
    43. print(f"Pass rate: {passed}/{len(results)}")

    Because the agent executes arbitrary commands, evaluations should be run inside containers or virtual machines, with restricted network access and limited read/write file scopes.

    6. Cost, Latency, and…