LLM-Powered Long-Horizon Coding Tasks: Capability Boundaries and Acceptance Criteria

    Large language models are evolving from code-completion tools into agents capable of executing long-horizon tasks. In cross-module changes and greenfield projects, they can carry multi-step work forward and bring a task to a runnable, testable state. However, runnable does not mean deliverable. Drawing on two real-world tasks, this article explains what these models can and cannot do, and how teams should structure human acceptance review.

    Large language models are evolving from code-completion tools into agents capable of executing long-horizon tasks. In cross-module changes and greenfield projects, they can carry multi-step work forward and bring a task to a runnable, testable state. However, runnable does not mean deliverable. Drawing on two real-world tasks, this article explains what these models can and cannot do, and how teams should structure human acceptance review.

    1. How Capabilities Are Changing in Long-Horizon Coding Tasks

    Many teams want to know: how do large models actually perform on long-horizon coding tasks? It is widely believed that expanding the scale and variety of long-horizon task environments during post-training, and extending training duration, helps models improve on engineering tasks. This article does not independently verify that claim or track specific model versions, so it can only describe what we observed on our own tasks.

    In the past, models tended to perform well on single files or localized logic, but once placed inside multi-package structures such as a Monorepo, they often suffered from broken context and mismatched interfaces. In our tests, the model was able to work continuously in a multi-module environment: it read frontend/backend interface definitions, database state transitions, and task queue logic, then modified the API, Worker, and Web layers in order. Within the scope of our tasks, it could produce runnable code, but actual coverage depends on test design. When test coverage is insufficient, code that runs is not necessarily code that is correct.

    2. Two Practical Tasks: Process and Results

    To evaluate the model on complex engineering work, we designed two sharply different tasks. One was a legacy system refactor, testing the model’s ability to understand old code and respect its implicit constraints. The other was building a complete application from scratch, testing its ability to close the loop from requirements to a working product.

    Task 1: Legacy System Refactor — Adding Secure Asset Import and Animation References

    The project contained a large amount of historical code. The task required the model to add two capabilities: “secure user image asset import” and “HTML animation scene referencing.”

    The model was able to read the existing code structure, map out the data flow across asset upload, security validation, animation rendering, and state callbacks, and bring the project to a runnable state. This shows the model has real practical value in long-horizon iteration. However, human acceptance review uncovered a P1-level privilege isolation issue. In its drive to hit the functional goal quickly, the model ignored permission boundaries in multi-tenant or multi-role scenarios, creating a risk of unauthorized access.

    During human acceptance, we recommend checking at least the following:

    • Whether every new interface validates the caller’s identity.
    • Whether tenants can access each other’s asset IDs.
    • Whether the scope of operations for different roles (e.g., regular users vs. administrators) matches the permission matrix.
    • Whether asset uploads restrict file type and size, and include content validation.
    • Whether animation rendering isolates the script execution environment to prevent injection.

    Task 2: Building an Agent Learning Game from Scratch

    In the second task, we gave the model a set of agent learning materials and a detailed product requirements document (PRD), and asked it to build a knowledge-learning game that could be completed level by level.

    The model extracted key information from the materials, converted it into knowledge nodes in the game, and built complete state machine logic. The project ultimately ran end to end. Note that “running” only means the main flow can be completed. Details such as level balancing, invalid input handling, and save-state recovery still need separate testing. We recommend converting every PRD requirement into acceptance test cases and designing rollback paths for the state machine—for example, restoring to the last checkpoint when a game progress write fails.

    3. All Tests Green Does Not Mean Ready to Ship

    Tests passing does not mean the code is ready for production. In both of our tasks, the model-generated code ran, yet a permission problem still slipped through. The reason: models are easily misled by surface-level functionality and under-reason about security risks embedded in business context.

    On basic security tasks, some newer models can already assist with white-box code review and vulnerability reasoning, and their performance has improved. But we did not find a unified benchmark conclusion, nor did we run a systematic comparison against closed-source frontier models. In scenarios involving complete exploit chains, and in complex permission decisions tangled with business logic, the model’s reliability still needs to be supplemented by human judgment.

    4. Recommendations: Human-AI Collaboration and Engineering Safeguards

    1. Human acceptance is irreplaceable

    Anything involving permissions, security configuration, core transaction flows, and final delivery should be audited by humans. If the model generates both the implementation and the unit tests, the two may share the same faulty assumptions—so unit tests cannot be the sole basis for acceptance. Teams should add security audits and integration testing, and have reviewers who were not involved in writing the code.

    2. Use cloud-native capabilities as a safety net

    When deploying model-generated code, rely on infrastructure to reduce risk:

    • Container isolation: assign services a least-privilege runtime identity and restrict network access to prevent unauthorized operations from spreading.
    • Logging and alerting: collect metrics such as authentication failures, cross-tenant access attempts, and abnormal call volumes, set alert thresholds, and configure automatic blocking policies.
    • Secret management: store credentials in a dedicated secret management service—never in code or logs.

    3. Add automated security scanning before merging

    Integrate static application security testing (SAST) and software composition analysis (SCA) tools before code merges. Teams can set merge gates as follows:

    • Critical vulnerabilities block the merge outright.
    • Medium-severity vulnerabilities require owner approval as an exception, with the reason and deadline recorded.
    • False positives must be backed by evidence and confirmed by the security lead before being whitelisted.
    • Newly introduced third-party dependencies must pass license and known-vulnerability checks.

    Specific thresholds should be set according to the team’s risk tolerance.

    5. Common Mistakes to Avoid

    • Looking only at test pass rates without checking whether tests cover permission scenarios.
    • Letting the model write both the implementation and the tests, so the tests only validate the model’s own assumptions.
    • Treating “it runs” as “it’s ready to ship.”
    • Trusting the model’s interface assumptions about legacy code it has never actually examined.

    6. Conclusion

    Large models are getting better at long-horizon coding tasks. In our controlled evaluations, they have reference value for participating in real project development, and may improve efficiency especially on cross-module changes. That said, efficiency gains should be measured against your own team’s baseline metrics. Security reasoning and complex permission handling remain weak points, so ultimate responsibility always rests with developers. Teams can let the model generate features freely—but security acceptance must be strictly enforced.