Capability Boundaries and Acceptance Practice for Long-Horizon Code Agents

    This article examines long-horizon code agents for software engineering. Instead of ranking models on leaderboards, it asks whether an agent can keep track of context in a real project, carry out cross-module changes, and bring a task to a state that runs, passes tests, and meets acceptance criteria. Based on a hands-on practice observation, the article finds that newer agents raise the ceiling for coding work, especially long-horizon refactoring in existing projects. They are not yet ready for delivery on the basis of passing automated tests alone. Permissions, security, data isolation, and final acceptance still require human review.

    1. Evaluation Perspective: From Single-Point Scores to Long-Task Loops

    Single-point benchmarks are good at answering whether a model can solve a given problem. They are much weaker at answering whether a requirement can move through understanding, design, implementation, and verification as one closed loop. In real software projects, the difficulty usually lies not in a single function but in several implicit constraints acting at once. Legacy code often contains undocumented conventions. Data models and interface contracts constrain each other. Permission policies are spread across many modules. Background jobs and front-end state must work together. Test environments may also lack negative test cases. A long-horizon code agent must show that it can keep state consistent under these constraints and keep fixing regressions.

    Looking at how these models improve, gains often come less from swapping the base model than from post-training. That training scales up the number and variety of long-horizon task environments and extends training time. Publicly described upgrade directions fall into three groups. First, coding ability now emphasizes long-horizon, production-grade software engineering. Second, security capability extends from code generation to white-box code review and vulnerability reasoning. Third, open-weight releases move forward after security evaluation and hardening, so developers can self-deploy and verify the models. All three point to the same evaluation principle: do not rely only on short-task scores. Look at stability over long tasks, testability, and security boundaries.

    The more reasonable conclusion is that this class of models deserves a place in real-project evaluation pools, especially for long-horizon coding tasks. Delivery gates, however, must keep human review, particularly for permission models, security policies, and final acceptance. The two tasks below, which differ greatly from each other, illustrate this judgment.

    2. Two Hands-On Tasks: Upgrading a Legacy System and Building from Scratch

    The first task was to add a feature to an existing project with a large amount of legacy code. The feature allowed safe import of user image assets and referencing of those assets in web motion-effect scenes. On the surface, this is upload and display. In practice, it involves several layers of constraints: allowlists for file types and sizes, malicious content scanning, asset ownership and tenant isolation, signed references with expiry control, audit logging, compatibility with legacy code, and secure referencing from front-end motion scenes. This task tests whether a model can understand an older system, identify implicit rules, and make cross-module changes under security constraints.

    The second task provided only learning materials for an agent and a product requirement document. It asked for a learning game about agent knowledge that players could complete from start to finish, built from scratch. This task tests material analysis, level state-machine design, learning path organization, progress saving, assessment feedback, and overall product completeness.

    The two tasks sit at different ends of the spectrum. One adds secure changes to an existing system. The other turns source material into a productized application. Together, they cover different sides of long-horizon coding.

    Both projects eventually ran end to end, which shows that the model can keep complex tasks moving. However, during manual acceptance, the first project exposed a high-priority permission isolation problem. That problem matters more than whether the project ran. A model can complete functional paths, but negative security paths, permission matrices, and cross-tenant boundaries still need dedicated testing.

    3. Long-Horizon Coding Performance: Able to Push Forward, with Clear Limits

    In long tasks, this class of models stood out in three ways.

    First, it handled complex context better. When given an older project, the model located the relevant modules and identified dependencies among interface contracts, data models, task states, background job processes, front-end display, and rendering paths. It then proposed a fairly coherent migration path. Cross-module changes often fail by breaking three places while fixing one. The value of a long-horizon model lies in keeping state consistent and reducing the chance of losing constraints partway through.

    Second, it sustained progress across iterations. A long task is not finished in one generation. It goes through cycles of implementation, execution, error, fix, and regression. The model adjusted its work based on error feedback and moved the task from isolated code fragments to a state that runs and can be tested. For multi-package repositories, front-end and back-end collaboration, and background job chains, this ability to iterate matters more than the quality of any single generation.

    Third, its output became easier to verify. Good practice does not let the model simply “deliver.” Instead, the team asks the model to produce executable changes, test cases, and acceptance notes. The following language-neutral pseudocode shows how model output can be placed under automated checks:

    1. def accept_asset(req, user, project):
    2. policy = load_policy(project.id)
    3. asset = normalize(req.file)
    4. assert asset.size <= policy.max_size
    5. assert asset.mime in policy.allowed_mime
    6. assert scan_malware(asset) == CLEAN
    7. assert authorize(user, "asset:write", project.id)
    8. stored = store_isolated(asset, owner=project.id)
    9. audit(user, "asset.import", stored.id)
    10. return sign_reference(stored.id, ttl=policy.ref_ttl)

    The point of this pseudocode is not the specific interface. It moves security constraints into the gate. Type checks, size limits, malware scanning, authorization, isolated storage, audit logging, and signed references are all required. The model can generate the implementation, but the team must define and maintain the gate rules.

    4. Security and Permissions: Passing Automated Tests Does Not Mean Ready to Deliver

    The high-priority permission isolation problem found in the older project is the most typical risk when these models are put into use. Functional tests usually cover whether a normal user can complete an operation. They often do not cover whether user A can access user B’s resources, whether a signed reference still fails after it expires, whether tenant isolation applies at both the storage and query layers, or whether audit logs record key operations. Models are good at advancing along the main path. Negative security cases require domain knowledge and adversarial thinking.

    For example, a web motion-effect scene reference should not only check that the reference exists. It must also check the reference’s ownership, its expiry time, and the viewer’s permissions:

    1. def resolve_scene(ref, viewer):
    2. meta = load_ref(ref)
    3. assert not meta.expired
    4. assert authorize(viewer, "scene:read", meta.project_id)
    5. assert meta.owner_id == meta.project_id
    6. return render(meta)

    Checks like these should run uniformly on the server. They must not rely on hiding elements in the front end. During manual acceptance, reviewers should focus on the permission matrix, horizontal privilege escalation, resource ownership, signature expiry, audit completeness, and error paths. A model can bring a task to a state that runs and can be tested. Passing automated tests, however, does not mean the work is safe to deliver. People remain responsible for permissions, security, and final acceptance.

    5. Engineering Recommendations: Division of Labor and Evaluation System

    To use long-horizon code agents reliably, teams should build evaluation and gating together.

    The evaluation set should include short tasks, long tasks, negative security tasks, and regression tasks. Short tasks check basic correctness. Long tasks check closed-loop work across modules. Negative security tasks check permissions and isolation. Regression tasks check whether historical behavior has been broken. Metrics can include task completion rate, regression pass rate, defect density, manual rework time, and security defect severity. For legacy system upgrades, teams should also track the implicit-constraint identification rate and the permission boundary coverage.

    For environment isolation, teams can use general-purpose cloud capabilities to build reproducible, auditable evaluation environments. For example, Baidu AI Cloud offers general-purpose service categories such as object storage, container platforms, log services, and monitoring and alerting. These can isolate test data, reproduce runtime environments, centrally record operation logs, and surface anomalies. The key is not one particular platform. The environment must be rebuildable, data must be isolated, and operations must be auditable.

    For division of labor, the model suits cross-module implementation, error fixing, test supplementation, and documentation. People should own security policy, permission models, release approval, and final acceptance. Rollout should start gradually. Begin with non-core modules, changes that can be rolled back, and scenarios with strong test coverage. Then expand to core paths.

    6. Conclusion

    Overall, the new generation of long-horizon code agents is worth testing on real projects. They are especially suited to long coding tasks, incremental upgrades of legacy systems, and taking a project from source material to a product prototype. Their value lies not only in generating code. It also lies in sustained understanding of complex context, pushing cross-module changes forward, and bringing tasks to a runnable, testable state. Their limits are equally clear. Permission isolation, security review, and final acceptance cannot be handed over to the model entirely. A safer engineering strategy is for the model to drive implementation, gates to enforce quality, and people to guard security and delivery. That combination turns a higher capability ceiling into controllable productivity.