Evaluating Long-Horizon Coding Agents in Real Projects: Capabilities, Security Boundaries, and Acceptance
Long-horizon coding agents are becoming more capable at cross-module work, but benchmark scores do not capture real project acceptance. This article examines two high-value evaluation tasks—secure modification of a legacy system and building a complete learning game from source material—and outlines capability dimensions, security and permission risks, and human-in-the-loop guardrails. The conclusion is that these agents are worth validating in real projects, but permissions, security, knowledge accuracy, and final acceptance remain human responsibilities.
1. Start with the Conclusion: Capability Is Rising, but Accountability Remains
Long-horizon coding agents should not be judged only by whether a single piece of generated code looks polished, or only by public benchmark scores. The more important question is whether an agent can understand complex context in a real project, sustain cross-module changes, and bring a task to a state that is runnable, testable, and ready for further iteration. In engineering practice, the capability ceiling of these agents is indeed rising, especially for long-horizon coding tasks. In a project with existing historical code, an agent can locate relevant modules, understand task state transitions, add interfaces and frontend interactions, and continue fixing issues after tests fail.
However, “all tests green” does not mean “safe to deliver.” Real projects also contain hard gates such as permission isolation, data ownership, security constraints, audit requirements, exception rollback, and final acceptance. In one evaluation, an agent could bring a legacy system modification task to a runnable state, yet manual acceptance exposed a high-priority permission isolation issue. In another case, an agent could build a learning game that could be completed end to end from source materials and a product requirements document, but knowledge accuracy and the learning path still required human review. A more reliable judgment is therefore this: these agents are already worth validating with real projects, especially for long-horizon coding and cross-module progress; but when permissions, security, and final acceptance are involved, humans cannot let go.
2. Why Benchmark Scores Are Not Enough to Evaluate Long-Horizon Coding
Benchmarks are good at measuring isolated capabilities such as function completion, algorithm problems, local defect fixes, or short-chain code generation. They provide useful horizontal references, but real software engineering is a long-chain, multi-constraint, highly collaborative activity. A task may span data models, interface contracts, background task processes, frontend interactions, renderers, and test cases. A change that looks correct may also introduce privilege escalation risk because resource ownership validation was omitted.
Evaluating a long-horizon coding agent should add the following observation dimensions:
- Task completion: Does it actually complete the requirement rather than only generate plausible-looking code?
- Cross-file consistency: Are data models, interfaces, frontend code, and tests updated together?
- Long-context retention: Can it still remember security constraints and historical design after multiple rounds of changes?
- Test-fix capability: After a failure, can it locate the root cause and keep making progress instead of repeatedly applying patches?
- Security and permission awareness: Does it proactively identify privilege escalation, resource ownership, input validation, and audit requirements?
- Human rework cost: How much manual review, repair, and acceptance are needed in the end?
- Auditability: Do changes have clear explanations, test evidence, and a rollback path?
These dimensions are closer to the real problems enterprises face during implementation than a single score. In legacy system modification in particular, implicit constraints are often not in the documentation but in historical code, comments, tests, and business habits. Whether an agent can discover and respect these constraints determines whether it is “usable for a demo” or “usable for engineering.”
3. Two High-Value Evaluation Tasks: Legacy System Modification and From-Scratch Delivery
To evaluate long-horizon coding agents, it is useful to design two clearly different tasks. The first is secure legacy system modification: in a project with a substantial amount of historical code, add the ability to securely import user image assets and reference them in web animation scenes. This task examines legacy system understanding, security constraints, cross-module changes, and regression risk at the same time. It requires the agent to identify the relationships among users, assets, scenes, permissions, and auditing, rather than simply adding an upload interface.
The second is from source material to product delivery: provide only a set of agent learning materials and a product requirements document, and let the agent implement from scratch an agent knowledge learning game that can be completed end to end. This task examines source analysis, concept extraction, level design, state machine implementation, progress saving, completion判定, and end-to-end validation. One task focuses on “safe evolution within a complex legacy system,” while the other focuses on “a complete loop from requirements to product.” Together, they provide a better view of the capability boundary.
4. Legacy Project Modification: Cross-Module Progress and Security Exposure
In legacy project modification, long-horizon coding agents often show strong context understanding. They can follow the call chain to find code related to asset import, scene references, permission checks, and frontend display, and add database fields, interface parameters, background task states, and frontend interactions. They can also continue fixing issues after tests fail and bring the task to a runnable state. This shows that they already have practical value for cross-module tasks.
But this is also where risk concentrates. Image asset import involves at least file type and size validation, storage path isolation, user ownership validation, scene reference authorization, audit logs, and exception cleanup. If an agent implements only “can upload, can reference, can display” but misses boundaries such as “who can reference whose assets,” “whether cross-tenant isolation is enforced,” and “how scene references are handled after an asset is deleted,” tests may pass while acceptance fails. High-priority permission isolation defects are often not syntax errors but missing business security paths.
Therefore, legacy system modification evaluation should focus on: whether default deny is enforced; whether resource ownership is validated on the server side; whether scene references form a complete authorization chain; whether privilege escalation access is covered by tests; whether audit logs are traceable; and whether exception paths leave dirty data. Agents can accelerate implementation, but humans must set hard gates for security boundaries.
5. From Scratch: Completeness from Source Analysis to a Completable Product
Building a learning game from scratch examines another type of capability: turning unstructured source material into product structure. The agent needs to extract knowledge points, define difficulty tiers, design levels and feedback, implement learning progress and completion判定, and ensure that a player can move from the initial state to full completion. The key here is not the number of pages but whether the loop holds: are knowledge points covered, are levels solvable, is error feedback meaningful, is progress recoverable, and are completion conditions verifiable?
In this type of task, agents can often quickly build state machines, question bank structures, and frontend flows, and they are willing to add end-to-end tests. However, knowledge accuracy, learning path合理性, and difficulty curve合理性 still require human validation. A game that “can be completed” is not the same as a product that “can effectively teach.” Evaluation should look at automated completion tests, knowledge point coverage, error path handling, and manual experience acceptance at the same time.
6. Five Key Capability Dimensions of Long-Horizon Coding Agents
First, long-context retention. After multiple rounds of changes, the agent can still remember permission rules, data ownership, and historical design, avoiding later code that breaks earlier constraints. Second, task decomposition and planning. It can break a large requirement into data, interfaces, frontend, tests, and security checks, and advance according to dependencies. Third, tool execution capability. It can run tests, read logs, locate failures, and continue fixing. Fourth, test-driven repair. Rather than piling on patches, it narrows the problem scope based on failure evidence. Fifth, security and compliance awareness. It proactively raises requirements for permissions, auditing, input validation, and rollback.
These five dimensions together determine the usability of long-horizon tasks. No matter how strong isolated code capability is, without security awareness and an acceptance loop, the agent can only remain at the assisted-development stage.
7. Engineering Guardrails: A Human-Agent Acceptance Checklist
Enterprises should establish guardrails during implementation: least privilege and default deny; server-side resource ownership validation; auditing of sensitive operations; layered test coverage for unit, integration, end-to-end, and security cases; code review focused on permission paths and data flows; canary release and rollback plans; and a manual acceptance checklist that explicitly covers security, permissions, data consistency, and operability. An illustrative permission check is shown below:
def import_asset(user, asset, scene_id):if not policy.can(user, "asset:import", asset.owner_id):raise PermissionDenied("no import permission")if not policy.can(user, "scene:reference", scene_id):raise PermissionDenied("no scene reference permission")asset.validate_type_and_size()audit.log(user, "asset.import", asset.id, scene_id)return asset_store.save(asset)
The point of this code is not the specific implementation but the reminder: permission checks must occur on the server-side main path and be tied to auditing, input validation, and resource ownership. An agent can generate similar code, but a human must confirm that it cannot be bypassed and that no boundaries are missing.
8. Conclusion: Usable, but Not Hand-Off
Overall, long-horizon coding agents already have real project evaluation value, especially for cross-module, long-chain, testable coding tasks. They can significantly shorten the path from requirement understanding to a runnable state and can continue repairing through test feedback. However, permission isolation, security constraints, knowledge accuracy, and final acceptance remain human responsibilities. A more reasonable implementation approach is to first establish a baseline with low-risk modules, then gradually expand the task scope; treat security and permissions as hard gates; and include both test evidence and manual acceptance in delivery standards. Agents can advance tasks, but they cannot replace accountability.
