Long-Horizon AI Coding in Practice: Capabilities Advance, but Security Still Needs Human Gatekeepers
This article evaluates a new-generation AI coding model on two very different real-world tasks: modifying a legacy system and building an Agent knowledge-learning game from documentation and a PRD. It examines the model’s long-horizon state retention, end-to-end delivery capability, and a P1-level permission-isolation defect found during human acceptance. The article concludes that long-horizon coding is now viable for real projects, but teams still need human review, adversarial security testing, and auditable evidence chains for security-sensitive logic.
1. From “Can Write” to “Can Carry”: the Key Leap in Long-Horizon Coding
Over the past year, competition among AI coding tools has shifted from single-function completion to long-horizon task control. A long-horizon task requires a model to work continuously across a complex codebase spanning multiple files, modules, and technology stacks; understand existing architectural conventions; complete cross-module changes; and ultimately deliver runnable, testable results. This capability directly determines whether a tool can evolve from a “code snippet generator” into a “collaborative developer for real projects.”
The new-generation AI coding model tested in this article targets exactly this direction. Its biggest change is not an adjustment to base-model scale, but a strategy innovation in the post-training stage: the training environment has been expanded substantially from short-context, single-task patterns to long-horizon task scenarios tens of times larger, covering richer codebase types and engineering practices. This approach of “feeding the model real engineering problems” produces substantive improvements in planning, memory, and execution coherence on long tasks.
Specifically, the upgrade is reflected in three dimensions:
- Code generation and refactoring capability: long-chain changes for production-grade software engineering, rather than merely algorithm problems or script writing;
- Security and review capability: extending from “generating usable code” to “white-box code review” and “vulnerability pattern recognition,” approaching frontier closed-source models on basic security tasks;
- Open-weight strategy: full model weights are released after safety evaluation, enabling developers to deploy and verify the model themselves.
These capability upgrades are not just paper specifications; their real quality needs to be tested in concrete projects.
2. Test Design: Two Highly Different Real Tasks
To comprehensively evaluate the model’s capabilities, this test deliberately designed two very different task scenarios.
Task 1: Modifying an Existing Project—Understanding the Hidden Constraints of “Old Code”
The first task was based on an old project that had been running for years. The model was asked to add a feature for “secure user image asset import and HTML motion scene references.” The difficulty of this task was not writing a new feature from scratch, but rather:
- Understanding the architectural layering and interface conventions in the existing code, without breaking historical business logic;
- Reviewing the image resource import flow to ensure there were no common security vulnerabilities such as path traversal or malicious file upload;
- Embedding the new feature into the existing permission system, with clear boundaries for “who can upload images” and “who can reference them”;
- Handling multi-module coordination involving database schema changes, API route extensions, and frontend rendering flow integration.
Task 2: Building from Scratch—Complete Implementation Based on Documentation and a PRD
The second task required implementing, from scratch, a fully playable Agent knowledge-learning game based only on a technical learning resource and a product requirements document (PRD). This task tested:
- Extracting core knowledge points from unstructured documents and converting them into gamified instructional design;
- Independently completing the full development chain, including requirements analysis, data modeling, core logic implementation, and interaction design;
- Producing an actual result that is “runnable and completable,” rather than a conceptual demo.
The two tasks stress-tested the model’s engineering capability from two dimensions: “understanding an existing system” and “turning documents into a product.”
3. Test Process and Result Analysis
3.1 Strong “State Retention” in Long-Horizon Tasks
During Task 1 (legacy project modification), the model demonstrated impressive “long-term memory” capability. The entire modification chain involved dozens of files, including data migration scripts, server-side API implementation, background task queues, and frontend component integration. Across multiple conversation turns and long intervals, the model consistently and accurately “remembered” early design decisions—such as database index strategy, unified status code conventions, and authentication middleware validation logic—and maintained consistency in style and logic in subsequent coding.
In Task 2 (building the game from scratch), the model extracted core elements such as “knowledge mastery assessment,” “path decision rewards,” and “level feedback mechanisms” from dozens of pages of mixed materials, and independently converted them into the game’s experience-point system, level unlock conditions, and knowledge card collection logic. This demonstrated its ability to transform “information input” into “structured product solution output.”
Ultimately, both projects achieved the basic goal of being “runnable and testable,” proving that the model already has the engineering capability to complete end-to-end delivery tasks.
3.2 Blind Spots and Overconfidence in Security Review
However, during the first round of human acceptance, Task 1 exposed a serious problem: a P1-level permission isolation defect.
Specifically, in the “image asset import” feature, the model correctly implemented the basic flow of “user upload” and “administrator review,” but in the “HTML motion scene reference” step, it failed to correctly inherit the project’s existing “resource ownership validation” logic. The final effect was that an ordinary user could, under specific conditions, reference protected assets they should not have access to, creating an unauthorized access vulnerability.
The root cause of this defect was not that the model “cannot write secure code,” but rather that:
- The model tended to “generate new logic” rather than “reuse existing security policies”; scattered permission validation declarations in the old project were not fully identified and migrated to the new module;
- When generating code, the model gave lower reasoning weight to “security constraints” than to “functional completeness,” manifesting as an “overconfident” output assumption.
This finding has important practical warning value: green tests for the model do not equal business security. Functional tests passing only means “the designed path works”; it does not mean “all illegal paths are blocked.”
4. Risk Warnings and Team Adoption Recommendations
Based on this test, although the long-horizon capabilities of the new-generation AI coding tool have crossed the threshold of “usable for real projects,” supporting development processes and human defense lines are still needed in actual adoption.
4.1 Establish a “Human-Machine Collaboration” Model
Position AI coding tools as “high-output pair programmers” rather than “replacements.” Developers should shift their main focus from “how to write code” to “why it is designed this way” and “whether writing it this way is secure.” Before code is merged, human engineers must perform independent logic review.
4.2 Conduct “Adversarial Testing” for Security Scenarios
For highly sensitive scenarios involving permissions, unauthorized access, data isolation, and payment transactions, teams cannot rely only on functional test cases. Targeted attack vector validation should be introduced, such as simulating unauthorized token requests, attempting unauthorized file access, and constructing malformed input packets. The defect in this test could have been quickly exposed through such adversarial testing.
4.3 Require an “Evidence Chain” Rather Than a “Conclusion”
When the model completes a development task, it should be required to provide auditable documentation such as a per-file change list, dependency relationship explanation, and security policy mapping table. If the model cannot accurately explain “why this feature can bypass existing authentication,” the feature should by default be considered to have a design flaw and sent back for review.
5. Conclusion: It Is Worth Entrusting with Real Tasks, but Human Gatekeeping Is Required
Overall, the performance of the new-generation AI coding model in this test marks an important step forward in long-horizon coding capability for AI coding tools. It is now capable of undertaking high-intensity coding tasks in complex legacy systems and new product builds, and its completeness and stability are sufficient to serve as an important lever for team productivity.
However, there is a clear line between “can it run” and “can it be delivered.” The model still has objective deficiencies in reasoning about security-sensitive logic, inheriting existing security constraints, and completing implicit boundary conditions. When a project involves permission control, data privacy, and end-user asset security, independent human code review and adversarial security testing must be retained.
The most reasonable positioning is this: treat the AI coding model as an efficient long-horizon task executor, while human developers remain the engineering owners and security gatekeepers with final judgment. This division of labor both releases productivity gains and protects the final line of defense for software quality.
