Long-程 AI Agent Benchmark: Three Surprises and One Unexpected Result
This article reports on a hands-on benchmark of long-horizon LLM agents that consumed tens of millions of tokens across multi-turn tool calls and long-running execution. It covers three positive findings—autonomous execution for about an hour without intervention, more mature tool calling and engineering integration, and prefix caching that reduces long-task costs—plus one counterintuitive result: on simple tasks, stronger models sometimes over-reason, answer incorrectly, or fall into loops. It also shares reusable prompt patterns, termination rules, and evaluation and model-selection practices.
1. Why a Multi-Million-Token Benchmark Matters
A single-turn Q&A session only reflects how a model performs with a short context and single-step reasoning. Real engineering tasks are the opposite: the context keeps growing, tool-call chains get longer, and errors propagate down the chain. Only when cumulative consumption reaches the tens-of-millions-of-tokens range—covering multiple rounds of tool calls and long-running execution—can you observe the real boundaries of a model’s capabilities.
This benchmark focused on three areas: long-horizon autonomous execution, the stability of complex reasoning, and cost efficiency on lightweight tasks. The conclusions boil down to “three surprises and one unexpected result”:
- Long-horizon planning and self-correction improved significantly.
- Tool calling and engineering integration became more mature.
- Caching delivered meaningful cost savings on long tasks.
- On simple tasks, however, excessive reasoning sometimes led to wrong answers or loops.
2. Surprise 1: Autonomous Execution for an Hour Without Intervention
For two tasks—database design and client application development—we deliberately avoided fine-grained constraints and described only the business goal, in order to test the model’s ability to break the work down on its own.
The model’s workflow looked roughly like this: it first did a stretch of “silent thinking,” then produced a structured plan covering functional modules, database table design, field and index planning, development steps, and a verification checklist. It then entered a long execution phase lasting about 60 minutes, with no interruptions, infinite loops, or missed critical steps.
This comes from three overlapping capabilities:
- Long-horizon planning: turning a vague goal into verifiable intermediate artifacts, with a definition of done for each step.
- Self-correction: backtracking and fixing issues when compilation fails or tests fail, instead of repeating the same mistake.
- A closed tool-calling loop: reading and writing files, running commands, and executing tests form a feedback loop.
To reproduce this reliably in practice, put the acceptance criteria up front in the prompt:
Goal: <one-sentence description of the business goal>Constraints: <tech stack, directory structure, dependency versions>Deliverables: module list + database table design + verification checklistRules: run tests after completing each module; when something fails, locate the cause before making changes; never repeat the same approach
3. Surprise 2: More Mature Tool Calling and Engineering Integration
The hard part of a long task is not “writing code”—it is “continuing after a failure.” A valuable observation from the benchmark was that the model tended to build verification into its workflow rather than waiting for a human reminder. This matches sound engineering habits: small commits, frequent verification, and immediate rollback on failure.
In a real system, you can place the model on an execution foundation made up of a container platform, a message queue, logging, and monitoring with alerting: the container platform provides an isolated runtime, the message queue handles task distribution and load smoothing, logging captures the full call trace, and monitoring and alerting interrupt execution when something goes wrong. This preserves the model’s autonomy while keeping it controllable.
4. Surprise 3: Caching Substantially Reduces Long-Task Costs
In long tasks, the prefix is highly repetitive: system prompts, project context, and prior tool outputs. The prefix caching mechanism widely used in the industry reduces the cost of recomputing that repeated content. Prompt design should therefore follow a “stable prefix, variable suffix” principle:
- Put system instructions, conventions, and directory descriptions at the very front and keep them byte-for-byte stable.
- Move volatile content such as timestamps and random identifiers to the end.
- Avoid rewriting the entire background repeatedly during a long task.
Note that billing rules and caching strategies vary significantly across providers, so the actual bill should be the source of truth rather than a simple extrapolation from theoretical figures.
5. The Unexpected Result: Overthinking and Loops on Lightweight Tasks
The most counterintuitive finding was that on a simple, one-step problem such as the “car wash problem,” the more capable version sometimes got the answer wrong because it launched into unnecessary long-chain reasoning. On some math problems and lightweight tests, the model also repeatedly second-guessed itself and fell into loops.
Two causes stand out: the reasoning budget was mismatched to task complexity, and there was no explicit termination condition. Practical mitigations include:
Rule 1: If a problem can be solved in one step, give the conclusion first, then add a one-line reason.Rule 2: If the same approach fails twice in a row, switch paths or converge to "uncertain."Rule 3: Set a maximum number of reasoning/tool-call rounds; when exceeded, output the best current conclusion.
6. Reusable Evaluation and Selection Practices
- Evaluate in layers: split tasks into lightweight Q&A, complex reasoning, and long-horizon execution, with pass criteria for each.
- Look at stability, not peaks: run the same task multiple times, record success rate and variance, and avoid being misled by a single impressive result.
- Price by “one completed task”: measure task success rate together with total token consumption, not unit price.
- Keep a human gate: high-risk operations such as deleting data or releasing to production require human confirmation.
Overall, the new generation of LLMs has entered a practical, manageable range for long-horizon agentic coding, but reasoning stability and adaptive reasoning budgets still need engineering safeguards. Building solid acceptance criteria, termination conditions, and an observability foundation is what turns model capability into productivity.
