Long-Horizon LLM Tasks: Three Surprises and One Unexpected Failure After 10 Million Tokens
A hands-on evaluation consuming more than 10 million tokens explored how large language models handle autonomous coding, complex reasoning, lightweight questions, and long-session costs. The results showed stronger long-running agent capabilities and meaningful caching benefits, but also reasoning failures and a case where a lightweight model outperformed its flagship counterpart. This article examines the findings and their implications for task routing, validation, feedback, and checkpoint design.
Why We Ran This Evaluation
As AI agents move into practical use, standard benchmarks alone cannot answer the question developers care about most: Can a model work autonomously, reliably, and for extended periods in a real engineering environment?
To investigate, we ran an intensive hands-on evaluation in which models continuously executed real engineering tasks, consuming more than 10 million tokens in total. The evaluation covered agentic coding, complex logical reasoning, lightweight question answering, and cost accounting for long conversations. We kept human intervention to a minimum so that autonomous planning, self-correction, and tool use could be observed directly.
The overall finding was encouraging: newer large language models made substantial progress on long-horizon autonomous tasks, but difficult reasoning and lightweight workloads still exposed some counterintuitive weaknesses.
Surprise 1: Stronger Agentic Coding and Long-Running Autonomy
The most exciting finding was the improvement in agentic coding. The model could program autonomously for more than 60 minutes without human intervention, independently completing complex engineering tasks such as database schema design and mobile emulator setup.
This long-horizon capability showed up in three areas:
- Task decomposition and planning. Given a broad objective, the model broke it into executable steps and ordered them by dependency, rather than simply deciding what to do next at each turn.
- Self-correction. When execution produced an error, the model read the error message, identified the underlying problem, corrected the code, and continued. It did not simply stall or repeatedly produce the same faulty code.
- Toolchain integration. The model used file operations, command execution, and dependency installation to maintain a planning–execution–verification–correction loop.
For developers building agent applications, the practical lesson is to provide clear execution feedback, including runtime logs and error stack traces. Long-running task stability depends heavily on whether the model can see its own mistakes.
It is also worth adding checkpoints to the orchestration layer. Breaking an extended task into units that can be rolled back reduces the overall cost of a single failure and makes it easier to reuse cached context across stages.
Surprise 2: Promising Complex Reasoning, but Uneven Reliability
The model performed well on open-ended lateral-thinking problems, such as scenario-based logic puzzles without a clearly defined solution procedure. It proposed plausible hypotheses, actively gathered clues, and progressively eliminated contradictions. Its approach involved multiple rounds of exploration rather than a single, premature conclusion.
More difficult mathematical problems exposed limitations:
- On problems approaching competition-level difficulty, the model sometimes entered a reasoning loop, repeatedly pursuing the same approach without breaking out of it.
- In some cases, it produced answers that were internally coherent but based on an incorrect premise. These failures were particularly difficult to spot because the subsequent reasoning appeared consistent.
The lesson is that strong reasoning ability does not guarantee reliable reasoning. Production workflows that are sensitive to correctness—such as financial calculations, rule validation, and logical checks on generated code—need engineering safeguards.
The following illustrative code adds retries and result validation to a high-risk reasoning task:
# Illustration: add retries and result validation for high-risk reasoning tasksdef run_with_validation(task, validator, max_retries=3):for attempt in range(max_retries):answer = model.solve(task)if validator.check(task, answer):return answertask.add_hint("The previous approach failed. Try a different solution path.")raise InferenceLoopError
Explicitly asking the model to list several possible approaches and validate them in turn can also help reduce single-path reasoning loops.
Surprise 3: Higher API Prices, but Caching Helped Control Costs
The newer generation of models had higher API unit prices than the previous generation, increasing budget pressure for high-frequency workloads. However, the observed increase in total spending was substantially smaller than the increase in unit prices. Caching was the key factor.
Long-running tasks repeatedly pass large amounts of unchanged context between the model and its tools. This includes system instructions, task descriptions, and earlier tool results. When a platform supports prefix caching, repeated context does not have to be billed at the full uncached rate on every request, reducing the cost of processing that history repeatedly.
The longer the task and the more turns it requires, the more significant this amortization effect can become.
Three practices can help developers manage costs:
- Keep prompt prefixes stable. Place unchanged system instructions and tool definitions at the beginning of the context. Avoid modifying them mid-task in ways that invalidate the cache.
- Plan calls at the session level. Where possible, complete a task within the same conversation context to reduce repeated transmission of shared material.
- Route work across model tiers. Not every subtask needs the strongest model. Using lightweight models for simple work and flagship models for critical steps is a practical cost-performance strategy—and connects directly to the unexpected finding below.
One Unexpected Failure: A Flagship Model Lost on a Simple Task
The most counterintuitive result came from a simple common-sense reasoning question. The flagship model answered incorrectly, while a lightweight model from the same family got it right on its first attempt.
A possible explanation is overthinking. On a question that could be answered directly, the flagship model pursued a lengthy, multistep reasoning process. Each additional step created another opportunity for bias or self-interference, eventually leading it away from the correct answer. The lightweight model took a shorter, more direct path and avoided that trap.
For developers, this suggests three practical lessons:
- Do not assume that a stronger model is always the better choice. Select models according to task complexity, not reputation.
- Build task-tier routing into the agent architecture. Assign lightweight question answering, format conversion, and intent classification to lightweight models, while reserving flagship models for complex planning and reasoning.
- Add an output-auditing layer for flagship models. Even simple tasks should retain lightweight result checks. More reasoning does not automatically mean a more accurate answer.
What the Findings Mean for Production Agents
This evaluation reinforces a straightforward principle: model assessment needs to return to real tasks, rather than stop at benchmark rankings.
The three positive findings—long-running autonomous coding, promising lateral reasoning, and lower effective costs through caching—suggest that the technical foundations for moving agents from demonstrations toward production are increasingly in place.
The unexpected failure on a lightweight task is an equally important reminder. Task routing, result validation, cache optimization, and checkpoint design remain central to whether those capabilities translate into dependable applications.
For developers, the right approach is to treat models as a toolbox with different capability levels, not as a universal solution. Use engineering design to amplify their strengths and validation mechanisms to contain their instability. That work may be more valuable than chasing every new model release.
