Evaluating AI Agents on Task Execution and Engineering Reliability

    Evaluating an AI agent is not enough if its explanations sound careful. This article argues for judging agents on whether they converge on user goals, using a leak-repair analogy and software-debug practices: task contracts, drift control, evidence management, context, least privilege, and delivery-focused evaluation.

    Do not judge an AI agent only by whether it “sounds rigorous”

    Imagine a home leak. A technician can use instruments, look up documentation, and contact other people. They keep stating the limits of their judgment: damp walls do not prove a burst pipe; water in a pipe does not prove a leak; a failed measurement does not prove the measured object does not exist.

    Those statements may all be true. If hours pass, the leak is still uncontrolled, and the investigation has drifted from wall moisture to positioning systems, environmental interference, and the water utility, the core problem is not a lack of knowledge. It is uncontrolled task execution.

    AI agents can fail the same way: every step has a rationale, every tool call has an explanation, yet the work does not converge on the user’s goal.

    Evaluating an agent therefore needs three layers:

    • Correctness of statements: whether facts, limits, and uncertainty are described accurately.
    • Local action quality: whether a given check actually addresses the current critical question.
    • Overall task effectiveness: whether the sequence of actions moves toward a solution and meets acceptance criteria.

    The first two do not substitute for the third. A system that endlessly avoids wrong conclusions but never delivers a useful result still lacks reliable engineering execution.

    Define a task contract before calling tools

    When a user says “fix the leak,” they may mean several goals: contain damage, locate the fault, repair it, confirm recovery, and explain residual risk. If the agent never turns those goals into constraints, “learn as much as possible” becomes an excuse for unbounded exploration.

    A task contract should at least include the following.

    1. Clear deliverables

    In the repair scenario, the deliverable is not “an investigation.” It is the fault location, evidence, the treatment applied, and recheck results.

    In software, if the user reports “fix failed requests,” deliverables usually include:

    • a reproducible problem description;
    • direct evidence tied to the failure;
    • a bounded fix;
    • verification after the change;
    • remaining risks and scope of applicability.

    If permissions or conditions are insufficient, the deliverable can be a verified diagnostic report and explicit blockers. Unverified speculation must not be packaged as a completed fix.

    2. Clear operating scope

    Permission to read logs is not permission to change production configuration. Permission to inspect one service is not permission to retune the whole system. Permission to contact people is not permission to obtain full account access.

    Scope should be agreed in advance and rechecked before high-impact actions. A clear goal does not automatically grant every permission needed to reach it.

    3. Clear acceptance criteria

    “The change succeeded” is not the same as “the problem is solved.”

    A successful file write only shows the edit happened. A process restart only shows a new runtime state. Only when the originally failing business path works, relevant regression checks pass, and there are no obvious side effects can you claim the fix is effective.

    Clearer acceptance criteria make it harder for the agent to substitute process narrative for delivery.

    Task drift: why locally reasonable steps form an invalid process

    When leak investigation drifts into positioning and environment, the pattern is an unbounded dependency chain: moisture requires confirming flow; a failed flow measurement requires studying interference; interference requires location; location requires more environment checks.

    Every subproblem can be split further, producing an exploration tree with no boundary.

    1. Treating auxiliary questions as necessary prerequisites

    The key question is not “could this information be useful?” It is “without this information, can we not decide the next step?”

    After seeing fresh water traces near a pipe section, it is reasonable to inspect joints, isolate locally, and watch pressure. You may still locate the leak without local environmental parameters.

    The same applies to software troubleshooting. A failed performance measurement does not mean you must first repair the entire measurement stack. If you already have error logs, a request trace, and stable reproduction, you can advance diagnosis with more direct evidence.

    2. Not comparing action cost and benefit

    The agent should prefer actions that discriminate among key hypotheses at low cost and controllable risk—not whatever tool it can still call.

    A simplified priority idea: action value is how much it reduces uncertainty for the current decision, constrained by time, operational risk, permission cost, and failure probability.

    The system need not compute every variable exactly. Before acting, it should answer:

    • Which hypothesis does this action test?
    • How would different outcomes change the decision?
    • Is there a more direct, lower-cost alternative?
    • If it fails, when do we stop trying?

    If no outcome would change the repair plan, that action should not be the current priority.

    3. Missing stop conditions

    Continuous exploration needs budgets and exits: time budget, tool-call budget, limits on repeated failure, and human approval for high-risk actions.

    Exhausting the budget does not justify a hasty conclusion. The right move is to report current evidence, remaining uncertainty, and options, so the user can continue, shrink scope, or hand off to a human.

    Evidence management: neither over-infer nor keep infinite doubt

    The technician who keeps saying “this does not prove anything” reduces false inference. If the system only lists conclusions it cannot draw, and never states what it has learned, the investigation does not accumulate progress.

    1. Separate observations, hypotheses, and conclusions

    Keep the investigation record in three classes:

    • Observed facts: instrument readings, log content, reproduction results, and other direct records.
    • Hypotheses to test: explanations of the failure mechanism that still need evidence.
    • Supported conclusions: judgments with enough evidence in the current scope, with limits noted.

    For example:

    “Water droplets keep appearing at the joint” is an observation.

    “A damaged seal is causing the leak” is a hypothesis.

    “After replacing that seal, seepage no longer appears under the same inspection conditions” supports that the repair worked, still subject to necessary rechecks.

    That record style supports the next action better than emphasizing uncertainty alone.

    2. Root cause must be actionable

    “Water is outside the supply system” restates the leak. It does not guide a fix.

    Useful root-cause analysis should try to state:

    • where the fault is;
    • which component or condition is abnormal;
    • how the abnormality produces the symptom;
    • which evidence supports that explanation;
    • which factor you can change to test or remove the fault.

    In software, “the request was not processed successfully” is not a root cause. A more useful account lands on a concrete condition—for example, an exception path that skipped required cleanup, leaving resources occupied—and that mechanism can be verified by reproduction and change.

    3. Confidence should match action risk

    Low-risk, reversible checks can run with incomplete evidence. High-impact, hard-to-roll-back operations need stronger evidence and explicit authorization.

    The agent does not need equal certainty on every detail. Evidence strength should match decision consequences, not absolute certainty before every action.

    Context compression: keep task state, not only the latest dialogue

    In long tasks, context compression can worsen goal drift. If a summary only keeps “currently studying environmental interference” and drops “the user needs the leak stopped” and “this branch is only an auxiliary check,” the agent may promote a side branch to the main task.

    A reliable state summary should include:

    • original goals and acceptance criteria;
    • confirmed facts and evidence sources;
    • untested hypotheses;
    • actions taken and their results;
    • excluded or paused branches and why;
    • current permissions and prohibitions;
    • the next action and its expected decision value;
    • remaining budget and human-confirmation points.

    Negative results matter. “A detection method failed” is not “the measured object does not exist.” Once that failure is recorded, the same check should not be repeated without a change in conditions.

    When the user corrects course mid-task, explicitly update goal priority and the action plan. A verbal promise not to drift is not enough; later tool calls still need a relevance check against the goal.

    Minimal fix and least privilege must be scoped by impact

    “Minimal fix” is not a count of edits. Shutting off water to an entire building may be a single operation, but it is not a low-impact treatment for a local leak.

    1. A minimal fix is the smallest effective intervention

    A reasonable fix solves the problem while reducing affected objects, change surface, and recovery cost.

    Software fixes should follow the same idea:

    • prefer changes directly tied to the verified failure mechanism;
    • avoid unrelated refactoring;
    • state potential side effects;
    • prepare a rollback;
    • verify in a controlled scope before widening.

    Minimal does not mean treating only the surface symptom. If evidence shows a shared component is at fault, fixing that component may be more reasonable than workarounds on every caller.

    2. Permission requests must be specific and necessary

    “Need to contact relevant people” does not justify full access.

    A permission request should state the resource, allowed operations, duration, potential impact, and how access is revoked. Read-only diagnosis and configuration change should be separate. Short-lived grants should expire after the task. Sensitive credentials should not appear in ordinary logs or state summaries.

    User consent to an authorization does not mean the agent should use every granted right. Least privilege still applies, with independent confirmation for out-of-scope, high-risk, or hard-to-roll-back actions.

    Build an agent execution loop that can converge

    A more reliable loop is:

    confirm goal → form hypotheses → choose checks → update evidence → decide and repair → verify acceptance → report.

    Each cycle should answer four questions:

    1. What uncertainty most needs to be removed now?
    2. Can the next action reduce it directly?
    3. How will the result change later decisions?
    4. Does this hit budget, permission, or risk boundaries?

    Tool-execution results should be recorded separately from task results. A successful call does not mean the hypothesis is true. A completed command does not mean the fix worked. An external party accepting a request does not mean the user’s goal was met.

    When results contradict expectations, update hypotheses rather than stretching the old explanation to keep the plan. If needed, fall back to the last evidence-supported state and choose a new check path.

    How to evaluate agents for delivery

    Evaluate results, cost, risk, and process traceability together.

    1. Task completion and fix quality

    Check predefined acceptance criteria, coverage of the original failure path, and undisclosed limits. Do not score from the agent’s self-report of “done.”

    2. Exploration efficiency and course correction

    Record time, tool-call volume, repeated failures, irrelevant branches, and user corrections. Fewer calls are not always better; each call should produce valuable information.

    3. Change risk and permission discipline

    Look for out-of-scope changes, unnecessary grants, exposure of sensitive information, and records of rollback and approval.

    4. Evidence and communication quality

    The final report should distinguish facts, speculation, completed operations, and unverified items. If the task is incomplete, state blockers honestly rather than packaging investigation as achievement.

    Test scenarios should include unavailable tools, missing information, insufficient permission, context compression, and mid-task goal changes. Those conditions expose weaknesses in real workflows.

    Conclusion

    An AI agent’s reliability is not how many explanations it can generate or how many tools it can call. It is whether it organizes action around the user’s goal.

    A usable system avoids both evidence-free inference and endless exploration in the name of caution. It can find problems and bound repair impact. It can ask for help and still hold permission boundaries. It proves delivery with independent verification that the original problem is actually solved.

    For developers, the main design principle is to put goals, evidence, budget, permissions, and acceptance in one execution loop, so every action can answer why it helps complete the task.