AI Agents That Score High but Underperform: Causes and Engineering Fixes

    This article examines why high-scoring large model agents often fail in real engineering environments, and how to turn that gap into observable, measurable problems. It breaks down three failure modes—goal drift, stalling with pseudo-confirmation, and verbose non-answers—and presents practical contracts, structured action schemas, layered evaluation, context governance, state-machine orchestration with guardrails, and interaction patterns that reduce uncertainty for developers. Readers will find concrete YAML, JSON, and Python examples, plus a deployment checklist for improving completion rates, reducing human intervention, and making long-running agents predictable.

    1. The Symptom: A Two-Hour Run That Asked About One Filename

    A recent case circulating in a technical community is representative. A user gave a coding tool an open-ended goal—a semantic /goal task—and expected it to autonomously clean up a codebase. After running for roughly two hours, the tool stopped and raised a single, highly peripheral confirmation request: whether a certain audio file should be renamed. The original poster described the feeling as “insecurity,” and that word is precise. The real anxiety was not that the model had done something wrong, but that the user could not tell what it had done or how much remained.

    This kind of feedback resonates with developers because it is not an occasional defect. It is a structural symptom of the current generation of large model agents in real engineering settings. Dismissing it as “the model is not smart enough” misses the opportunity to improve. A more effective approach is to decompose it into engineering problems that are observable, measurable, and addressable.

    2. Problem Abstraction: Three Observable Failure Modes

    2.1 Goal Drift

    In long-running tasks, the model’s anchoring on the final acceptance criteria decays over time. Early on it advances the main line; later it is captured by low-value details in the environment and repeatedly polishes irrelevant branches. The underlying cause is that the share of “goal tokens” inside the context window is diluted by tool output, logs, and error messages, and attention distribution shifts accordingly.

    A reusable mitigation is to externalize acceptance criteria into a structured file and force re-injection on every loop:

    1. # task_contract.yaml — the single source of truth for the task
    2. objective: "Unify resource naming across the project and fix references"
    3. acceptance:
    4. - "No leftover old-name references (0 hits in static scan)"
    5. - "Build and unit tests all pass"
    6. - "Change list can be traced item by item"
    7. out_of_scope:
    8. - "Media asset cleanup"
    9. - "Dependency version upgrades"
    10. budget:
    11. max_turns: 40
    12. stop_when: "all acceptance criteria met"

    The key is that out_of_scope and budget must be declared explicitly. An open-ended goal without boundary constraints is equivalent to setting the model’s exploration space to unbounded; drift is only a matter of time.

    2.2 Stalling and Pseudo-Confirmation

    “Two hours of work and only one irrelevant question” is usually not a permissions problem but decision-cost avoidance: when uncertain, the model tends to outsource uncertainty to the user, trading a low-information question for permission to keep waiting. The harder engineering problem is the opposite—pseudo-confirmation, where the model claims a verification was completed but never actually ran it.

    The corresponding governance is to turn both “asking” and “asserting” into constrained structured actions that require evidence:

    1. {
    2. "action": "ask_user",
    3. "blocking": false,
    4. "question": "Should media asset naming be in scope this time?",
    5. "default_if_silent": "Skip per out_of_scope",
    6. "evidence_required": null
    7. }
    1. {
    2. "action": "report_done",
    3. "claim": "Old-name references are cleared",
    4. "evidence_required": ["scan_result.json", "test_summary.txt"],
    5. "verified_by": "tool_call_id"
    6. }

    The core rules: blocking defaults to false so the task keeps moving when unattended; report_done must carry verifiable evidence, otherwise it counts as incomplete. Together these two rules suppress both stalling and false reporting.

    2.3 Verbose Non-Answers

    The original text cites a typical contrast: asked why a project got slower, one side produced four long sections of layered discussion without touching the cause, while the other gave the conclusion in one sentence—disk I/O is the bottleneck. The dissatisfaction is not about length itself but about “low information density plus a missing conclusion.” From a usability standpoint, answers should be ordered as conclusion, evidence, optional detail—not stacked as background, enumeration, more background.

    A practical output contract:

    1. [Conclusion] One sentence stating the root cause or result.
    2. [Evidence] At most 3 items, pointing to reproducible observations (metrics, log snippets, command output).
    3. [Impact] How it affects the acceptance items.
    4. [Next step] Only when there is a decision branch; otherwise write "No decision needed."

    During long loops, also cap the length of each interim report so intermediate output does not crowd out useful context.

    3. Evaluation: Why “High Scores” and “Usable” Diverge

    “High scores, low capability” is largely a product of mismatched evaluation targets. Multiple-choice benchmarks measure single-turn knowledge and reasoning, while developers care about long-horizon delivery: task completion rate, number of human interventions, rework rate, and cost per task. The correlation is limited, so topping a leaderboard does not automatically translate into production readiness.

    Teams should build layered evaluation close to their own scenarios:

    • Layer 1, capability baseline: atomic skills such as code comprehension, cross-file refactoring, and test generation;
    • Layer 2, task closure: given a repository and acceptance criteria, measure first-pass rate and average interventions;
    • Layer 3, long-horizon stability: measure goal drift rate and pseudo-confirmation rate over 30+ loops;
    • Layer 4, cost efficiency: tokens and wall-clock time consumed per completed acceptance item.

    Among these, “number of human interventions” is closest to lived experience and easiest to collect, making it a good primary gate metric for version upgrades.

    4. Context Governance: The Underlying Lever Against Drift and Redundancy

    The model’s attention is a finite resource, and the context construction function determines how it is allocated. The engineering recommendation is layered context:

    1. Pinned layer: task contract, acceptance criteria, and a coding-standard summary, always placed at prominent start and end positions;
    2. Rolling layer: the most recent tool calls and results, preserving raw error messages;
    3. Archive layer: historical logs written to external storage, re-injected by retrieval only when needed;
    4. Compression layer: structured summaries of long outputs, keeping only conclusions and key paths.

    Combined with retrieval-based re-injection, this significantly reduces dilution of goal tokens by irrelevant content. A simplified implementation:

    1. def build_context(contract, recent_turns, archive, query, k=5):
    2. pinned = render(contract) # pinned, placed once at start and once at end
    3. hits = archive.search(query, top_k=k) # archive re-injected on demand
    4. return "\n\n".join([pinned, render(recent_turns[-8:]),
    5. render(hits), pinned])

    Three practical points: do not summarize away error messages, since they are the main signal for model self-correction; truncate tool output and mark the truncation point so oversized logs do not drown the instructions; restate acceptance criteria every loop—the cost is minimal and the payoff is clear.

    5. Orchestration and Guardrails: Confining Autonomy to a Verifiable Loop

    Autonomous execution should not be a single long call but a state machine with checkpoints:

    1. plan → act → verify → (pass ? commit : revise)
    2. ↑__________________|
    3. Every loop: re-inject contract / validate evidence / update progress board

    Supporting guardrails include: change-size thresholds (force splitting when files or lines changed in one pass exceed a limit), a whitelist for dangerous operations (deletion, force push, production config changes require explicit authorization), rollback mechanisms (a separate branch or snapshot per loop), and timeout and budget circuit breakers. The budget circuit breaker matters especially: it converts “endless self-doubt” into an expected interruption and report.

    For deployment, such long tasks typically need a message queue for task distribution, a container platform to host isolated execution environments, object storage to keep per-loop artifacts and evidence, and logging plus monitoring and alerting for observability. Baidu AI Cloud offers corresponding product categories for these general capabilities, which can be combined as needed; specific interfaces are not covered here.

    6. Interaction Design: Make Questions Produce Information, Not Anxiety

    Asking is not the problem; the timing and information content are. Three recommended rules: batch questions, merging similar uncertainties into one checklist confirmation; defaults first, offering an actionable default and allowing the user to pass by silence; tiered escalation, blocking only for irreversible operations or conflicts with acceptance criteria.

    A question checklist template:

    1. > The following 3 items will run with defaults; point out the number to change:
    2. > 1) Media asset naming → default: not in scope this time
    3. > 2) Old interface retention → default: keep for one version cycle
    4. > 3) Commit granularity → default: split by module

    This reduces the user’s cognitive load from “figuring out what the model is doing” to “confirming a few defaults,” and is the most direct way to remove insecurity.

    7. Implementation Checklist

    • Write a task contract file for every long task, explicitly declaring out-of-scope items and budget;
    • Bind completion assertions to evidence; no evidence means no commit stage;
    • Standardize reports with a conclusion-first template and cap interim output length;
    • Build four-layer evaluation, using human intervention count as the version gate;
    • Layer context and re-inject acceptance criteria each loop; retrieve archived logs on demand;
    • Replace single long calls with a state machine plus guardrails; configure budget circuit breaking and rollback;
    • Make questions batched, default-carrying, and tiered in blocking.

    8. Conclusion

    “High scores, low capability” is not a ceiling on model ability but a symptom of missing engineering constraints. Externalize the four things—goal, evidence, boundary, budget—as verifiable contracts, then combine layered context with state-machine orchestration, and long-horizon agents shift from “an unpredictable lottery” to “a predictable pipeline.” Differences in aesthetics and expression style are product-tuning questions, while completion rate, intervention count, and traceability are engineering questions—and the latter is the key variable that determines whether developers will subscribe for the long term at this stage.