Long-程 Code Agents Tested: Capability Boundaries and Security Acceptance
This article evaluates long-horizon code agents through two complementary hands-on tasks: modifying a legacy repository and building a runnable project from scratch. It explains why public benchmark scores fall short of real delivery quality, what changed between agent generations under a consistent baseline, and where agents still fail—especially on implicit security constraints such as resource ownership and access control. Readers will find practical guidance on task decomposition, explicit constraint checks, layered acceptance, environment isolation, and human-AI division of labor.
1. Why Benchmark Scores Are Not Enough for Long-Horizon Coding
A common mistake when evaluating code agents is treating public benchmark scores as equivalent to delivery capability. Benchmark problems usually have clear boundaries, controlled dependencies, and a single acceptance criterion. Real engineering environments are the opposite: context is scattered across modules and commit history, constraints exist implicitly, and acceptance often includes non-functional items such as security, permissions, and maintainability.
A more reasonable approach is to construct two complementary task types. The first is “legacy system modification,” which tests whether the model can read existing structures, respect historical conventions, and add incremental functionality under security constraints. The second is “zero to runnable,” which tests whether the model can start from documentation and requirements and complete a closed loop of analysis, design, implementation, and self-verification. These correspond to two very different capability profiles: understanding an old system and building a new one.
2. Task Design for This Test
Task 1: In a repository with a relatively long history, add the ability to “securely import user image assets and reference them in animation scenarios.” The key difficulty is not the feature itself, but the fact that asset uploads involve multiple constraints: file type validation, size limits, storage isolation, access authentication, and content security. The implementation must also stay consistent with the existing data model, API contracts, and task state machine.
Task 2: Given only one learning resource and one requirements document, implement a knowledge-learning game that can be fully completed from scratch. This task evaluates end-to-end completeness: requirement breakdown, level and progress design, state persistence, UI interaction, judgment logic, and the verifiability of “actually being able to finish the game.”
Both tasks ran through successfully, but Task 1 exposed a high-priority issue during manual acceptance: permission isolation did not work as expected. This result itself shows that there is a clear gap between “the feature runs” and “the delivery is trustworthy.”
3. Improvements Across Generations Should Be Viewed on the Same Baseline
To judge whether an upgrade is genuinely effective, the baseline must be consistent. In earlier practice, similar tools could already continue cross-stack feature work in a multi-package monorepo—for example, adding a complete path from “page animation to video output,” involving contract definitions, database, task state, API layer, background executor, frontend UI, and renderer. The first implementation took about seventy-plus minutes, and subsequent browser verification and fixes took about another hour.
This round of upgrades did not change the underlying base model; it still uses a base model of the same scale. The improvements mainly come from scaling in the post-training stage: the number of long-horizon task environments expanded by more than an order of magnitude, environment types became more diverse, and training time increased significantly. The official summary groups the changes into three directions. First, coding capability, with emphasis on long-horizon tasks and production-grade software engineering. Second, security capability, extending from code generation to white-box code review and vulnerability reasoning, approaching frontier closed-source levels on basic security tasks, but still lagging in complete exploitation-chain scenarios. Third, an open strategy: full weights will be released after security assessment and hardening, making self-deployment and verification easier.
The engineering implication is that the improvement is more about “sustained working duration” and “environment generalization” than a leap in single-point algorithmic capability. This also explains why it performs better on long tasks yet can still fail on detailed constraints.
4. Real Performance in Legacy Project Modification
In Task 1, the agent’s strengths were clear: it could locate relevant modules, understand existing API contracts, fill in the data layer, API layer, and frontend reference logic in the existing style, and iterate on its own fixes when errors appeared, eventually bringing the feature to a runnable and testable state. The whole process did not require step-by-step human guidance.
The problem appeared during acceptance. Asset import involves the boundary of “who can see whose assets,” but the implementation only covered “the feature works” and did not fully cover “resource ownership and access control.” This type of defect usually does not show up as a crash or a failing test; it silently loosens permission boundaries and is a typical high-priority security issue.
One lesson can be abstracted: agents are good at completing explicit requirements but tend to overlook implicit security constraints. A practical response is to make security constraints explicit as executable checks—for example, specifying the resource ownership model during the requirements stage and adding targeted verification after implementation:
Acceptance checklist (example)1. Resource ownership: every asset must be bound to its creator and tenant2. Access decision: read APIs must validate identity, ownership, and role together3. Privilege-escalation cases: access from a non-owning account should return a denial, not empty data4. Storage isolation: storage paths of different tenants must not cross5. Audit trail: both denials and allows must produce traceable logs
5. Real Performance in the Zero-to-Build Task
Task 2 was closer to a “product-grade prototype delivery.” The agent could extract knowledge points from the material, design levels and judgment rules, complete state persistence and UI interaction, and verify “being able to finish the game” as a closed-loop goal. The value of this type of task is that it compresses “understand requirements—break down—implement—self-test” into the same pipeline, significantly reducing the cost of starting from zero.
However, passing self-tests only means the main path works, not that edge cases are complete. Scenarios such as corrupted progress saves, duplicate submissions, and recovery after abnormal interruption often require humans to add test cases.
6. Conclusion and Practical Recommendations
Across both task types, a restrained conclusion is possible: current long-horizon code agents are worth trying in real projects, especially for cross-module, long-chain engineering tasks that require continuous iteration. But in permission, security, and final acceptance stages, humans cannot let go.
Implementation recommendations:
- Task decomposition: split large tasks into verifiable small steps, each with acceptance conditions;
- Explicit constraints: write implicit requirements such as security, permissions, and compatibility as executable checks;
- Layered acceptance: get the main path working first, then add privilege-escalation, exception, and recovery cases;
- Environment isolation: run in separate branches and isolated resources to avoid directly affecting production data;
- Human-AI division of labor: the agent handles implementation and initial screening, while humans handle threat modeling and final sign-off.
If integration with general cloud capabilities is needed, object storage can hold assets, log services can record audits, and monitoring and alerting can track anomalies, but the permission model and acceptance criteria should still be defined by the project itself rather than relying on tool defaults.
