Testing the Long-Form Coding Limits of Large Language Models: A Hands-On Evaluation

    Large language models can now handle genuine multi-stage coding tasks, but how far can they really go? This hands-on evaluation tested mainstream models across two contrasting scenarios—extending a legacy system with security constraints and building a product from scratch. The results show real progress in long-context understanding, cross-module changes, and runnable deliverables, while exposing persistent gaps in permission handling and security validation that still require human oversight.

    Where Large Language Models Stand in Coding: A Long-Horizon Task Evaluation

    The Short Version

    Looking at how today’s mainstream large language models perform in coding scenarios, the overall picture is this: long-horizon coding capability can now support real, project-level development work, but there is still a clear gap from “fully automated delivery.” That gap doesn’t show up in whether a model can generate a piece of code—it shows up in permissions, security, and final acceptance, which are precisely the areas of software engineering where mistakes are least tolerable.

    So a reasonable way to position this generation of models is: they are worth putting into real engineering workflows to handle long-horizon coding work, but humans must retain final authority over security boundaries and overall quality. Below is the reasoning behind this conclusion.

    Why Benchmark Scores Aren’t Enough to Evaluate Coding Ability

    Many models score highly on public benchmarks, but what developers actually care about is rarely the correctness of a single-turn code completion. It’s the following combination of capabilities:

    1. Long-context understanding: Can the model accurately locate what needs to change in a codebase of tens or even hundreds of thousands of tokens, and understand the historical design intent behind it?
    2. Sustained cross-module changes: A single requirement often touches the data model, API layer, task scheduling, frontend rendering, and more. The model needs to plan proactively and work through each layer.
    3. Runnable, testable deliverables: Not code that “looks right,” but code that compiles, starts, and passes tests.
    4. Constraint adherence: Whether legacy code style, architectural conventions, and permission/security constraints are strictly enforced.

    Of these four, the first three have improved significantly in recent models. The fourth is where things most often go wrong, and it was the primary focus of this evaluation.

    Test Design: Two Contrasting Scenarios

    To make the conclusions more convincing, I designed two deliberately different tasks covering the two typical situations of “understanding an existing system” and “building a product from zero.”

    Scenario 1: Extending a security-sensitive feature in a legacy system

    In a project with substantial legacy code, existing permission isolation, and accumulated historical constraints, I asked the model to add “user-uploaded image asset import” and “HTML animation scene embedding” capabilities. The core challenges:

    • The new features had to work with the existing permission model and could not bypass existing validation logic;
    • Image import involved security constraints such as file type validation, storage paths, and size limits;
    • HTML animation embedding required protection against malicious script injection while preserving rendering flexibility;
    • Changes spanned the data layer, service layer, API layer, and frontend presentation layer.

    This scenario mirrors the most common real-world situation in enterprises: the system already exists, the constraints already exist, and the AI must first “read the rules” before making any changes.

    Scenario 2: From source material analysis to a working product

    Given only a set of learning materials about AI agents and a product requirements document, the model had to build, from scratch, an “Agent Knowledge Learning Game” that could be played through to completion.

    This task tests a much longer chain: understanding the material → extracting knowledge → designing game mechanics → designing data structures → implementing frontend and backend → verifying playability. It’s not about the quality of individual code snippets; it tests whether the model can autonomously produce a structurally complete, logically coherent product without any existing code to reference.

    The shared requirement for both tasks: the final result must be runnable and testable, not stuck at “demo-level” completeness.

    What I Observed: The Progress in Long-Horizon Coding Is Real

    Both projects ran end to end. Specifically, I observed the following improvements:

    1. Locating and understanding within complex contexts

    The model proactively explored the project structure and read the historical implementations of related modules instead of generating code detached from the existing style. In the legacy project scenario, it recognized that permission checks already had a unified entry point and followed that established pattern in the new features—directly reducing the risk of building parallel, inconsistent logic.

    2. Sustained progress on cross-module changes

    From database schema changes, to API definitions, to frontend call chains, the model worked through dependencies in order and backtracked to fill gaps when it discovered omissions mid-task. This ability to maintain “task state” is what distinguishes long-horizon coding from single-turn generation. In real development, a full-stack requirement often requires a dozen or more consecutive steps, and the model’s stability here has clearly raised the usable ceiling.

    3. Deliverables reached a runnable state

    Both projects compiled, started, and ran, with the main functional flows working. This means model output has evolved from “code draft” to “engineering artifact”—something that can go straight into human acceptance testing rather than requiring developers to rewrite it from scratch.

    But Security and Acceptance Still Can’t Be Handed Over

    The evaluation also exposed a critical weakness: in the legacy project scenario, although the features worked, manual acceptance testing uncovered a serious permission isolation issue (P1 severity)—certain resource access paths that should have been blocked by permission boundaries were not correctly covered by the new features.

    The danger with these problems: all-green functional tests do not mean all security constraints hold. Test cases typically cover the “happy path,” while permission isolation issues tend to hide in “unexpected paths,” such as:

    • Did the new API endpoints reuse the unified authentication middleware, or implement their own validation?
    • Did file import validate against path traversal and file type spoofing?
    • Did the HTML animation embedding properly escape or sandbox user-controlled content?
    • Did new data bypass the existing row-level or tenant-level isolation rules?

    When generating code, models tend to optimize for “getting the feature to run” and show less regard for legacy security boundaries than experienced engineers. This isn’t a flaw of any particular model—it’s an inherent risk of the current generative paradigm: it optimizes for task completion, while security auditing optimizes for unexpected-path coverage. The two goals don’t fully align.

    With that in mind, my practical recommendations:

    1. Permission- and security-related code must be reviewed line by line by humans—don’t rely on test results alone;
    2. Write security constraints explicitly into requirements, and list security items separately in the acceptance checklist;
    3. For every new endpoint, add negative test cases for unauthorized access, not just positive functional tests;
    4. Integrate security scanning and static analysis into the pipeline for AI-generated code to form an automated line of defense.

    A Reusable Method for Evaluating Your Own Models

    Based on this evaluation, here’s a methodology for assessing long-horizon coding capability that you can apply to your own projects:

    Step 1: Prepare two contrasting tasks

    • A “legacy system extension” task, with existing code and explicit security constraints;
    • A “build from scratch” task, providing only source material and requirements, to assess product-level completeness.

    Step 2: Define acceptance criteria

    Beyond functional correctness, include:

    • All builds and tests passing;
    • Adherence to existing architecture and code style;
    • Item-by-item verification of security and permission constraints;
    • Manual review of code readability and maintainability.

    Step 3: Record process metrics

    • Total time to completion and the number of human interventions;
    • Whether direction drift occurred or earlier constraints were forgotten mid-task;
    • Categories of issues found during the fixing phase (functional, security, performance, style).

    Step 4: Separate “capability ceiling” from “trust boundary”

    The capability ceiling is measured by task completion on long-horizon work; the trust boundary is measured by whether security, permissions, and acceptance still need human backup. Tracking these two lines separately is the only way to form a complete judgment about a model.

    Conclusion

    This generation of long-horizon coding models has crossed the threshold beyond “toy demos.” They can take on cross-module, multi-stage development work in real projects—especially well suited to scenarios with clear requirements but heavy engineering workloads. However, permissions, security, and final acceptance remain responsibilities humans cannot delegate. The safest approach is not to “let go and let it deliver,” but to treat the model as a tireless engineering collaborator: it drives the bulk of development, while you hold the line on security boundaries and quality red lines. That way, you gain the efficiency benefits while keeping risk within acceptable limits.