Million-Token Agent Evaluation: What Large Models Can (and Cannot) Do

    After more than 10 million tokens of real-world testing, this article reports how leading LLMs perform on agent coding, complex reasoning, lightweight Q&A, and cost—plus practical guardrails, routing, and cache-based cost control.

    Background and method

    In production agent systems, single-turn Q&A is no longer a sufficient measure of an LLM. What determines whether an application ships is planning, execution, error recovery, and cost control on long-running tasks. We ran a systematic evaluation closer to real engineering work, consuming more than 10 million tokens in total, across four dimensions: agent coding, complex logical reasoning, lightweight Q&A, and billing cost.

    Token use scales with task complexity, context length, and tool-call rounds. Long-horizon work often rereads context, calls tools, and verifies results, so a single task can easily exceed a million tokens. Only a large spend covers enough edge cases. The observations below come from reproducible runs, not one-off benchmarks.

    Observation 1: Agent coding and long-horizon execution are markedly stronger

    The most striking result is long-horizon autonomy in agent coding. Without step-by-step human intervention, models can program continuously for tens of minutes and complete multi-step engineering work such as database schema design and simulator environment setup.

    What matters is not one-shot code quality but long-horizon planning, self-correction, and a closed loop of tool use. A typical autonomous coding loop looks like this:

    1. while not task_done and steps < max_steps:
    2. plan = model.plan(context) # decompose the current subgoal
    3. action = model.act(plan) # generate code or a tool call
    4. result = sandbox.run(action) # execute in an isolated environment
    5. if result.error:
    6. context += reflect(result.error) # self-correct; feed errors back
    7. else:
    8. context += result.output
    9. steps += 1

    The gap is whether the model can read a stack trace, find the root cause, and fix it—rather than repeating the same mistake. Stronger models keep a stable execute–verify–correct rhythm, which depends on long-context retention and reliable tool calling. In production, set a max step count, timeouts, and sandbox isolation so runaway spend is contained.

    Observation 2: Complex reasoning has highlights; stability is still weak

    On logical reasoning, results split. On multi-step common-sense puzzles, models often work well and converge step by step. On contest-level math, stability fails: either a long “dead loop” of repeated derivation, or a wrong conclusion at a critical step.

    Unstable reasoning usually comes from a large search space without effective pruning. Without a clear stopping criterion, the model retries dead paths. Mitigations include:

    • An explicit verifier or self-check on the final answer
    • Step or token budgets, with a fallback when the limit is hit
    • Multi-path sampling and selection for hard tasks instead of a single generation

    Observation 3: The “overthinking” trap on lightweight tasks

    A counterintuitive finding: on simple questions, stronger models sometimes fail more. They expand a one-step answer into a long chain, then second-guess themselves off the correct result. Smaller, more direct models often hit it in one shot.

    This is reasoning depth mismatched to task complexity. A practical pattern is to allocate compute on demand:

    1. if task_complexity == low:
    2. use_fast_direct_mode() # answer directly; suppress long reasoning
    3. else:
    4. use_deep_reasoning_mode() # full reasoning chain

    Do not always pick the “strongest” model. Route by scenario: light models for simple, high-frequency work; stronger models for complex, long-horizon tasks.

    Observation 4: Cost structure and cache savings

    List prices for newer models are often higher, but total bills on long tasks did not rise as steeply as unit prices. Context caching is the main reason: when many turns share a large repeated prefix (system prompt, codebase context), cached tokens are billed at a lower rate.

    Cost work then shifts from “fewer calls” to “higher cache hit rate”:

    • Put stable system prompts, tool definitions, and reference docs at the front of the context and keep that prefix unchanged
    • Avoid frequent mid-session prefix edits that invalidate the cache
    • Track cache hit rate and per-task cost with logs and alerts

    On the cloud, long context can sit in object storage, async work can go through a message queue, and sandboxes can run on containers, with monitoring on token use and spend so cost is measurable.

    Engineering recommendations

    1. Route by scenario: different capability tiers for light vs. long-horizon work, balancing cost and quality.
    2. Guardrails for agents: max steps, timeouts, sandbox isolation, and result self-checks are all required.
    3. Cut cost with cache: stable prefixes, fewer pointless edits, cache hit rate as a core cost KPI.
    4. Observability: continuous monitoring of tokens, task success, and cache hits; optimize from data.

    Closing

    This million-token-scale evaluation shows agent capabilities are in a usable range: long-horizon planning and tool use can be impressive. Reasoning stability and overthinking still need engineering fixes. The rational path is not chasing a single “strongest” label, but scenario-based routing, guardrails, and cost control so model ability becomes reliable business value.