How to Evaluate Coding Agents and Defensive Security Capabilities
Coding-agent evaluation is no longer just about whether a model can generate code. It must assess whether an agent can understand a repository, track constraints across files, update tests, recover from failed verification, and deliver a patch that can be reviewed and merged. This article explains how to separate model capability from workflow, context organization, tool access, retries, and verification; how scaling laws, post-training, and sandbox diversity affect reliability; and how defensive security tasks should be judged by finding quality, business-preserving remediation, and human reviewability. It then outlines reproducible controlled trials for estimating first-round and budgeted success rates, delivery cost, and the conditions under which an agent is worth deploying.
Generating a function and completing a cross-file change test different levels of capability. The former can often be verified with fixed inputs and outputs or a small set of unit tests. The latter requires an agent to understand repository structure, track constraints across multiple files, modify the implementation, update tests, and then decide after a verification failure whether the change is wrong, the test assumption is invalid, or the runtime environment is missing a dependency. The decisive difference is often not how elegant the first generated code looks, but whether the system can correct errors across multiple rounds of feedback and ultimately deliver a patch that can be reviewed and merged.
So when a model with fewer parameters scores higher on some long-horizon tasks, the more important question is where the improvement comes from: the model itself, or better context organization, tool integration, task scheduling, and result validation? If two setups use different tool permissions, output lengths, or retry counts, their scores reflect the performance of each complete system. Those scores cannot be used to compare the underlying models directly. For engineering teams, this distinction also points to different investment decisions. A model should be considered for replacement only when the model has a clear limitation. If the main failure is that test results are not fully returned to the agent, increasing model size may not solve the problem.
Parameter Scale Still Matters; the Location of Capability Investment Has Changed
Scaling laws describe empirical relationships under specific experimental conditions among model size, data volume, training compute, and certain performance metrics. They do not promise that a model with more parameters will win on every downstream task, and they cannot be confirmed or refuted by a single ranking from agent evaluations. For models using sparse computation, total parameter count also does not directly represent the compute cost of each inference. When evaluating actual deployment cost, teams must also consider context length, response time, tool calls, and the resources consumed by verification.
The role of post-training is to help a model turn existing knowledge into repeatable task behavior. Take repository repair as an example. If a model learns only from final code, it may know that a certain implementation pattern usually works, but it may not know when to check interface constraints first or when to abandon a modification path that tests have already rejected. If the training process provides executable feedback, the model can learn these decisions within task trajectories rather than merely imitating a final patch. This does not mean that adding more feedback rounds will automatically improve quality. If scoring considers only whether existing tests pass, the system may favor bypassing checks or weakening assertions. Whether a patch preserves original functionality, and whether tests retain their original constraints, still requires independent verification.
Sandbox Scaling Is About Covering New Situations, Not Just Adding Instances
A sandbox is an isolated execution environment that gives an agent controlled conditions for code editing and testing, and records the process for review. For post-training, the valuable factor is not how many environments are launched at once, but whether those environments provide varied and reliable feedback. Copying the same repository snapshot multiple times mainly increases concurrency. Covering different dependency combinations, directory structures, test organization methods, and task types is more useful for testing whether the model learns transferable problem-solving methods or fixed routines tied to one class of environment.
To verify the so-called sandbox scaling effect, separate concurrency from task diversity. Under a fixed training compute budget, one group can increase the number of repetitions within the same class of environments, while another group increases coverage of independent tasks and environment configurations. Then compare delivery performance on repositories that were not part of training. If gains appear only on tasks highly similar to the training samples, it is not valid to infer improved generalization. If the two groups also use different compute budgets, the additional budget must be treated as a possible explanation rather than attributing all gains to environment diversity.
The reliability of the environments themselves also matters. Dependencies that cannot be installed, verification jobs that terminate abnormally, and flaky tests can all be misclassified as model failures. Conversely, tests that never exercise critical paths can create false successes. Environment faults and invalid verification should be recorded separately, and dependency states, test entry points, and resource limits should be fixed as much as possible. Otherwise, the comparison may measure the stability of different environments rather than the ability to solve tasks.
Defensive Security Should Be Measured by Finding Quality and Remediation Outcomes
A rising score on security-related tasks can indicate improvements in code understanding, cross-file reasoning, or tool use, but it is not sufficient to prove that a capability has “emerged.” To support that judgment, results need to be observed across multiple training stages, using metrics that are not easily distorted by thresholds, and the improvement must be tested on independent tasks and repeated trials. For example, if a task is scored only when localization, repair, and regression verification are all complete, the total score may jump abruptly when a threshold is crossed even if each component has been improving gradually.
In an enterprise context, a more meaningful question is this: within the authorized code scope, can an agent identify potential missing authorization checks, insecure default configurations, or sensitive-information logging, and submit evidence-based remediation suggestions that can be reviewed? Evaluation should distinguish three levels:
- Accuracy of findings: Does the indicated code location match the risk judgment, and are the applicable conditions explained clearly? The comparison set should include samples with similar implementation styles but complete checks, to avoid mistaking “raising more issues” for “finding issues more accurately.”
- Whether remediation preserves business semantics: A patch must not pass by disabling functionality, deleting checks, or changing test expectations. For example, when adding permission checks, verify both that unauthorized requests are rejected and that workflows that were originally authorized still function correctly.
- Whether conclusions are easy for human review: Reports should distinguish verified findings, inferences based on code reading, and items that could not be confirmed because of environment limitations. Changes involving access control and data handling should be reviewed and approved by the responsible owners. Model output should not be treated directly as a basis for merging.
With this approach, the discussion is no longer about a broad “security score.” It is about whether a team can obtain trusted findings and patches at an acceptable review cost.
Use Reproducible Controlled Trials to Decide Whether Deployment Is Worthwhile
First, build a task set that closely reflects real maintenance work. Defect repair, cross-module changes, test completion, and defensive code review should be counted separately, so that a large number of simple tasks does not hide failures on complex tasks. When splitting training and evaluation samples, divide them by repository, module, or time where possible, and check for near-duplicate tasks. Randomly splitting adjacent changes within the same repository may confuse familiarity with an existing implementation with generalization ability.
Second, make clear whether the comparison is about the model, the workflow, or the investment budget. With tools, permissions, and resource limits fixed, replacing the model reveals model differences. With the model fixed, changing the feedback method reveals the contribution of the workflow. With the same system, changing the reasoning time limit and number of attempts shows whether additional cost produces more acceptable deliveries. Reports should include both the first-round success rate and the final success rate within budget. The former concerns response stability; the latter reflects how many tasks can be completed when retries are allowed. If multiple attempts are allowed, the report should also state whether the final patch was selected by automated verification or by a human, because the operational costs differ.
Finally, convert pass rates into real delivery cost. Beyond inference and sandbox execution, teams should record human review time, rework after patches are rejected, and invalid runs caused by environment problems. Unit delivery cost can be estimated as total trial cost divided by the number of patches that pass independent verification and are accepted, with total cost including failed attempts. For early deployment, let the agent generate patches in isolated copies, grant only the minimum necessary capabilities, retain change logs, and leave merge decisions to the code owners.
Progress in coding agents should ultimately be reflected in more stable delivery under the same constraints, not in leadership on a particular score. Parameter scale, post-training quality, environment coverage, and inference budget can all generate gains. Only by separating and validating these conditions can a team know where the gains come from, whether they transfer to its own codebase, and whether they justify additional engineering investment.
