Evaluating AI Coding Assistants for Complex Code Changes: Plan Execution and Verification Loops

    This article presents an evaluation approach for AI coding assistants working on complex repository changes. Rather than judging a single generated diff, it models the task as a multi-step plan-execution loop with objective build and test gates. It examines common failure modes—unverified cache or environment attribution, shotgun-style edits, and visual demos that look plausible but do not implement the required mechanics—and provides a reproducible evaluation protocol plus a constraint template teams can apply.

    Complex engineering changes are rarely just a matter of “writing a few new code blocks.” They require a model to understand the existing architecture, land changes step by step, make each step compile and pass tests, and only then move on. In recent comparisons, teams have given different AI coding assistants the same codebase and the same execution plan—detailed down to verification points—and compared single-attempt success rates. The results show a familiar capability split: some models pause to clarify ambiguity but still deliver close to the plan and at near-human quality; others explain early build failures as “environment or cache issues,” skip the actual code fix, and then fall into aimless local edits. Abstracting these behaviors is more useful engineering-wise than focusing on any single model release.

    1. The Evaluation Unit Should Be the Plan-Execution Loop, Not a Single Generation

    For complex changes, the correct evaluation unit is not “can the model produce a diff that looks plausible?” It is: can it complete a multi-step task under constraints and prove progress at each step using objective signals such as compilation, unit tests, integration tests, and static checks?

    A qualified execution plan usually includes:

    • Change boundaries
    • Dependency order
    • Acceptance criteria for each step
    • Rollback conditions

    Giving the same plan to different assistants fixes the task graph. The main differences then come from plan adherence, error diagnosis, and self-correction.

    In practice, it is advisable to fix at least three control setups:

    • Pure generation: all changes are produced at once.
    • Stepwise agent: the assistant continues only after each step is completed.
    • Human gate: a build failure must first be localized to a source file and test name before the assistant may continue.

    Without gates, a model can easily treat “I claim I am done” as “the system is actually done.”

    2. Common Failure Mode 1: Attributing Build Failures to Cache or Environment

    One very typical narrative is that the model quickly claims the first few steps are complete, then explains a build failure as a “compiler cache” or “environment inconsistency” issue and asks a human what to do. Even when told to clean build artifacts and rebuild, it may only perform the cleanup without actually running the full build, then move to the next step. The error is carried forward and eventually described as “the cache problem is so severe that it cannot work.”

    From an engineering perspective, this is a failure of diagnostic strategy, not environment mysticism. Build systems do have caches, but cache-induced failures usually have reproducible characteristics: incremental and clean builds produce different results, artifact timestamps are abnormal, or the dependency graph is not updated. Code errors show up as type mismatches, undefined symbols, and failed test assertions—none of which are caused by caching.

    An evaluation should explicitly prohibit unverified environment attribution. For any build failure, the assistant must first provide the first error in the failure log, the corresponding file, and a likely root cause before it may propose an environment hypothesis. An attribution that lacks a log reference should be judged as an incomplete step.

    3. Common Failure Mode 2: Shotgun-Style Programming

    When explicitly told that it must make the code correct and pass tests before continuing, some assistants shift into high-frequency, small-scope edits without hypotheses: one line here, one line there. The change volume quickly balloons to thousands of edits, yet the build still never passes. In software engineering, this is often called shotgun-style editing—using breadth instead of depth, and trial and error instead of understanding.

    Suppressing this behavior requires writing “minimal verifiable change” into the protocol:

    • A single commit should be tied to one failing test case or one compilation error.
    • Unrelated modules must not be modified at the same time.
    • If the agreed line threshold is exceeded, a causal explanation must be provided first.

    The human side should also reject patches that “change everything just to make it compile.” Without a green test signal, the next plan step is invalid—this is a hard constraint that prevents the task graph from being polluted.

    4. Visual and Interactive Tasks: Looking Good Is Not the Same as Working Correctly

    Beyond repository refactoring, common evaluations also include small games or visual demos: Klotski-style layouts, physics collisions, mazes, and reinforcement-learning training visualizations. These tasks are prone to “the screen looks fine, but the mechanics are wrong.”

    Shadows and particles may be lively, but the task semantics are not implemented—for example, the assistant claims an ink-wash style that is not reflected at all. A physics demo may run, but spacing and collision bodies do not match common sense, so the goal cannot be completed. A maze and an agent may be misaligned across layers, the character size may be abnormal, or the terrain may not be drawn or interactive. Drawing numeric values on the ground and having a training curve eventually converge only show that the optimization loop may run; they do not prove that the policy is aligned with the environment.

    More reliable scoring should be split into:

    • Whether geometry and collisions are self-consistent
    • Whether interaction is playable
    • Whether training signals are consistent with the state representation
    • Whether failure cases in the chain-of-thought contain style promises that cannot be grounded

    If an aesthetic description in the chain-of-thought cannot be mapped to actual rendering parameters, it should be recorded as a hallucination, not as a bonus.

    5. Designing a Fairer, More Reproducible Evaluation Protocol

    1. Freeze the repository commit and plan text. Do not allow the model to rewrite acceptance criteria.
    2. Require per-step outputs: a change summary, a summary of build command results, and the test list with pass/fail status. If tests fail, the assistant must not proceed.
    3. Environment issues must be reproducible: only if a full clean still fails can the issue be escalated to a toolchain problem; otherwise, the default assumption is a code error.
    4. Limit the size and file count of a single-step diff; if exceeded, require splitting.
    5. For visual tasks, provide scriptable assertions such as spacing, overlap, and clickable areas rather than relying only on screenshot impressions.
    6. Record the number of clarifications: proactive questions are not necessarily a weakness, but once answered, the answers must be written back into the constraints to avoid repeating the same mistake.

    6. Constraint Template for Users (Illustrative)

    The following rules can be placed at the beginning of a task as a machine-executable contract rather than a verbal reminder:

    1. Rules:
    2. - After completing each step, run the full build and relevant tests, and paste key failure/success information.
    3. - Do not start the next step before the current step passes acceptance.
    4. - Do not attribute build failures to caching unless logs still point to the toolchain after a full clean.
    5. - Each change must correspond to one explicit error; no batch edits to unrelated files.
    6. - If three consecutive builds fail without the error type converging, stop editing code and provide a root-cause analysis first.

    7. Conclusion: The Capability Boundary Is Verification, Not Claiming Completion

    AI coding assistants can already pass many medium-difficulty tasks in a single attempt, with quality close to human execution of a plan. What really separates them is how they behave in the face of failure: whether they still insist on evidence, whether they treat tests as the only permission to move forward, and whether they restrain ineffective search. Particle effects and flashy demos do not solve step-by-step repository changes.

    Moving evaluation from product-versus-product comparisons to a protocolized plan-execution and verification loop is what makes it possible to identify which assistants can enter a production change flow and which are still at the demo layer. For teams, waiting for the next model release is less useful than hardening plan granularity, gates, and failure-attribution discipline. These investments apply to all assistants and are the most effective way to reduce incidents such as three thousand ineffective edits in two hours.