Long-程 AI Agent Testing at 10 Million Tokens: 3 Surprises and 1 Unexpected Finding

    This article reports on a large-scale test of long-horizon AI agents that consumed tens of millions of tokens. It explains why small-sample evaluations are noisy, then walks through three positive findings—unattended autonomous execution for close to an hour, stronger structured reasoning when paired with tools, and more predictable costs through context caching—plus one counterintuitive result: a heavier model can overthink simple tasks and lose accuracy. It closes with practical engineering recommendations on sandboxing, external computation tools, difficulty-based model routing, and token observability. All observations are general technical findings and do not target any specific vendor or product.

    1. Why Test at the 10 Million Token Scale

    The biggest problem with small-sample evaluation is noise. Conclusions drawn from a few dozen question-answer pairs are easily distorted by prompt wording, random sampling, and context length. Only when consumption is pushed into the tens of millions of tokens does the model’s real behavior distribution emerge: which capabilities are stable, and which are occasional flashes of insight.

    The goal of this test was not to score a particular model, but to answer the three questions engineering teams care about most: Can it work autonomously over long stretches? Is its reasoning reliable? Is its cost predictable? Note that all capability descriptions here are general technical observations and do not refer to any specific vendor or product.

    2. Surprise 1: 60 Minutes of Autonomous Execution Without Human Intervention

    The most valuable finding came from an agentic coding scenario. Given only a goal and no fine-grained constraints, the model first produced a complete plan: it broke out core functional modules and data tables covering bookkeeping and transaction statistics, then set its own development order and verification checklist.

    It then entered an unattended execution phase, running for close to an hour with no interruptions, infinite loops, or skipped steps. The delivered system had working core functionality, wrote data without errors, and only fell short on UI polish.

    What matters here is not “how much it wrote” but the coupling of three capabilities:

    • Long-horizon planning: turning a vague goal into executable, verifiable subtasks;
    • Self-correction: after a runtime error, reading logs, changing code, and re-verifying to close the loop;
    • Tool use: switching reliably between the terminal, the file system, and the browser.

    A schematic execution skeleton looks like this:

    1. plan = planner.decompose(goal) # Goal decomposition
    2. for task in plan.tasks:
    3. patch = coder.solve(task) # Generate changes
    4. result = sandbox.run(patch) # Execute in an isolated environment
    5. if not result.ok:
    6. patch = coder.repair(result.log) # Self-repair based on logs
    7. verifier.check(task.acceptance) # Check against the acceptance list

    Engineering takeaway: long-horizon tasks must be paired with a sandbox, version rollback, and an acceptance checklist. Otherwise, the stronger the autonomy, the greater the cost of losing control.

    3. Surprise 2: A Higher Ceiling for Structured Reasoning and Tool Collaboration

    On logic problems requiring multi-step hypotheses and shifts of perspective, the model performed steadily, proactively enumerating branches and ruling out contradictory conditions. This suggests its chain of thought converges well on constraint-satisfaction problems.

    However, the same model fluctuated noticeably on olympiad-level math problems, with some items falling into repeated re-verification loops. The reason is that such problems require long chains of precise symbolic manipulation, where a single calculation error is amplified along the chain, and the model lacks an external means of verification.

    A practical engineering approach is to bring in external deterministic tools, letting the model handle modeling and the tool handle computation:

    1. Model: formalize the problem into equations/constraints → call a computation engine to solve → read back the result and judge its plausibility

    4. The Unexpected Finding: Overthinking on Lightweight Tasks

    The most counterintuitive observation was that the heavier model was actually more error-prone on simple common-sense questions: it launched lengthy reasoning, pulled in irrelevant variables, and ended up drifting from the obvious answer, while the lightweight version answered directly with higher accuracy.

    This suggests that model selection cannot look at capability ceilings alone; it must also match the “thinking budget” to task complexity. In practice, you can add difficulty routing:

    1. if estimated_difficulty(task) < THRESHOLD:
    2. return fast_model.generate(task, reasoning="low")
    3. return strong_model.generate(task, reasoning="high")

    Pairing this with a prompt constraint to “give the conclusion first, then the reasoning” can significantly reduce wasted reasoning overhead on small tasks.

    5. Cost Control: A Higher Unit Price Does Not Mean a Higher Bill

    In long-task scenarios, repeatedly reading large amounts of context is the main source of cost. Services with context caching can amortize the repeated computation of a stable prefix, so the total bill grows noticeably slower than the unit price. Optimization measures include: keeping the order of the system prompt and tool definitions fixed, placing volatile content later, and summarizing long documents in layers. You should also connect logging and monitoring with alerts, tracking tokens and cache hit rate per task, so you can locate the real cost bottleneck.

    6. Implementation Checklist

    1. Replace single-turn answer accuracy with “planning quality, correction success rate, acceptance pass rate”;
    2. Enforce sandboxes and rollback-capable version control for long-horizon tasks;
    3. Connect deterministic computation tools to reasoning tasks;
    4. Route models and thinking budgets by difficulty;
    5. Build observability for tokens and caching.

    Overall conclusion: the new generation of models is already engineering-viable for long-horizon agent tasks, with weaknesses concentrated in reasoning stability and a sense of proportion on simple tasks. Understanding these three points is what turns capability into real productivity.