Long-程 AI Agent Benchmark: Four Findings After 10 Million Tokens

    This article reports on a load test that consumed roughly 10 million tokens to evaluate long-horizon AI agents on tasks that go beyond a single question-answer turn, such as delivering a small engineering project independently. It summarizes four findings: long-horizon autonomous execution is becoming a dividing line, complex reasoning shows promise but lacks stability, lightweight tasks can suffer from overthinking, and rising per-token prices can be offset by context caching. The article also provides a reusable checklist covering task design, execution guardrails, result validation, tiered model selection, cost observability, and failure archiving.

    1. Why Run a Test That Burns Through Millions of Tokens

    Single-turn question-answer benchmarks are no longer enough to tell the whole story. What really determines whether a large language model can move into production is whether it can deliver reliably under long-horizon, multi-tool, self-correcting conditions. To that end, we designed a load test that consumed roughly 10 million tokens in total, raising the task from “write a function” to “independently deliver a small engineering project,” and observed how the model performed in planning, execution, validation, and cost with no human intervention.

    Note that this article does not benchmark any specific product. Instead, it abstracts the observations into general engineering conclusions: the dimensions for evaluating long-horizon agent capability, common failure modes, and mitigation approaches.

    2. Finding 1: Long-Horizon Autonomous Execution Is the Dividing Line

    For database design and server-side development tasks, we deliberately avoided overly detailed constraints and provided only the business goal, in order to test the model’s ability to break the work down on its own.

    The model’s behavior followed a rough path: it first produced a design proposal (functional module breakdown, data table structure, API boundaries), then arranged the development order itself, and finally generated an acceptance checklist and verified each item one by one. It then entered a continuous execution phase, producing code for nearly an hour without interruption, infinite loops, or skipped steps.

    This behavior can be abstracted into a closed loop:

    1. Goal input -> Solution planning -> Module-by-module implementation -> Self-validation -> Correction -> Delivery

    What is genuinely scarce in engineering is not “being able to write code,” but maintaining long-horizon consistency: still remembering the original constraints as the context keeps growing; being able to localize a failure at a given step instead of rewriting everything; and switching to another path when a tool call fails instead of getting stuck. To judge whether a model has this capability, we suggest measuring three indicators: task completion rate, number of human interventions, and share of wasted tokens.

    3. Finding 2: Complex Reasoning Shows Promise, but Stability Is the Weak Point

    On logic puzzles that require multi-step backward reasoning, the model performed well and was able to propose hypotheses and rule them out step by step. However, on high-difficulty competition-level math problems and some minimalist tests, two typical failure modes appeared:

    • Infinite loops: repeatedly validating the same branch, with tokens continuously consumed but no convergence;
    • Premature convergence: producing a conclusion that looks plausible but is actually wrong.

    The conclusion is clear: reasoning capability should be judged by the lower tail of the distribution, not the average. In production systems, the cost of a single wrong inference is often higher than the benefit of nine correct ones. Practical mitigations include: setting a maximum step count and budget cap for reasoning, requiring the model to explicitly list assumptions and verification steps, and introducing a second-pass check or voting mechanism for critical conclusions.

    4. Finding 3: “Overthinking” on Lightweight Tasks

    A counterintuitive observation: on small problems with simple rules and a single correct answer, the more capable version sometimes took a detour, overcomplicating simple conditions and ultimately answering incorrectly, while the lightweight version gave the answer directly and achieved a higher accuracy rate.

    This suggests that model selection should not default to “bigger is always better,” but should be tiered by task:

    Task type Recommended strategy
    Long-horizon engineering, cross-file refactoring High-capability version + strict acceptance checklist
    Single-step reasoning, complex logic High-capability version + step/budget constraints
    Light tasks such as extraction, rewriting, classification Lightweight version, low latency and low cost

    At the same time, “thinking budget” control should be applied on the prompt side, explicitly telling the model when it can answer directly to avoid unnecessary self-deliberation.

    5. Finding 4: Unit Prices Rise, but Caching Levels Out the Total Bill

    In long tasks, the prefix (system prompt, project conventions, existing code) is carried repeatedly. If the platform supports a context caching mechanism, repeated prefixes do not need to be billed or recomputed, and both end-to-end latency and cost drop significantly. Therefore, when evaluating cost, you should not look only at the per-million-token price, but at the total cost per task:

    1. Cost per task ≈ (new tokens × unit price) + (cache-hit repeated prefix × discounted unit price) + retry overhead

    Practical recommendations: keep stable project conventions and directory descriptions at the front of the prompt to improve cache hit rates; split long tasks into stages with reusable prefixes; and set a cap on failed retries to avoid “burning tokens” while debugging. On the engineering side, logging services and monitoring alerts can also be used to aggregate token consumption by task and pinpoint abnormal amplification.

    6. A Reusable Implementation Checklist

    1. Task design: give the goal, not the steps, but always give acceptance criteria;
    2. Execution guardrails: three caps — maximum duration, maximum steps, and maximum token budget;
    3. Result validation: automated tests plus checklist-based self-checks, verifying core functionality item by item;
    4. Tiered selection: route tasks to different capability tiers based on task complexity;
    5. Cost observability: use total cost per task rather than unit price as the core metric, and make good use of caching and prefix reuse;
    6. Failure archiving: turn cases of infinite loops and overthinking into regression test cases.

    7. Conclusion

    The core insight gained in exchange for millions of tokens is this: long-horizon autonomous execution is already usable, but stability and cost controllability still need engineering safeguards. Shifting capability evaluation from “average score” to “lower-tail risk,” and cost evaluation from “unit price” to “total cost per task,” are the two keys to getting long-horizon agents into production for real.