Evaluating Long-程 Coding Agents: Capability Boundaries and Acceptance Practices
This article explains why benchmark scores alone cannot measure the delivery capability of coding agents, and proposes a two-layer evaluation framework covering long-horizon execution and constraint compliance. It details test designs for legacy system modification and greenfield product builds, shows how to shift security constraints into acceptance checklists with negative tests, and offers four reusable metrics for comparing agent versions.
1. The Problem: Why Benchmark Scores Are Not Enough
When evaluating a new generation of coding agents, the easiest mistake is treating evaluation scores as equivalent to delivery capability. A score reflects a pass rate on a specific task distribution, while real engineering delivery depends on a different set of indicators: whether the agent can read the implicit conventions of existing code, keep changes consistent across modules, push a task to a runnable and testable state, and locate and fix failures on its own.
A more reasonable framework splits capability into two layers. The first is long-horizon execution: keeping the goal from drifting across multiple rounds of tool calls. The second is constraint compliance: completing the implementation under permission, security, and compatibility constraints. The first sets the ceiling on efficiency; the second determines whether the work can actually be delivered.
2. Where the Upgrade Comes From: Post-Training Scaling, Not a New Base Model
One common upgrade path keeps the base model size unchanged and concentrates investment in the post-training stage: expanding the scale and diversity of long-horizon task environments, extending training duration, and letting the model learn the loop of “read code, change code, run tests, fix problems” under conditions closer to a real repository.
This route typically changes capability in three directions:
- Coding and engineering: more emphasis on long-horizon tasks and production-grade software engineering rather than single-file snippet generation;
- Security: extending from “writing feature code” to white-box code review and vulnerability reasoning, with basic security tasks approaching frontier levels, though complete exploit-chain scenarios still show a gap;
- Openness and verifiability: weights released after security assessment and hardening, making it easier for teams to deploy, evaluate, and improve on their own.
It is worth stressing that these changes describe a general technical route; the actual magnitude must be validated on the team’s own task set rather than taken from external numbers.
3. Test Design: Two Task Types Covering Two Capabilities
A single task is not enough to judge long-horizon coding ability. At least two clearly different task types are recommended:
- Legacy system modification: in a project with historical code and security constraints, add a capability for “secure import of user assets plus animation scene references.” The focus is legacy system understanding, constraint compliance, and regression risk control.
- Greenfield product delivery: given only learning materials and a requirements document, build a learning application that can be completed end to end. The focus is material analysis, architecture design, task closure, and playability verification.
Getting both task types to run is only the starting point; the real conclusions come from manual acceptance.
4. Legacy Project Test: Running Is Not the Same as Compliance
In a legacy project, the agent can often produce a working chain quickly: upload, storage, reference, and rendering all in one pass. But the manual acceptance stage exposes a typical class of problems: permission isolation defects, where different users can access each other’s assets beyond their authorization, which is a high-priority issue.
The root cause is usually not whether the feature is implemented, but whether constraints are explicitly modeled. A reusable practice is to move security constraints forward into acceptance conditions instead of patching them afterward:
Acceptance checklist moved forward (example)1. Resource ownership: every asset must bind an owner_id, and queries filter by tenant/user by default2. Access paths: direct links require signature validation; enumerable public paths are forbidden3. Reference rendering: scene references accept only whitelisted protocols and in-domain resource identifiers4. Audit: import, reference, and deletion all record the acting subject and source5. Regression: every new endpoint must ship negative test cases for unauthorized access
The corresponding negative tests should be automated, for example:
def test_cross_user_access_denied(client, user_a_asset, user_b_token):resp = client.get(f"/assets/{user_a_asset.id}", headers=user_b_token)assert resp.status_code in (403, 404)
Once such cases are in the pipeline, permission problems can be stopped before the suite goes all green.
5. Greenfield Build Test: Advancing Long-Horizon Tasks in Stages
Greenfield builds show long-horizon capability more clearly. Given the materials and the requirements document, a sensible rhythm is staged rather than one-shot generation:
- Structure the materials: extract core concepts, level goals, and scoring rules into implementable requirement items;
- Skeleton first: define the data model and the level state machine up front so that the hard requirement of “can be completed” has a supporting structure;
- Vertical slice: get one shortest completion path working first, then expand the question bank and branches horizontally;
- Self-check loop: after each round of changes, run the build and key-path tests, and roll back to the last working state on failure.
A schematic state machine constraint can be written as:
enum Phase { BRIEF, PRACTICE, CHALLENGE, REVIEW, DONE }boolean canTransition(Phase from, Phase to) {return switch (from) {case BRIEF -> to == Phase.PRACTICE;case PRACTICE -> to == Phase.CHALLENGE || to == Phase.REVIEW;case CHALLENGE -> to == Phase.REVIEW || to == Phase.DONE;case REVIEW -> to == Phase.DONE || to == Phase.PRACTICE;case DONE -> false;};}
Such explicit constraints significantly reduce goal drift and state confusion in long-horizon tasks.
6. A Reusable Evaluation Method: Turning Subjective Experience into Metrics
Teams are advised to replace “feels good” with four dimensions:
- First-pass rate: the share of tasks that pass acceptance without manual intervention;
- Manual rework time: time from an acceptance defect to a completed fix;
- Constraint violation count: permission, security, and compatibility issues, weighted by priority;
- Long-horizon stability: the number of rounds a single task can keep advancing, and the distribution of interruption causes.
Only with a fixed task set and a fixed acceptance checklist can comparisons between versions be trusted.
7. Conclusion and Practical Recommendations
Overall, the new generation of long-horizon coding agents is already capable of taking on real projects, and is especially suited to cross-module, multi-round engineering tasks. However, in permission isolation, security review, and final acceptance, human sign-off cannot be skipped. In practice, a combined flow of “agent advances, constraints moved forward, negative tests, final human acceptance” is recommended, and it can be paired with the general container platform, logging service, and monitoring and alerting capabilities on Baidu AI Cloud to turn the execution process and acceptance results into observable, traceable engineering assets.
