Large Language Model Agents in Long-Horizon Tasks: Findings After 10 Million Tokens
This article reports a systematic evaluation of large language model (LLM) agents conducted at a scale of more than 10 million cumulative tokens. Instead of single-turn Q&A benchmarks, the tests focused on long-horizon autonomy, reasoning stability, lightweight task efficiency, and cost structure. Key findings include a closed loop of planning, tool use, and self-correction in agentic coding, persistent sampling sensitivity in complex reasoning, over-thinking on simple tasks by high-spec models, and cache mechanisms that significantly reduce long-task costs. The article also outlines a reproducible evaluation framework and a four-stage "plan-execute-verify-cache" approach for balancing capability and cost.
1. Background: Why Testing at the 10 Million Token Scale Matters
Single-turn Q&A evaluations typically capture only how a model performs in short interactions. They rarely expose the planning drift, tool-call mismatches, and weak self-correction that appear in long-horizon tasks. To address this gap, we ran a systematic evaluation at a scale of more than 10 million cumulative tokens, organized around four main tracks: agentic coding, complex reasoning, lightweight tasks, and cost structure.
The goal was to build a reproducible, comparable, and practical evaluation methodology rather than to reach a verdict on any specific product.
Note that this article strips away all product-specific attributes and discusses only general technical capabilities and engineering practices. The term “intelligent coding tool” refers to an agent runtime environment with code generation and execution capabilities, and “a cloud provider” refers to a general platform offering model inference and caching.
2. Evaluation Framework: Four Dimensions and Metrics
To keep the conclusions credible, the metrics had to be fixed in advance. We used the following dimensions:
- Long-horizon autonomy: continuous execution time without human intervention, task completion rate, key-step omission rate, and dead-loop occurrence rate.
- Reasoning stability: consistency across multiple samples of the same problem, and the distribution of error types (logical jumps, circular reasoning, answer drift).
- Lightweight task efficiency: first-answer accuracy, average output length, and whether “over-thinking” occurs.
- Cost structure: input/output token ratio, cache hit rate, and the deviation between total long-task bills and unit price increases.
The structure of an evaluation record is illustrated below (pseudocode, showing field design only):
record = {"task_id": "db_design_001","duration_min": 60,"interventions": 0,"dead_loop": False,"steps_planned": 10,"steps_done": 10,"correctness": "pass","input_tokens": 0,"cached_tokens": 0,"output_tokens": 0}
3. Finding 1: Long-Horizon Agentic Coding Has Improved Substantially
In a database design task where only the goal was given and no constraints were specified, the model first produced a structured plan: it divided the work into core functional modules, designed the data tables, laid out a development workflow, and proactively generated a verification checklist. It then entered an unattended execution phase, working continuously for about sixty minutes with no interruptions or dead loops and no omitted key steps. The delivered system’s core functionality could read and write normally, custom create, read, update, and delete operations worked, and the only shortcoming was visual polish in the interface.
The engineering implication is that long-horizon planning, tool use, and self-correction now form a closed loop. Practical recommendations:
- Use a “plan first, then execute” prompt structure that forces the model to produce modules and a verification checklist up front.
- Convert the verification checklist into automated tests, with an external executor feeding results back to reduce human intervention.
- Set step and time limits for long tasks to prevent resource waste in extreme cases.
4. Finding 2: Complex Reasoning Shows Promise, but Stability Remains the Bottleneck
Performance on logic puzzle tasks was strong, indicating solid constraint satisfaction and counterfactual reasoning. However, on high-difficulty math problems and some lightweight tests, dead loops and wrong answers appeared, exposing sampling sensitivity and insufficient self-verification.
Improvement ideas:
- Sample multiple times and use consistency voting to reduce errors caused by single-run randomness.
- Introduce external verifiers (such as symbolic computation or unit tests) to double-check conclusions.
- Set a threshold on reasoning chain length; when exceeded, trigger a rewrite instead of extending the chain further.
5. Finding 3: Over-Thinking on Lightweight Tasks and Model Tier Selection
Failures on simple questions come down to spending the “thinking budget” in the wrong place: high-spec models tend to unfold long reasoning chains and drift away from the obvious answer, while lightweight models are more direct and achieve higher first-answer accuracy. The practical recommendation is to route by task complexity: send simple extraction, rewriting, and classification to lightweight models; send multi-step planning and engineering tasks to high-spec models, and pair this with cache reuse to cut repeated computation.
6. Finding 4: Prices Rose, but Caching Substantially Dilutes Long-Task Costs
In long tasks, the input context is highly repetitive. Caching allows repeated prefixes to avoid being billed again, so the total bill grows noticeably less than the unit price increase. Optimization checklist:
- Keep system prompts and tool descriptions stable to improve cache hits.
- Place large blocks of static material at the front and dynamic content at the back.
- Use logging services and monitoring alerts to track hit rates and token distribution for continuous tuning.
7. Conclusion
Testing at the 10 million token scale shows that long-horizon agent capabilities are now usable as productivity tools, but reasoning stability and task routing strategy remain critical to engineering success. Organizing calls around the four-stage “plan-execute-verify-cache” method achieves a better balance between capability and cost.
