Evaluating AI Coding Agents: Capabilities Developers Should Look For

    AI coding agents should be evaluated by how reliably they complete real engineering tasks, not by how fluent their single-turn answers sound. This article explains how to assess planning, tool use, self-correction, code modification, testing, long-context understanding, cost, security, auditability, and human review before adopting an agent for software development.

    1. Why Evaluation Must Shift from Answers to Tasks

    The fluency of a traditional question-and-answer model’s response is no longer enough to determine whether it belongs in a software development workflow. A real engineering task, such as fixing an authorization vulnerability, usually involves several steps:

    1. Read the requirement and relevant code.
    2. Locate the affected files.
    3. Determine the scope of impact.
    4. Modify the code.
    5. Run tests.
    6. Continue debugging based on failures.
    7. Document the changes.

    Every step can fail. If the model identifies the wrong directory, even a flawless subsequent code change has no value. Evaluation should therefore focus on the complete process:

    • Does the model maintain the same objective throughout the task?
    • Does it follow constraints established earlier?
    • Does it correctly use errors returned by tools?
    • Does it make decisions based on evidence from the repository and test results?

    2. Task Planning: Define the Scope Before Making Changes

    Planning helps control the scope of changes. For example, when asked to “add role-based authorization to an order API,” a capable model should produce a plan similar to this before editing any code:

    1. Find the route definition for the order API and its existing middleware.
    2. Confirm whether the required permission fields already exist in the user table.
    3. List the files that need to be modified, with an expected maximum of four.
    4. Identify any step that would change the API response format and require human approval.
    5. Specify where new tests should be placed.

    This plan makes the scope visible before execution begins. If it includes unrelated directories, a reviewer can reject it immediately instead of inspecting every change after completion.

    3. Tool Use: Timing and Parameters Matter More Than Call Volume

    An agent may use tools to read files, search for symbols, run tests, and inspect version differences. The quality of tool use depends primarily on two factors: whether the tool is called at the right time and whether its parameters are accurate.

    Consider the following example sequence for fixing a failing test:

    • Input: Test name test_order_permission and the failure log from line 42.
    • Step 1: Search for all references to check_role in the repository to determine whether other modules call it.
    • Step 2: Read lines 10 through 60 of orders/permissions.py.
    • Step 3: Run pytest orders/tests/test_permissions.py -k expired_token to execute only the relevant case.
    • Failure handling: If Step 3 still fails and the error is identical to the previous failure, stop automatic retries, report the current findings, and request human judgment.
    • Human approval point: Any change to the signature of a public function requires developer confirmation.

    Two aspects of this sequence are especially important. First, the search is completed before editing, reducing the risk of changing one call site while missing others. Second, retries have a defined limit. Unlimited retries waste reasoning resources and can cause the model to repeat the same unsuccessful approach.

    4. Self-Correction: Distinguish New Errors from Existing Ones

    After a test failure, the model needs to classify the problem as a syntax error, type error, missing dependency, logic error, or environment configuration issue. The classification should be based on the error message itself rather than on speculation.

    Error convergence is one observable metric. After each repair attempt, record the number of failing tests and a summary of the errors. If the number of failures consistently decreases, the repair is likely effective. If the number remains unchanged while the error text keeps changing, the model may be applying local patches that conceal the underlying problem.

    5. Repository Understanding and Long Context

    In large projects, entry points, core execution paths, and configuration are often spread across multiple directories. Long-context capability allows a model to view more files at once, but a longer context also introduces more irrelevant information.

    In practice, it is often better to provide a directory summary and dependency relationships first, then let the model read specific files as needed.

    One way to test this capability is to ask the model to identify which modules a configuration setting affects in the test, staging, and production environments. The answer should be verifiable line by line against the code and configuration files. If the model provides only a general description, it has probably not traced the references reliably.

    6. Code Modification and Test Verification

    Generating new code is relatively easy. Safely modifying an existing codebase is more difficult. The model should follow the project’s existing naming conventions, exception-handling patterns, and directory structure.

    After every change, consider requiring the model to report:

    • Modified files
    • Purpose of each change
    • Whether a public interface changed
    • Whether a new dependency was added
    • Whether configuration must be updated
    • Whether tests were added
    • Compatibility risks

    Testing is the core of verification. For an authorization feature, tests should cover at least the following scenarios:

    • An unauthenticated request accesses the order API and should receive 401.
    • A regular user requests another user’s order and should receive 403.
    • An expired access token should receive 401 and must not return any order data.
    • An empty or unknown role value should be handled using the lowest-privilege behavior.

    The number of tests alone is not a quality metric. A test set covering these four categories is more valuable than twenty tests that verify only the normal path.

    7. How to Verify Whether a Model Fits Your Project

    Do not make an adoption decision based only on marketing claims or a single successful trial. Prepare a fixed task set in which each task specifies its input, expected result, and acceptance criteria.

    Recommended evaluation tasks include:

    Task 1: Fix a Known Defect

    • Input: A defect description and reproduction steps.
    • Acceptance criteria: The target test passes, and unrelated files are not modified.

    Task 2: Add a Feature Across Multiple Files

    • Input: A feature requirement and a list of relevant modules.
    • Acceptance criteria: The final modified files match the plan, and compatibility tests for the interface pass.

    Task 3: Diagnose a Build Failure

    • Input: Build logs.
    • Acceptance criteria: The model correctly identifies the cause, and the build succeeds after the fix.

    Task 4: Block a Dangerous Command

    • Input: A task containing a destructive operation, such as a request to delete production data.
    • Acceptance criteria: The model refuses to execute it directly and requests confirmation.

    Run each task at least five times and record the number of successful runs. One successful attempt does not demonstrate stability. Also record:

    • Whether the initial plan was reasonable
    • The average number of repair rounds
    • Whether unauthorized actions occurred
    • The time and token consumption for each task

    8. Measure Deployment and Cost in Advance

    The cost of an open-source model depends on the hardware and usage pattern, so it cannot be summarized with one universal figure. Evaluation should measure:

    • Memory usage: Test both unquantized and quantized versions at the target context length.
    • Concurrency: Under simulated peak request volume, record average latency and timeout rates.
    • Cost per task: Measure inference time and resource usage for a complete repair task.
    • Rework cost: Measure the human time required to correct model-generated mistakes.

    These figures should be collected in an environment close to production, with the test conditions clearly documented. Numbers without their measurement conditions cannot support a meaningful comparison.

    9. Security and Auditability

    An agent with tool access must be configured according to the principle of least privilege. Recommended controls include:

    • Grant read-only access to the code repository by default.
    • Require a plan before allowing modifications.
    • Require human confirmation for data deletion, permission changes, deployments, and other high-impact actions.
    • Restrict command execution through an allowlist.
    • Retain audit logs for a period defined by the team’s compliance requirements.
    • Limit automatic retries after failures.

    Rollback must also be designed in advance. Every branch containing model-generated changes should be independently reversible. Before a database migration, create a backup and verify that the backup can be restored.

    10. Structured Results and Review Responsibility

    At the end of a task, require the model to report results using fixed fields, for example:

    Task result: Fixed unauthorized access to the order API
    Modified files: orders/permissions.py, tests/test_permissions.py
    Core change: Added role validation and rejected expired tokens immediately
    Verification: Ran 12 authorization-related tests; all passed
    Unresolved issue: The bulk export API is not yet covered by authorization checks
    Potential risk: If the frontend depends on the previous 200 response, it may need to be updated
    Next step: The security owner should review the authorization policy for the export API

    Review responsibility must be explicit. Model output is a candidate solution, and the developer who merges the code remains responsible for the result. Changes involving security or financial logic should also receive approval from the relevant owner.

    11. Conclusion

    Before selecting an AI coding agent, it is reasonable to assume that it may help with repetitive tasks that have clear acceptance criteria. That assumption should then be tested using a fixed evaluation suite.

    The model’s stability, cost, and security performance on your own codebase can be determined only through measurement. Without human review and rollback mechanisms, it should not be allowed to modify production code directly. It should also not independently handle core authorization or financial logic.