Command-Line Agent Evaluation: Beyond Completion Rates to Safety and Reliability

    Evaluating command-line AI agents requires more than measuring task completion. This article explains how to define verifiable outcomes, interpret small performance differences, measure consistency across repeated runs, assess cost per valid delivery, and evaluate execution frameworks and safety separately. It also outlines a reproducible enterprise evaluation process focused on correct, safe, stable, auditable, and cost-controlled execution.

    1. Why Command-Line Agents Need Their Own Evaluation Framework

    A command-line agent does more than generate text or code. It typically needs to understand a goal, inspect its environment, plan operations, invoke tools, read execution results, and adjust its actions based on feedback. Task completion depends on the combined effects of model reasoning, tool use, the execution framework, and environmental constraints.

    For example, “fix a failing build” appears to describe a single objective. In practice, it may require diagnosing the error, checking dependencies, modifying configuration, running validation, and confirming that the changes have not introduced new problems. Even an agent that identifies the correct cause can fail to deliver an acceptable result through incorrect file operations, excessive changes, or insufficient verification.

    Evaluation must therefore go beyond whether an answer looks reasonable. It needs to establish whether execution succeeds, results are consistent, operations are safe, and resource consumption is acceptable.

    The reference material reports a highest average task completion rate of 62.5%. This indicates substantial room for failure even among the more capable configurations in the evaluated task set. It does not mean that agents will achieve the same success rate in every production setting. Task difficulty, environment configuration, permitted tools, and evaluation criteria all affect the final score.

    2. Completion Rate Is a Starting Point, Not a Complete Assessment

    Define What “Complete” Means

    Evaluation tasks need explicit, executable acceptance criteria rather than relying on an agent’s own declaration of success.

    For file-processing tasks, verification can check whether the target file exists, whether its contents meet the requirements, and whether unrelated files remain unchanged. For code changes, it can assess functional tests, interface compatibility, and the scope of modifications. For environment maintenance, it should check whether the target state has been reached, critical services are functioning, and configuration matches expectations.

    A well-defined task should include at least:

    • The initial environment and input materials.
    • The objects that may be modified and the permitted scope of changes.
    • An explicit final state.
    • Automated correctness checks.
    • Safety checks independent of correctness.
    • A time, tool-call, or resource budget.

    Without these constraints, a completion rate may measure only how often a task appears to be finished, making it unsuitable for engineering decisions.

    Small Leads May Not Be Statistically Meaningful

    In the reference material, the average completion rates of the top three results differ by only 1.1 percentage points. Such a narrow gap does not, by itself, demonstrate a consistent advantage for any particular approach.

    Assessing whether a difference is credible requires information about the number of tasks, repeated runs, task difficulty distribution, and whether all configurations ran under the same conditions. It also requires examining where the difference comes from: sustained performance on complex tasks, or score fluctuations caused by a few edge cases.

    In practice, evaluators can report confidence intervals or use task-paired statistical analysis. When runs are repeated, results from the same task are not fully independent. Each run should not simply be treated as an unrelated sample.

    Averages Can Hide Structural Weaknesses

    A high overall completion rate does not imply reliability across every task category. An agent may perform well on localized file changes but struggle with analysis across directories. It may handle single-step operations effectively while omitting checks in longer workflows.

    Results should therefore be broken down by task category, step complexity, required permissions, and potential impact. For enterprise users, reliability on business-critical task types often matters more than the average score across a mixed task set.

    3. Repeated Attempts Measure Consistency, Not Just Potential

    The reference material reports an important set of repeated-run results: one configuration succeeded at least once across three attempts on 75.1% of tasks, but succeeded on all three attempts on only 48.8%.

    These metrics describe different capabilities.

    “At least one success in three attempts” measures how many tasks a system can cover when retries are allowed. “Success on all three attempts” is a closer indicator of consistent delivery. The 26.3-percentage-point gap shows that many tasks were solved intermittently rather than reliably.

    Retries may be reasonable for exploratory work with human review. For automated maintenance, unattended execution, or workflows with strict deadlines, occasional success is not enough.

    Repeated attempts are also often correlated. A fixed knowledge gap, environmental limitation, or flawed strategy can cause the same task to fail repeatedly. Evaluators should not assume independent success probabilities and calculate retry benefits on that basis.

    A useful report should include:

    • Single-run completion rate.
    • The proportion of tasks completed at least once within a fixed number of attempts.
    • The proportion of tasks completed successfully on every attempt.
    • Average attempt count and total resource consumption.
    • Whether the verifier can correctly identify successful results.

    The final point is particularly important. If the system cannot determine which result is correct, producing a successful attempt does not necessarily translate into reliable delivery.

    4. Measure Cost per Valid Delivery, Not Just Cost per Run

    Estimated per-run costs in the reference material range from approximately $0.05 to $1.10. This spread shows why agent economics cannot be assessed through completion rates or individual invocation prices alone.

    The first step is to define what the cost includes: all model calls, tool execution, the runtime environment, failed retries, and human review. Figures calculated using different cost boundaries are not directly comparable.

    A basic metric is:

    Average cost per valid delivery = Total evaluation cost ÷ Number of deliveries that pass both correctness and safety checks

    This metric is closer to business value than cost per run because it spreads the cost of failures across valid deliveries. If the system also requires human inspection, repair, or rollback, the calculation should extend to:

    Full delivery cost = Execution cost + Review cost + Repair cost + Necessary recovery cost

    This does not mean that the cheapest approach is always best. It means that budget optimization should not be reduced to lowering the cost of individual calls. A cheap workflow that frequently produces unusable results may consume more engineering resources. A more expensive but consistent and safe workflow may offer better overall economics for certain tasks.

    In practice, budgets should be tiered by task risk. Low-risk tasks that are easy to verify can use smaller budgets. Complex or high-impact tasks warrant stronger validation and human approval checkpoints. Specific budgets should be based on measurement rather than assumptions about a model’s positioning.

    5. Execution Frameworks Should Be Evaluated Beyond Average Pass Rates

    The reference material reports similar average pass rates across different execution frameworks, with several results clustered around 45%. Under those evaluation conditions, framework category or degree of openness alone does not adequately explain differences in completion rates.

    Similar averages do not mean that frameworks have no effect. The execution framework connects the model to its operating environment, and its design can influence context organization, command feedback, failure recovery, and operational boundaries.

    Framework evaluation should examine the following areas.

    Is Tool Feedback Complete?

    Are command exit statuses, standard output, and standard error accurately passed back to the agent? Is long output truncated? If so, are critical error details preserved?

    Missing feedback can cause the model to continue operating with an incorrect understanding of the environment.

    Does Context Management Preserve Critical Constraints?

    Long-running tasks require the agent to retain the objective, completed steps, and prohibited operations. If context compression loses constraints, the agent may repeat actions, drift from the objective, or cross safety boundaries.

    Is Failure Recovery Controlled?

    After a timeout, interruption, or tool failure, the system should be able to describe its current state. Blind retries can cause duplicate writes or repeated external actions. Recovery procedures therefore need to account for task idempotency.

    For fair comparisons, evaluators should keep tasks, permissions, budgets, verifiers, and execution environments as consistent as possible, while recording all configuration differences. Otherwise, observed differences may reflect resources or permissions rather than the framework itself.

    6. Correctness and Safety Must Be Judged Separately

    According to the reference material, 15.7% of 53,100 runs failed at least one safety check. Among the 26,151 runs that met every correctness criterion, 2,589 still failed a safety requirement—approximately 9.9% of correct runs.

    Functional correctness is therefore not a substitute for safety.

    A task may produce the correct file while modifying an unrelated directory. It may pass tests while reading sensitive information that was unnecessary for the task. Achieving the business objective demonstrates compliance with only part of the requirements; it does not establish that the execution process was acceptable.

    At the same time, failing a safety check should not automatically be equated with a real-world security incident. Actual impact depends on the check definitions, violation types, and execution environment. Because the reference material does not provide the complete checking rules, these figures cannot establish the severity of each failure.

    A general safety evaluation can cover:

    • Whether the agent crosses file or directory permission boundaries.
    • Whether it performs unauthorized high-impact operations.
    • Whether it exposes sensitive data.
    • Whether it accesses unapproved external resources.
    • Whether instructions in untrusted content influence its behavior.
    • Whether sufficient execution records are retained for auditing.

    Final outcomes should distinguish at least four categories:

    1. Correct and safe.
    2. Correct but unsafe.
    3. Incorrect, with no detected safety violation.
    4. Incorrect and unsafe.

    Only the first category should count toward the safe completion rate.

    7. Building a Reproducible Enterprise Evaluation Process

    Step 1: Extract Tasks from Real Workflows

    The task set should cover frequent, difficult, and high-impact scenarios—not just simple operations that are easy to verify automatically. Input materials should be sanitized while preserving the structure, complexity, and constraints of real business work as closely as possible.

    Step 2: Freeze the Environment and Isolate Execution

    Each run should start from a consistent initial state. Use isolated environments to limit file access, network access, and resource consumption. External dependencies should be fixed where possible so that environmental changes are not mistaken for changes in agent capability.

    Step 3: Define Budgets and Stopping Conditions in Advance

    Before evaluation, specify maximum runtime, resource budgets, retry counts, and operations that require approval. Loosening conditions after observing failures makes results less comparable.

    Step 4: Verify Outcomes and Execution Separately

    Correctness verification examines the final artifacts. Safety verification examines execution behavior and its effects. The two sets of checks should run independently; passing functional tests must not bypass safety checks.

    Step 5: Record Full Traces and Classify Failures

    Retain model decisions, tool calls, environmental feedback, and verification results. Classify failures as misunderstanding, planning errors, execution errors, missing validation, budget exhaustion, or safety violations.

    This avoids attributing every problem to insufficient model capability.

    Step 6: Continuously Run Regression Tests on Critical Scenarios

    After changes to model configuration, tool permissions, or the execution framework, rerun the core task set. Add previously discovered failure cases to regression tests.

    This turns optimization from a one-time score improvement into a continuing process of risk reduction.

    8. Conclusion: Evaluate What Agents Can Reliably Deliver

    The purpose of a command-line agent benchmark is not simply to produce a completion score. It is to help developers identify system limitations in complex execution environments.

    The highest average completion rate of 62.5% points to substantial room for reliability improvements. Repeated-run results reveal the difference between occasional and consistent success. The cost range shows why per-run pricing is an incomplete measure of economics. Safety-check failures among correct runs reinforce the need to validate outcomes and constrain execution in parallel.

    Enterprises adopting agents should evaluate correctness, safety, consistency, auditability, and cost control together. Only then can they determine whether an agent is suitable for a real workflow—not merely whether it can achieve a higher benchmark score.