Long-Context AI Agent Benchmark at 10 Million Tokens: Three Surprises and One Unexpected Finding
This article reports on a hands-on benchmark of long-horizon LLM agents at the 10-million-token scale, covering four task categories: long-horizon agentic coding, complex reasoning, lightweight tasks, and cost and stability. It explains why single-turn evaluations miss engineering quality, how tasks were scored across planning, execution completeness, self-correction, and runnable deliverables, and what the results showed: mature autonomous coding over nearly 60 uninterrupted minutes, reliable multi-step logic puzzles with occasional failures on competition-level math, over-thinking on simple questions by higher-tier models, and a total bill driven by cache reuse and retries rather than per-token price. It closes with a reusable checklist and practical mitigations such as explicit budgets, mandatory verification, and tiered routing.
1. Why We Pushed the Benchmark to 10 Million Tokens
A single-turn Q&A evaluation only reflects how a model behaves in short interactions. It cannot expose its real engineering quality on long-chain tasks. When a single task requires dozens of consecutive tool calls, reading and writing multiple files, repeatedly running tests, and self-correcting, token consumption naturally accumulates into the millions. Testing at this scale offers three things that cannot be replaced:
- Long-horizon consistency: whether the model still remembers the original constraints dozens of turns later.
- Cost structure: how cache reuse and context-trimming strategies affect the total bill, amplified at this scale.
- Failure modes: infinite loops, repeated patching, and goal drift that only surface in long tasks.
So we changed the evaluation goal from “is the answer correct” to “does the engineering deliverable actually run.”
2. Benchmark Design: Four Task Categories, One Scoring Framework
To make the conclusions reproducible, tasks were divided into four categories, each with explicit acceptance criteria.
- Category A: Long-horizon agentic coding. A vague goal is given, with no schema and no interface contract, testing autonomous planning, tool use, and self-verification.
- Category B: Complex reasoning. Logic puzzles that require multi-step back-inference, plus competition-level math problems.
- Category C: Lightweight tasks. Common-sense, single-step solvable questions, testing whether the response path is “short and accurate.”
- Category D: Cost and stability. Token consumption, cache hit rate, interruption count, and human intervention count.
Scoring no longer looks only at the final answer. It is broken into four dimensions: planning soundness, execution completeness, effectiveness of self-correction, and runnability of the deliverable.
3. Surprise One: Long-Horizon Autonomous Coding Has Matured Significantly
Category A was the most beyond-expectation part of the results. Take “build an accounting system” as an example: the prompt only stated the business goal, with no constraints on the tech stack or data structures. The model first produced a design: it identified 8 core feature modules and 6 data tables, covering bookkeeping, transaction statistics, and category management; it then broke the work into a development workflow on its own and additionally generated an acceptance checklist with 10 checkpoints.
What really mattered was the execution phase: the model worked autonomously for close to 60 minutes straight, with no interruptions, no infinite loops, and no skipping of steps from its earlier plan. The final deliverable looked visually plain on the frontend, but every core path worked — adding a record produced no errors, and custom operations such as adding, editing, and deleting categories all completed normally.
From an engineering perspective, this is really a combination of three capabilities:
Long-horizon planning: breaking a vague goal into executable subtasks while keeping dependency order correctTool use: reading and writing files, running commands, and executing verification at the right momentsSelf-correction: locating the cause after a test failure and retrying, rather than repeatedly patching
It is worth stressing that “no interruption” matters more than “runs fast.” The biggest hidden cost in long tasks is human intervention; a single human takeover often means rebuilding context and consuming tokens all over again.
4. Surprise Two: Complex Reasoning Shows Bright Spots, With Stability Improving Too
In Category B, the quality on logic puzzles requiring multi-step back-inference was relatively high. The model maintained its chain of assumptions steadily and performed reverse verification at key points. These puzzles are characterized by “sparse information and hidden constraints,” which happens to test whether the model is willing to do sufficient assumption checking before giving a conclusion.
But the same category also exposed weaknesses: on competition-level math problems, the model occasionally reached wrong conclusions; and in some lightweight tests, it repeatedly second-guessed itself and fell into loops. This shows that reasoning stability is still a direction that needs continuous refinement.
Three practical mitigations are feasible:
- Explicit budget constraints: cap the maximum number of reasoning turns or tool calls in the prompt to avoid unbounded loops.
- Mandatory verification steps: require the model to list executable validation methods before stating a conclusion, instead of answering directly.
- Cross-checking results: sample the same question multiple times and take the consistent answer; if answers disagree, escalate to a stronger configuration or human review.
5. The Unexpected Finding: “Overthinking” on Lightweight Tasks
The most counter-intuitive phenomenon appeared in Category C. On single-step common-sense questions like “how many cars are in a car wash,” the higher-tier version sometimes got the answer wrong, because it introduced unnecessary multi-branch reasoning internally, complicated a simple problem, and ended up deviating from the obvious answer. The lightweight configuration, with a shorter path, was instead direct and efficient.
This suggests that model capability is not monotonically better than what a scenario needs. In production system design, the sensible approach is tiered routing:
def route(prompt: str, ctx: dict) -> str:# Single-step, low-ambiguity, low-risk requests go through the light pathif ctx.get("steps_est", 99) <= 1 and ctx.get("risk") == "low":return "light_model"# Multi-step tasks, tool orchestration, or long context go through the high-capability pathreturn "strong_model"
Supporting engineering constraints include: a lower reasoning budget for the light path, a shorter system prompt, and stricter output formatting; and logging routing decisions at the gateway layer so routing thresholds can later be regression-tested against real traffic.
6. Cost Observations: Unit Price and Total Bill Are Not the Same Thing
The fourth observation focuses on cost. The API unit price of the new generation of models is somewhat higher than the previous generation, but in long tasks, because the context prefix is heavily reused and the caching mechanism takes effect, the increase in the total bill is clearly smaller than the increase in unit price. This explains a common misconception: cost evaluation cannot look only at the per-million-token price.
At least five variables actually affect the total bill:
- Context reuse rate: whether the system prompt and code repository snippets stay unchanged.
- Number of ineffective retries: infinite loops and repeated patches are the biggest source of waste.
- Output length: verbose explanations multiply the cost.
- Context-trimming strategy: whether only snippets relevant to the current subtask are kept.
- Task tiering: whether simple requests are wrongly routed to a high-cost path.
A practical optimization order is: first eliminate infinite loops and ineffective retries, then improve cache hit rate, then compress output and context, and only then consider changing the model configuration. The first two usually deliver the largest gains at the lowest risk.
7. A Reusable Implementation Checklist
- Use vague goals for planning evaluation, not fill-in-the-blank questions with standard answers.
- Treat “human intervention count” as a first-class metric, as important as accuracy.
- Set turn limits and timeout circuit breakers for long tasks to avoid a runaway bill.
- Build tiered routing so lightweight requests take the short path.
- Require the model to produce its own acceptance checklist and actually execute it before delivery.
- Regularly regression-test routing thresholds and prompt templates against real traffic.
8. Conclusion
The benchmark at the 10-million-token scale leads to one core conclusion: long-horizon agentic coding is already production-ready, complex reasoning is reliable in most scenarios but still needs external validation, lightweight scenarios require actively doing less, and the key to cost governance lies in caching and retries rather than unit price. Upgrading the evaluation standard from “answer accuracy” to “runnable deliverable plus human intervention cost” is the prerequisite for this class of models to truly enter the engineering workflow.
