Long-horizon LLM Agents Tested: Four Findings from Over 10 Million Tokens

    This article reports on a hands-on evaluation of long-horizon LLM agents that consumed more than 10 million tokens across agentic coding, complex logical reasoning, and lightweight everyday Q&A. It explains the test setup and constraints, then presents four findings: long-horizon autonomous execution has crossed a practical usability threshold, complex reasoning shows a high ceiling but an unstable floor, lightweight tasks can suffer from overthinking, and higher API prices do not translate into proportionally higher long-task costs once context caching is involved. Readers will find practical engineering guidance on exit conditions, human handoff points, observability, layered model routing, and cost control.

    1. Test Background and Method

    Over the past year, the focus of LLM evaluation has been shifting from single-turn answer accuracy to long-horizon task completion. The first measures how likely a model is to produce a correct answer within a limited context. The second measures whether, after dozens of tool calls and multiple failed retries, the model can still push an engineering goal to a deliverable state. These two are not on the same difficulty scale.

    This evaluation consumed more than 10 million tokens in total and covered three scenarios: agentic coding, complex logical reasoning, and lightweight everyday Q&A. Changes in the billing structure were recorded alongside the runs. Note that token consumption is not proportional to task value, so this article deliberately separates “how much was spent” from “what came back.”

    To make the results reproducible, all tasks were run under the same constraints:

    • Prompts described only the goal and never prescribed an implementation path, in order to test autonomous planning.
    • The model was allowed to call general-purpose tools such as file read/write, command execution, and test running.
    • A fixed observation window (for example, 60 minutes) and interruption criteria were defined (no progress for a sustained period, or the same error repeating).
    • Execution logs were kept in full for post-hoc attribution.

    2. Finding 1: Long-horizon Autonomous Execution Has Crossed the Usability Threshold

    On database design and service setup tasks, the model clearly exceeded expectations. It first produced a structured plan containing several core functional modules and data tables, broke the work into a development sequence on its own, and finally generated an acceptance checklist of roughly ten items covering edge cases such as data writes, statistical aggregation, and malformed input. It then ran for close to an hour without human intervention, with no interruption or infinite loop and no missing critical steps.

    The engineering implication matters more than a high benchmark score. The real failure modes of long-horizon tasks are not single-step mistakes but three kinds of degradation: goal drift (the output gradually moving away from the original requirement), context pollution (an early mistake being referenced repeatedly by later steps), and unproductive loops (retrying the same error over and over). Sustaining an hour of stable progress indicates that the model now has a usable baseline in task decomposition, state retention, and self-verification.

    From a deployment perspective, this kind of capability fits tasks with clear boundaries where verification costs less than development—for example, scaffolding internal tools, initializing data table structures, and migrating batch scripts. The criterion is simple: if the correctness of the result can be verified quickly by automated tests, it is a good fit for an agent; if verification requires a great deal of human judgment, the payoff from long-horizon automation decays quickly.

    A pseudocode skeleton that is easy to integrate looks like this:

    1. for step in plan:
    2. result = agent.run(step, tools=[fs, shell, test])
    3. if not result.progressed:
    4. retries += 1
    5. if retries >= 3:
    6. return escalate_to_human(result.log)
    7. if test_suite.passed(result):
    8. break

    The key is to define exit conditions and human handoff points up front, rather than waiting for the model to stop on its own.

    3. Finding 2: Complex Reasoning Shows Promise but Lacks Stability

    On logic puzzles that require multi-step backward inference, the model performed remarkably well, identifying implicit premises and producing self-consistent explanations. However, on hard math competition problems and some poorly designed lightweight tests, two problems appeared: it got stuck in long stretches of unproductive reasoning, restating conditions without converging; and it produced conclusions that looked plausible but were wrong.

    This suggests that the ceiling and the floor of reasoning ability are two different things. Engineering should focus on the floor: whether repeated sampling of the same question yields consistent answers, and whether the reasoning chain stops expanding when no new information is introduced. Practical mitigations include capping the maximum number of reasoning steps, requiring the model to explicitly list what is known and unknown, and forcing a reverse check at key conclusions. For scenarios with high stability requirements, multiple sampling plus consistency voting usually works better than simply improving the quality of a single prompt.

    4. Finding 3: Overthinking on Lightweight Tasks

    A structurally simple everyday reasoning question produced an interesting reversal: the more capable version sometimes gave a wrong answer because it kept weighing multiple interpretations, while the lighter version hit the answer directly. The reason is not hard to understand—when a model assumes by default that “the question must contain a trap,” it actively introduces constraints that do not exist.

    The practical recommendation is layered routing by task: run a complexity check on the request first, send simple requests to a low-latency, low-cost lightweight model, and escalate complex engineering and long-horizon tasks to a higher-capability model. This lowers the bill and reduces unnecessary uncertainty. The routing logic can be minimal:

    1. model = "lite" if estimated_complexity(q) < THRESHOLD else "pro"

    The threshold should be calibrated against the real business distribution rather than set by feel.

    5. Finding 4: Prices Went Up, but Caching Changed the Billing Curve

    The API unit price of a new-generation model is usually higher than that of the previous generation, yet the actual cost increase for long tasks is often smaller than the unit price increase. The reason is that the context of a long-horizon agent is highly repetitive: the system prompt, tool definitions, and prior execution trace are read again at every step. When the platform offers context caching, this repeated input can take a lower-cost path.

    So when evaluating cost, the per-million-token unit price is not enough; what matters is the combined structure of total task cost = new input + cache-hit portion + output. The optimization directions follow from this: put stable, unchanging content first and keep it unchanged, place volatile content later, avoid pointlessly rewriting the system prompt, and summarize and compress long histories. If you use the relevant model services from Baidu AI Cloud, you can combine general-purpose logging and monitoring/alerting capabilities to continuously observe cache hit rates and the per-task token distribution, then adjust the prompt structure accordingly.

    6. Engineering Recommendations

    • Task admission: prioritize tasks whose verification can be automated, and define human handoff conditions explicitly.
    • Process observability: keep complete execution logs and tool call chains to make failure attribution easier.
    • Cost control: use layered routing, context caching, and history summarization together as a set.
    • Quality safeguards: force self-verification on critical outputs, and use multi-sample consistency voting when necessary.
    • Capacity planning: reserve headroom for peak concurrency, and run long tasks and short requests in separate queues so they do not crowd each other out.

    7. Conclusion

    The core judgment from a 10-million-token evaluation is that long-horizon agentic coding has entered a usable range, while reasoning stability and cost structure are the two variables that will determine real-world results next. Making exit conditions, observability, and layered routing solid pays off far more reliably than chasing a single capability metric.