Long-horizon coding tasks are becoming the new benchmark for Chinese LLMs: what changes from one-shot tests to real engineering
This article explains why coding evaluation is shifting from one-shot benchmarks to long-horizon tasks, where models must preserve goals, use feedback, switch strategies, and converge reliably over hundreds of iterations. It compares the two evaluation paradigms, outlines the key dimensions of a mature coding benchmark, and details the mechanisms that support long-horizon agents, such as tool orchestration, rollbackable sandboxes, structured memory, constraint guards, budget control, and observability. It also offers practical advice for teams running their first long-horizon pilots.
1. A counterintuitive shift: coding evaluation is changing tracks
Over the past two years, the mainstream way to measure whether a model “can write code” has been accuracy on one-shot problems: complete a function from its signature, locate a fix for a described defect, or predict the output of a terminal command. The implicit assumption is that real development resembles an exam: the problem is clearly stated, the context is closed, and success can be judged from a single submission.
Real engineering is different. Tasks are often vaguely defined, constraints conflict, and feedback loops are long: write a version, run it, find that throughput is below target, switch algorithms, test again, see recall drop, refactor the data structure, keep load testing, and repeat for hours or even days. This has pushed a new capability dimension to the foreground: long-horizon task ability, meaning the ability to keep the goal from drifting across a very long execution chain, diagnose problems autonomously, switch strategies proactively, and keep converging toward a usable result.
Progress in the coding direction of a recent Chinese LLM release illustrates this shift. Its highlight is not a leading score on a single benchmark, but the ability to retain direction after hundreds of iterations and thousands of tool calls while improving retrieval throughput by several times. This suggests that when evaluating coding agents, process capability should be weighted equally with outcome capability.
2. From exam thinking to engineering thinking: two evaluation paradigms
One-shot benchmarks, such as function-level completion and single-defect repair, have three traits: clear input boundaries, automated judging, and very short execution traces. They are good at measuring syntactic correctness, memorization of common patterns, and local reasoning, but they cannot reflect stability over long chains.
Long-horizon task evaluation focuses on four things:
- Goal retention: after dozens of rounds, does the model still remember the original constraints, such as a recall threshold that must not be crossed?
- Feedback use: can it extract useful signals from test output, performance profiles, and logs instead of retrying blindly?
- Strategy switching: when local optimization hits a plateau, is it willing to discard the current approach and change the algorithm or data structure?
- Resource awareness: are the number of tool calls, elapsed time, and failure recovery costs under control?
A schematic evaluation loop can be abstracted as:
for step in range(max_steps):observation = run_tests(workspace) # get real feedbackif constraint_ok(observation) and goal_met(observation):breakplan = model.replan(goal, history, observation) # replanapply_patch(plan) # apply the change
The point of this pseudocode is not syntax but the emphasis that the core of long-horizon ability is the quality of the observe–replan–execute loop.
3. How to read a multi-dimensional scorecard: don’t just look at the top spot
A mature coding model evaluation system usually covers several complementary dimensions:
- Repository-level software engineering tasks: locate and fix issues in a real codebase, testing cross-file understanding and regression control.
- Natural language to a full repository: generate a runnable multi-file project from a requirements description, testing architecture and dependency organization.
- Terminal and command-line operations: run builds, tests, and troubleshooting in a real shell environment, testing environment awareness.
- Tool-augmented knowledge reasoning: allow retrieval and computation, testing evidence gathering and conclusion validation.
- Web information retrieval and task handling: test the ability to locate and integrate information in an open information environment.
How to read it: don’t compare only the single top score; weight the scenarios you care about. If your business is modernizing a legacy system, repository-level tasks and terminal operations matter more; if you are building a prototype from scratch, natural-language-to-repository ability matters more. Scores are the entry point; the capability profile is the conclusion.
4. Why long-horizon tasks are the real battleground
First, the cost structure has changed. A one-shot wrong answer has a manageable handoff cost; a long-horizon task that drifts midway can waste hours of compute and engineering time. Stable convergence is therefore more valuable than occasional brilliance.
Second, feedback is sparse and noisy. In performance optimization, a single change may affect throughput, latency, memory, and recall at the same time. The model must build multi-objective trade-offs rather than sprint on a single metric.
Third, state management is hard. Context windows are limited, and the longer the history, the easier it is to lose key constraints. Mature implementations introduce external memory: write constraints, experiment results, and failure reasons into structured files, and retrieve them into context on demand.
Fourth, the agent must “know when to quit.” Engineering experience shows that cutting losses when the direction is wrong saves more resources than continued fine-tuning. Proactively switching approaches is the dividing line for long-horizon agents.
5. Key mechanisms that support long-horizon ability
- Tool call orchestration: wrap build, test, load test, and log query as composable actions with a unified return structure so the model can parse them easily.
- Sandboxes and rollbackable environments: containerized workspaces with version control so any change can be reverted quickly, reducing trial-and-error risk.
- Structured memory: record “approach tried–result–conclusion” in checklists or tables to avoid repeating the same mistakes.
- Constraint guards: turn hard metrics, such as a recall floor, into automated checks that block candidate solutions from being submitted if they fail.
- Budget control: set limits on steps, tool calls, and elapsed time, and support graceful termination and staged reporting.
- Observability: connect process metrics to logging services and monitoring alerts for manual review and bottleneck localization.
On the cloud, these mechanisms map to a combination of common capabilities: a container platform hosts the sandbox, object storage holds artifacts and memory files, a message queue decouples long-task scheduling, and logging and monitoring provide end-to-end observability. In such general engineering practice, Baidu AI Cloud typically supports agent workloads with these foundational categories.
6. Practical advice for teams
- Start with a small long-horizon pilot: pick an optimization task with clear boundaries and automatically judgeable metrics, get the loop working, then expand.
- Write constraints as code: don’t leave them only in the prompt; enforce them with automated checks.
- Design staged reporting: output progress and the next plan every few rounds so humans can intervene and correct course.
- Build a failure library: archive ineffective approaches in structured form as negative examples for later tasks.
- Evaluate with two metrics: look at both the final gain multiple and the steps and calls consumed to achieve it.
7. Conclusion
The second half of the coding model competition is not about who memorizes problems better, but who can behave more like an engineer: keep the goal through long feedback, use evidence, dare to switch paths, and deliver stably. Bringing long-horizon task ability into your technology selection and evaluation system is the real takeaway from this round of progress.
