How to Reliably Evaluate Long-Horizon Coding Capabilities in Large Language Models
Benchmark scores capture a model’s performance on isolated tasks, but real software development depends on sustained execution across complex codebases. This article presents a practical evaluation approach using two contrasting tasks—modifying an existing system and building a product from scratch—then examines the engineering strengths, security risks, and human review practices required for safe delivery.
How to Scientifically Evaluate Long-Horizon Coding Capabilities in LLMs
The Short Version
Whenever a new generation of large language models is released, the community is quick to compare benchmark rankings. In real engineering environments, however, leaderboard scores only reflect a model’s performance on standardized tasks at a particular moment. What truly affects developer productivity is its ability to sustain progress over a long-running task: understanding complex existing context, coordinating changes across modules, and bringing the work to a runnable and testable state.
Based on recent hands-on evaluations, my assessment is that leading open-source models have made substantial progress in coding and are now capable of being tested against real projects, especially for long-horizon development tasks. At the same time, a green test suite does not mean a change is safe to ship. Human review remains essential for authorization, security boundaries, and final acceptance.
This article discusses how to design effective evaluation tasks, what problems emerged during testing, and how to establish a practical human-in-the-loop delivery process.
Why Benchmark Scores Are Not Enough for Model Selection
Benchmarks are valuable because they provide quantitative metrics for comparing models. However, they have three inherent limitations.
First, their task granularity is usually too small. Many evaluations focus on single-function completion, single-file modifications, or short conversational problems. Real engineering work often spans dozens of files, multiple modules, and several technology stacks.
Second, benchmarks lack continuity of state. During real development, a model must remember code it wrote and decisions it made hours earlier, then remain consistent in later steps. A single inference cannot measure this capability.
Third, they rarely cover security and constraint handling. Evaluations typically check whether a feature works, but not whether the implementation weakens the permission model, introduces injection risks, or bypasses audit logic.
The right way to evaluate a coding model is therefore to use real requirements from real projects as a stress test. The goal is to observe performance across the full development lifecycle rather than judging a single generated response.
Two Complementary Evaluation Tasks
To assess different aspects of model capability, I designed two fundamentally different tasks.
Task 1: Modifying an Existing System
The first task involved adding secure user image and asset importing, along with support for referencing those assets in page animation scenes, to an established project with a substantial amount of legacy code.
The main challenge was not writing new code. It was understanding the conventions and architecture of the existing system, including how data moves through the application, how permissions are checked, and how asynchronous jobs are orchestrated.
The requirements also included explicit security constraints: uploaded user assets had to undergo validity checks and remain isolated from unauthorized access. This made the task a useful test of whether the model could account for security requirements while implementing functionality.
Task 2: Building a Product from Scratch
The second task provided only learning materials and a product requirements document. The model had to build a knowledge-learning game that users could complete from beginning to end.
This task evaluated the full loop from analyzing source material and designing an architecture to delivering a working product. It required coordination across several subsystems, including frontend interactions, level logic, and progress persistence.
The two tasks complemented each other. The first evaluated the ability to work within existing constraints, while the second evaluated independent creation and execution.
Results: Impressive Engineering Execution
The progress in long-horizon task performance was clear. In the first task, the model correctly identified contract definitions, database migrations, job state machines, API layers, background workers, and frontend rendering paths in the existing codebase. It then completed coordinated changes across the frontend and backend within a continuous session.
Several capabilities stood out:
- Context retention: During a session lasting several hours, the model did not forget the directory structure or naming conventions established earlier. The new code remained consistent with the existing style.
- Incremental progress: The model understood how to break a large task into smaller, verifiable steps. After completing each subsystem, it ran tests instead of producing the entire implementation in one pass.
- Autonomous debugging: When browser validation exposed problems, the model used the error messages to identify root causes and make fixes, creating an iterative implementation, validation, and repair loop.
The second task also exceeded expectations. Starting from a requirements document, the model produced a runnable game with a complete level flow, interactive interface, and completion logic. This demonstrated a growing ability to translate abstract requirements into a concrete product.
The Critical Warning: Passing Tests Does Not Mean Safe Delivery
Despite the strong results, the first task revealed a P1-level issue during human acceptance testing: a permission-isolation flaw.
The asset access endpoint was functionally correct, and all tests passed. However, the authorization logic failed to verify resource ownership. In theory, this made it possible for a user to access assets uploaded by another user.
This example is highly representative of a broader weakness in current coding models. Models tend to prioritize satisfying explicit functional requirements, while lacking a strong instinct to proactively defend implicit security invariants.
The automated tests did not catch the issue because the test cases had also been generated by the model. The model wrote tests for the scenarios it had considered, but negative cases from an attacker’s perspective were naturally missing.
The lesson is clear: authentication, authorization, data isolation, and input filtering require human review or an independent security-testing process. These areas should not be treated as safe for delivery merely because the model’s self-generated tests pass.
Best Practices for Human–AI Delivery
Based on the results from both tasks, I recommend the following collaboration practices:
- Make constraints explicit during requirements definition. Security requirements, permission boundaries, and compatibility constraints should be written directly into the prompt or specification. Do not assume the model will infer them. The more specific the constraints, the lower the likelihood of violations.
- Let the model test its work, but do not let it define the acceptance standard alone. Model-generated tests can cover expected functional paths, but humans should add security cases and boundary conditions.
- Use staged acceptance. Conduct a human review after each module is completed. Focus on data flows and authorization checks rather than waiting until the entire project is finished.
- Keep human ownership of security-sensitive modules. Authentication, authorization, payments, and file processing should receive human code review regardless of how well the model performs.
Conclusion
The latest generation of coding models has moved beyond simply assisting with code writing toward assisting with software engineering. Their improved long-horizon capabilities are substantial and worth validating against real projects.
However, software delivery is ultimately about responsibility. Models can take on much of the execution work, but humans must retain control over critical judgments. The sensible approach is to embrace the productivity gains while establishing an acceptance process that matches the model’s limitations.
Only then can higher efficiency be achieved without sacrificing quality or security.
