Long-程 AI Agent Benchmark: Lessons from 10 Million Tokens
This article reports on a hands-on benchmark of long-horizon AI agents that pushed token consumption into the tens of millions. It covers four main findings: a 60-minute autonomous coding loop, unstable performance on complex reasoning, overthinking on lightweight tasks, and how caching changes cost structure. You will also find a reusable evaluation checklist and practical patterns for acceptance scripts, external verification, and tiered model routing.
1. Background: Why Move Beyond Single-Turn Q&A
Model evaluation has traditionally meant running a handful of questions or code snippets. But once a model is placed inside real-world settings such as AI coding tools, automated operations, or data pipelines, the evaluation criteria have to change. A real task is not a single question-and-answer exchange; it is an execution chain that can run for tens of minutes or even hours: understand the goal, break it into steps, call tools, read feedback, detect and fix errors, retry, and finally self-check before delivery.
For this benchmark, we scaled consumption to the tens-of-millions-of-tokens range. The point was not to inflate a number, but to surface problems such as long-horizon stability that only appear during extended runs.
We narrowed our observations to three main threads and one surprise: long-horizon autonomous coding, the stability of complex reasoning, efficiency on lightweight tasks, and how the cost structure shifts under caching.
2. Surprise One: A 60-Minute Unattended Engineering Loop in Autonomous Coding
For two tasks—database design and setting up a mobile simulation environment—we deliberately reduced constraints and provided only the goal and acceptance criteria, in order to test the model’s autonomous planning ability.
The model’s behavior broke down into four stages:
- Plan first: it produced a module breakdown and database schema design, for example splitting the work into core modules and tables around goals like expense tracking and transaction statistics, along with a development order.
- Executable plan: it listed not only features but also a post-development verification checklist, defining “done” as “verifiably done.”
- No drift during execution: across nearly 60 minutes of continuous coding, there were no interruptions, infinite loops, or missed critical steps; the work largely followed the established plan.
- Usable result: the UI was average in appearance, but the core flow worked, and inserting a record produced no errors.
The engineering takeaway is that the key to long-horizon capability is not “writing a lot,” but whether the plan–execute–verify loop stays stable. In practice, it helps to define acceptance criteria up front as an executable script, for example pinning down the definition of “done” with pseudocode:
acceptance = table creation succeeds && sample data write succeeds && stats API returns expected values && no uncaught exceptions
As long as the acceptance script can be run automatically by a tool, the model’s self-check has an objective anchor, and long tasks are less likely to go off track.
3. Surprise Two and a Weak Spot: Complex Reasoning Shows Promise but Is Unstable
On logic puzzles, the model could identify implicit premises and give a self-consistent explanation. But on hard math problems and some lightweight tests, two typical issues appeared: it fell into a loop of repeated derivation, and it produced conclusions that looked plausible but were wrong.
The cause is usually not that the model “cannot do it,” but that the reasoning process lacks a termination condition and external validation. The fix is to separate “thinking” from “verifying”:
- Set a maximum number of reasoning steps or tool calls to avoid endless self-justification.
- Force math and code conclusions through a tool-based check (calculation, unit tests, differential testing).
- Have the model state a conclusion first and then the proof, so it does not wander further down a wrong branch.
Illustrative strategy pseudocode:
if reasoning_steps > N: output the current best conclusion and request external validationif conclusion is executable: verify with test/calculation tools, and roll back one step on failure
4. The Surprise: Overthinking on Lightweight Tasks and Choosing Model Tiers
For a simple everyday question, the Pro tier sometimes answered incorrectly after repeatedly weighing options, while the Flash tier was direct and efficient. This is a reminder that a more capable tier does not win in every scenario. In engineering terms, route by task tier:
- Lightweight, low-ambiguity tasks: prioritize the tier with lower latency and lower cost.
- Long-horizon, multi-tool tasks: prioritize the higher-capability tier and pair it with an acceptance script.
- High-stakes conclusions: regardless of tier, enforce external validation.
The routing logic can be expressed with a simple rule:
if estimated task steps are small and there is no tool dependency: pick the lightweight tierelse: pick the higher-capability tier + self-check checklist
5. Cost: A Higher Unit Price Does Not Mean a Proportionally Higher Bill
In long tasks, repeated context makes up a large share of the input, and caching can significantly reduce the cost of repeated computation. As a result, the increase in the total bill is often smaller than the increase in unit price. Practical recommendations:
- Stable prefixing: keep the system prompt, conventions, and API descriptions in an unchanged prefix to improve cache hit rates.
- Segmented submission: split long documents into chunks to avoid sending the full context every time.
- Observability: use logging services and monitoring alerts to track token consumption and cache-hit trends, and account for cost per task.
6. A Reusable Evaluation Checklist
- Long-horizon: did it run for 60 minutes without interruption or infinite loops and complete according to plan?
- Reasoning: is there a termination condition, and is there external validation?
- Lightweight: is there overthinking, and is routing reasonable?
- Cost: cache hit rate, tokens and cost curve per task.
Conclusion: the competitiveness of a long-horizon agent comes from a “verifiable loop” rather than isolated cleverness. Only by scripting acceptance, externalizing reasoning validation, and tiering task routing can you reliably reproduce the surprises and keep the unexpected in check.
