Long-Horizon Coding Agents: Evaluating Capabilities and Limits
Evaluating coding agents requires more than checking whether generated code is correct. This article outlines a vendor-neutral framework for assessing autonomous planning, sustained execution, error recovery, reasoning stability, and cost efficiency, with a reusable checklist for comparing long-running engineering tasks against lightweight controls.
In production engineering, an LLM’s ability to write code is no longer enough. Delivery quality depends on whether an agent can break down tasks, use tools, correct its own mistakes, and execute continuously for tens of minutes without stopping prematurely or skipping critical steps.
Drawing on a multidimensional hands-on evaluation that consumed tens of millions of tokens in total, this article turns observed behavior into an evaluation framework and practical guidance. It is not tied to any particular model or vendor, allowing engineering teams to reproduce the approach and compare results.
Evaluation Goal: From One-Shot Generation to Long-Horizon Feedback Loops
Traditional benchmarks largely measure the correctness of a single response. Agentic coding requires a model to work through an open-ended environment: understand the goal, plan modules, write and modify code, run validation, and adjust its approach based on failures.
Evaluation prompts should deliberately provide fewer implementation details. Leaving the “how” to the model tests autonomous planning rather than fill-in-the-blank completion.
An evaluation suite should cover at least three task categories:
- Moderately sized business applications: Data models, permissions, reporting, and frontend interactions.
- Engineering tasks with external simulation environments: Tasks that require repeated runtime debugging.
- Lightweight logic problems as controls: Tasks that reveal whether the agent uses more reasoning than necessary.
The first two categories test long-horizon capabilities. The third tests whether the model can avoid overengineering a simple problem.
Finding 1: Long-Horizon Planning and Sustained Execution Are Key Strengths
For database and bookkeeping application tasks, strong agents typically begin with a structured plan covering functional modules, table schemas, development order, and a post-development verification checklist.
That checklist is often undervalued. It brings acceptance criteria into the execution loop, reducing the likelihood of an agent stopping after writing code without validating the result.
Continuous execution for tens of minutes without obvious repetitive loops suggests that the model can maintain task state: which modules are complete, which dependencies remain unresolved, and which checks still need to run.
Useful engineering signals include:
- Does the agent follow its plan rather than repeatedly abandon and rebuild it?
- After a failure, does it identify the relevant files and tests?
- Does the frontend or API actually work, rather than merely presenting a static page?
Visual design and interaction polish are often weaker than functional correctness. Evaluations should score working core workflows separately from visual completeness, so surface appearance does not obscure architectural defects.
Practical guidance: Define explicit stopping conditions, such as passing tests and completing the checklist, alongside resource limits, such as maximum runtime and retry counts. Otherwise, an agent’s capacity for sustained execution may be spent on unproductive retries.
Finding 2: Complex Reasoning Shows Promise, but Stability Remains a Weakness
On puzzles requiring multiple constraints to be satisfied, models often show useful hypothesis-testing and elimination skills. On difficult mathematical proofs or tasks requiring strict formal reasoning, however, they may repeatedly pursue the same incorrect path or produce an answer that appears complete but skips essential steps.
For engineering teams, the implication is straightforward: longer reasoning does not necessarily mean better reasoning.
Evaluations should distinguish productive reasoning steps from repetitive loop steps. If a model repeats an unchanged hypothesis after that hypothesis has already been rejected, treat this as a stability problem—not as a reason to allocate more tokens so it can “think longer.”
Mitigation is an engineering exercise:
- Limit the length of each reasoning attempt.
- Require verifiable intermediate conclusions at each step.
- Explicitly exclude failed paths from subsequent attempts.
- When necessary, switch to a more direct strategy, such as stating the conclusion before developing the proof or first writing an executable checking script.
Finding 3: Overthinking Simple Tasks Is an Unexpected Weakness
On simple word problems with few constraints and a unique answer, a stronger reasoning mode can sometimes perform worse. It may complicate the problem, introduce irrelevant variables, or continue searching after enough information is already available. A faster, more direct mode may be more reliable.
This means product strategy should not default every request to the strongest reasoning mode.
Requests should instead be routed according to their needs:
- Repository-wide refactoring and ambiguous requirements belong on a long-horizon agent path.
- Factual questions, short logic problems, and format conversions belong on a low-latency path.
An evaluation suite must include tasks that should not require extended deliberation. Testing only difficult problems can overstate the quality of the real user experience.
Finding 4: When Pricing Changes, Caching Shapes Long-Task Costs
Long-running coding tasks contain substantial token repetition. System prompts, repository summaries, and unchanged files may appear across many rounds. As a result, even when unit prices rise, a high cache hit rate can keep the actual bill increase well below the nominal price increase.
Cost evaluations should separately track:
- New input tokens.
- Cached input tokens.
- Output tokens.
- Tokens consumed by tool responses.
Practical optimizations include keeping system-prompt prefixes stable, updating repository summaries incrementally rather than pasting the entire repository, trimming test logs to relevant failure stack traces, and avoiding repeated transmission of unrelated resources.
These are general context-management practices, not techniques tied to a particular provider’s billing model.
A Reusable Evaluation Checklist
- Minimally prescriptive prompts: Provide goals and acceptance criteria, but leave table schemas and directory structures to the agent.
- Planning quality: Check whether the initial plan coherently covers modules, data models, risks, and validation.
- Execution continuity: Track uninterrupted runtime, interruptions, and omitted critical steps.
- Error recovery: Assess failure localization, minimal corrective changes, and regression testing.
- Reasoning discipline: Track repetitive loops, overthinking, and accuracy on lightweight tasks.
- Cost structure: Measure cache hit rates and the proportion of unproductive output.
Conclusion
Progress in agentic coding is most evident in the ability to create a plan autonomously and keep working for an extended period. The main weaknesses remain reasoning stability and task routing.
To turn model capabilities into predictable engineering outcomes, evaluations need to move beyond one-shot correctness and observe the full execution loop. Caching and request routing are equally important for controlling cost.
Rather than debating whether a particular demonstration is impressive, teams should incorporate this checklist into continuous integration. Each model upgrade should face the same long-horizon tasks and the same lightweight control problems.
