10 Million Tokens of Testing: Evaluating Long-Horizon Agentic Coding in Large Language Models

    We ran a hands-on evaluation of a flagship large language model across agentic coding, complex reasoning, lightweight tasks, and API cost, using more than 10 million tokens. The article covers how the model planned and executed a development task for nearly an hour without manual intervention. It also covers where the model struggled, including extreme math problems and simple everyday questions, and offers engineering recommendations on task routing and context caching for managing cost.

    Introduction: Why Run a Deep Test Over 10 Million Tokens?

    As large language models move from conversational question answering to agentic execution, a few simple exchanges no longer reveal how well a model handles real engineering work. To test a new-generation flagship model in realistic development scenarios, we designed a multi-dimensional evaluation. It covers agentic coding, complex reasoning, lightweight tasks, and cost accounting. The full test consumed more than 10 million tokens.

    Overall, the flagship version showed impressive capability in autonomous planning and long-running execution. It worked continuously for nearly an hour without manual intervention. It also showed weaknesses in some extreme reasoning tasks and in simple scenarios. The four sections below cover each dimension in detail.

    1. Agentic Coding: The Work Behind Nearly 60 Minutes of Autonomous Execution

    1.1 Test Design: Using Low-Constraint Prompts to Assess Autonomous Planning

    To evaluate task planning under realistic conditions, we used a “weak-constraint prompt” approach. We gave the model only a goal description, such as “build a complete bookkeeping system.” We provided no architecture constraints, tech stack restrictions, or step-by-step instructions.

    We chose this design because real engineering requirements are often vague. Whether a model can break down tasks, design data structures, and plan its own verification steps is what separates a code completion tool from an engineering agent.

    1.2 Execution: A Closed Loop of Planning, Development, and Self-Verification

    After receiving the task, the model first entered a planning phase and produced a complete plan:

    • Data model design: About 8 core functional modules and 6 data tables, covering bookkeeping, transaction statistics, category management, and other requirements.
    • Development workflow: A clear build order and dependencies between components.
    • Self-verification checklist: About 10 verification items, to be checked one by one after development.

    We then stepped back and let the model work on its own. It ran continuously for close to 60 minutes. No interruptions, infinite loops, or skipped steps appeared, and the execution closely followed the earlier plan. This plan-execute-verify loop is a core sign of long-horizon agent capability.

    1.3 Engineering Takeaways

    Stability in long tasks depends on how well the model keeps managing its context. When the context window fills with tool call results, the model must still stay aligned with the original goal. For engineering practice, we recommend the following:

    1. Explicitly ask the model to write out its plan before executing. This gives humans a chance to correct direction during the planning stage.
    2. Ask the model to maintain a Todo List and update each item’s status as it completes steps. This reduces the risk of long-task drift.
    3. Set human checkpoints on key outputs, such as the database schema, so that early errors do not grow later on.

    1.4 Remaining Weaknesses

    The finished product had a fairly plain front-end design. This suggests the model still prioritizes functional correctness over user experience polish. For products aimed at end users, the UI layer still needs human input or dedicated design tools.

    2. Complex Reasoning: Strengths and Limits

    2.1 Strong Performance on Logic-Based Reasoning

    On open-ended logic puzzles, such as the lateral-thinking “turtle soup” riddles popular in Chinese-speaking communities, the model reached the correct answer through successive questions. It showed good hypothesis generation and elimination. These tasks test consistency across multi-turn reasoning, and the flagship model performed steadily here.

    2.2 Instability on Extreme Math Problems

    On International Mathematical Olympiad-level problems, the model showed two typical failure modes:

    • Reasoning loops: It repeatedly tried one incorrect path and could not escape the local optimum.
    • Confident wrong answers: Small logical gaps appeared in intermediate steps, and the model did not cross-check them.

    2.3 Mitigation Strategies

    For high-difficulty reasoning tasks, the following methods can offset these weaknesses:

    1. Multi-path sampling: Generate several independent solutions to the same problem and take the conclusion that most of them agree on.
    2. Verifier models: After the model produces an answer, use a separate prompt that asks it to act as a reviewer and check each step.
    3. Tool augmentation: Hand off computable steps, such as algebraic simplification and numerical checks, to a code execution tool. This reduces the chance of errors in purely language-based reasoning.

    3. The Overthinking Trap in Lightweight Tasks

    3.1 A Counterintuitive Finding

    On simple everyday questions, such as “How long does a car wash take?”, the flagship reasoning version sometimes gave wrong or overly convoluted answers. The lightweight fast version answered the same questions directly and correctly.

    3.2 Possible Cause

    Reasoning-enhanced models tend to break questions down deeply. When a question is simple, excessive chain-of-thought reasoning can introduce unnecessary assumptions, such as inventing implicit conditions or over-interpreting ambiguity. The model can then drift away from the common-sense answer. This resembles people who overthink a simple question and get it wrong.

    3.3 Practical Recommendation: Tiered Task Routing

    This result suggests that applications built on these models should use a tiered routing mechanism:

    1. User request → Complexity assessment
    2. ├── Simple Q&A / common sense → Route to lightweight fast model
    3. ├── Moderate reasoning / writing → Route to general-purpose model
    4. └── Long-horizon planning / complex reasoning → Route to flagship reasoning model

    Tiered routing can improve answer quality and also reduce latency and cost. Complexity can be judged with an intent classifier, or a lightweight model can assess the request first and decide whether to escalate it.

    4. Cost: Context Caching Under Higher Prices

    4.1 Changes in Pricing Structure

    The API pricing of the new-generation model is higher than that of the previous generation. This increase matters more for long tasks, which can consume hundreds of thousands of tokens in a single run.

    4.2 Real-World Effect of Context Caching

    In our tests, long tasks repeatedly sent the same large prefix context, including system prompts, tool definitions, and historical plans. With context caching enabled, the repeated portion was billed at a lower cached price. As a result, the actual total bill grew noticeably less than the increase in nominal unit prices.

    4.3 Cost Optimization Checklist

    1. Design stable prefixes: Place unchanging content, such as system instructions and tool schemas, at the start of the context to maximize cache hit rates.
    2. Avoid prefix changes: Do not modify any character in the prefix between requests, including timestamps. Any change invalidates the cache.
    3. Reuse segments in long tasks: Keep the session context continuous across turns instead of rebuilding it for each request.
    4. Monitor token composition: Track the shares of input, cache hits, and output separately so you can optimize each one.

    5. Summary: A Reusable Model Evaluation Framework

    Based on this test of over 10 million tokens, we developed an evaluation framework for engineering model selection:

    Dimension Key Metrics Evaluation Method
    Long-horizon execution Continuous autonomous working time, step completeness Complex engineering tasks with weak constraints
    Reasoning stability Accuracy on extreme problems, loop rate Olympiad-level math problems
    Fit for simple tasks Accuracy on common-sense questions, response latency Lightweight question set
    Cost efficiency Cache hit rate, cost per unit of output Breakdown of long-task billing

    Evaluating large language models should go beyond leaderboard scores and cover the full lifecycle of real tasks. Teams can make better decisions on architecture, task routing, and cost control only after they understand a model’s strengths and its limits. We hope the testing methods and findings in this article help developer teams with model selection.