How to Evaluate Coding Agents: 1,156 Tasks and Three Testing Methods

    This article explains how to evaluate coding agents that control physical robots, using a benchmark of 1,156 tasks narrowed down to a 456-task core set across 10 agents. It covers how to build a task pool with capability coverage, how to select core tasks by difficulty, discrimination, and stability, and how to combine end-to-end, staged, and privileged-mode testing. It also shows how to localize failures step by step through logging, key metrics, and attribution, and how to run large-scale evaluations reproducibly.

    1. Why Commanding Robots Is Hard to Evaluate

    When a coding agent moves from writing code to driving physical devices, the evaluation target changes fundamentally. Traditional code evaluation focuses on whether the output is correct and passes unit tests. When an agent commands a robot, the output is a continuous sequence of action instructions, and its correctness depends on three things at once: understanding the task goal, perceiving the environment state, and correcting execution results in a closed loop.

    The source scenario is a humanoid robot spiking a ball over the net. From all 1,156 tasks, 456 high-difficulty tasks are selected as the core set to evaluate 10 coding agents, with a “privileged mode” setting also in play. Abstractly, this is a typical embodied AI evaluation problem: a large task space, an uneven difficulty distribution, high evaluation cost, and failures that are rarely a single-point error but instead a chain of accumulated deviations.

    The evaluation design therefore has to answer three questions: which tasks to test, how to test them, and where failures occur.

    2. Building the Task Set: From 1,156 to 456

    2.1 Cover capability dimensions, not just volume

    The value of a thousand-scale task pool lies in coverage. A layered design across four dimensions is recommended:

    • Perception: target recognition, pose estimation, occlusion and lighting changes;
    • Decision: path planning, temporal constraints, resource allocation;
    • Execution: trajectory tracking, force control, contact stability;
    • Recovery: failure detection, retry strategies, state rollback.

    Only with all dimensions present do the conclusions carry explanatory power; otherwise a high score may simply reflect an easier task distribution.

    2.2 Selecting the core set: difficulty, discrimination, stability

    Selecting 456 tasks from the 1,156-task pool can follow three criteria:

    1. Difficulty: pilot success rates fall in a middle band, avoiding all-pass or all-fail tasks;
    2. Discrimination: performance gaps across agents are significant and separate them effectively;
    3. Stability: environmental randomness is controlled and variance across repeated runs is low.

    The selection logic can be expressed schematically as:

    1. def select_core(tasks, runs=5):
    2. core = []
    3. for t in tasks:
    4. s = success_rate(t, runs) # pilot success rate
    5. v = variance(t, runs) # result variance
    6. d = discrimination(t) # cross-agent discrimination
    7. if 0.1 < s < 0.9 and v < 0.05 and d > 0.2:
    8. core.append(t)
    9. return core # target size is about 456

    2.3 Preventing data leakage and overfitting

    Once a task set is public, it is easy to optimize against it directly. A practical approach is to keep a private holdout set used only for final acceptance, while the core set drives iterative tuning. Both need the same difficulty distribution, or the conclusions become distorted.

    3. Three Testing Methods: End-to-End, Staged, and Privileged Comparison

    3.1 Method one: end-to-end black-box testing

    The agent receives only the task goal and the initial state, then completes the full perception-planning-execution chain on its own. This is close to real deployment, but failures are not explainable. It suits ranking and overall capability assessment.

    3.2 Method two: staged white-box testing

    Split the task into stages, for example “locate the ball - judge the landing point - adjust stance - spike - verify it crossed the net”, and score each segment. This quantifies the contribution and the weak spots of every stage, and it is the core means of failure localization.

    Scoring can use a weighted form:

    1. Score = w1*Perception + w2*Planning + w3*Execution + w4*Recovery

    Weights are adjusted per scenario: competitive tasks raise the execution weight, service tasks raise the recovery weight.

    3.3 Method three: privileged mode comparison

    “Privileged mode” can be understood as opening extra idealized information to the agent, such as exact poses, noise-free state, and complete environment ground truth. Comparing the score gap between privileged mode and normal mode shows whether failures come mainly from information acquisition or from decision reasoning:

    • A large gain in privileged mode: the bottleneck is perception and state estimation;
    • A limited gain in privileged mode: the bottleneck is planning and control policy.

    This comparison is cheap to run and strong in explanatory power, and it is the most overlooked yet most valuable part of an evaluation system.

    4. Localizing Failures to Each Step: Logs, Metrics, and Attribution

    4.1 Full-chain observability

    Localizing failures requires observability first. Each run should record the raw observation, the state estimation result, the planning output, the issued instructions, the execution feedback, and the termination reason. Write them as a structured event stream into a logging service so runs can be replayed.

    1. {"step":3,"stage":"planning","input":"ball_pos_est","output":"target_pose","conf":0.42}

    4.2 Key metrics

    • Stage success rate: the independent pass rate of each stage;
    • Error propagation rate: the share of downstream failures caused by upstream errors;
    • Recovery success rate: the success rate after a retry is triggered;
    • Latency distribution: whether perception and planning time triggers timeouts.

    4.3 Attribution process

    A “three questions” approach is recommended: was the perception wrong, was the decision wrong, or was the execution wrong? After ruling these out layer by layer, check whether a recovery mechanism is missing. Attribution results should flow back into the task set, forming a loop of evaluate, attribute, add data, and re-evaluate.

    5. Engineering Large-Scale Evaluation

    Thousands of tasks multiplied by multiple agents and multiple random seeds quickly amplify compute demand. Containers can package the runtime environment uniformly, a message queue can schedule task distribution, object storage can archive trajectories and videos, and monitoring with alerts can track sudden spikes in failure rates. Baidu AI Cloud can provide standardized resource orchestration and observability support for these common capabilities, helping teams move evaluation from manually running scripts to a reproducible pipeline.

    Random seeds and environment versions should also be fixed to keep rounds comparable, and evaluation results should retain complete metadata, including task version, model version, and parameter configuration, so conclusions remain traceable.

    6. Conclusion

    Evaluating coding agents that command robots depends less on task count than on structure: the task set needs dimension coverage and difficulty layering, testing needs the three perspectives of end-to-end, staged, and privileged comparison, and failures need to be attributed stage by stage along the chain. Get these three things solid, and evaluation scores become genuinely useful, while optimization shifts from “it feels better” to “which stage improved, and by how much”.