How Post-Training Determines the Upper Limit of Coding Agents
This article explains why single-benchmark scores fail to predict how a coding agent performs on real engineering work, and why post-training, rather than base model size, is the main source of stability differences. It covers the shift from completion to execution, the key stages of the reinforcement pipeline, the structural causes of uneven capability distribution, the limits of text-only models on full-stack projects, a five-level autonomy ladder, and the infrastructure needed for long-horizon tasks. Readers will get a practical framework for evaluating coding agents by long-chain reliability instead of per-task accuracy.
1. Why Running a Few Benchmark Tasks Is Not Enough
Over the past year, the capability curve of coding agents has steepened noticeably, yet the differences in day-to-day experience are hard to explain with a handful of test problems. The reason is simple: real development work is not a single-turn question, but a long chain that includes requirement understanding, solution decomposition, file reads and writes, command execution, result verification, and recovery from failure. A single-task benchmark measures “can it write this snippet,” while production adoption cares about “can it stay on track for dozens of consecutive steps.”
A more reliable way to judge an agent is therefore to let it work in a real repository for several hours and observe three metrics: task completion rate, the proportion of ineffective operations, and the ability to recover after failure. Only when all three are satisfactory can we talk about handing work over to it.
2. The Post-Training Pipeline: Where Stability Differences Really Come From
With the same base model size, agents built by different teams can differ by an order of magnitude in performance. The gap comes mainly from post-training, not parameter count.
2.1 From “Can Complete Text” to “Can Execute”
Pre-training solves a token distribution problem; post-training solves a behavioral policy problem. To make a model use tools reliably, the training stage has to construct a large number of “observe-decide-act-observe again” trajectories, so the model learns to read files first when information is missing, locate the stack trace first when an error appears, and proactively run verification after making a change. These behaviors cannot be patched in temporarily through prompting.
2.2 Key Design of the Reinforcement Pipeline
In engineering practice this usually involves three steps: first, behavior cloning on high-quality real trajectories; then, reinforcement optimization with automatically checkable rewards (whether the build passes, whether tests pass, whether static checks are clean); finally, preference alignment to suppress output that “looks right but does not actually run.” Whether the reward can be judged automatically is the dividing line that determines if the pipeline can scale.
A schematic training data structure can be abstracted as:
{"task": "Add a paginated query endpoint to an existing service","steps": [{"action": "read_file", "target": "router/index"},{"action": "patch", "diff_ref": "patch_01"},{"action": "run", "cmd": "build_and_test"},{"action": "observe", "result": "compile_ok, tests_failed:1"}],"reward": {"compile": 1, "tests": 0, "lint": 1}}
2.3 Why Stability Matters More Than Peak Capability
In a managed setting, one “confidently wrong edit” can pollute multiple files, and the cost is far higher than spending a few extra minutes thinking. Stability means predictable behavior: a contained change scope, consistent naming style, and no opportunistic refactoring of unrelated modules. That predictability is a direct reflection of how thoroughly post-training was done.
3. Lopsided Capability: Structural Reasons for an Uneven Distribution
A common observation is that a model strong at coding may be clearly weaker on other dimensions, and highly uneven even within coding itself.
- Uneven framework coverage: Training trajectories concentrate on a few mainstream frameworks. With second-tier frameworks, the model tends to “guess APIs” from naming conventions, producing calls that look reasonable but do not exist.
- Scarce command-line experience: Knowledge about obscure flags, pipeline combinations, and environment differences has low density in the corpus, so the model struggles to form correct troubleshooting intuitions.
- Weak search and verification: Without active retrieval and cross-checking strategies, the model tends to let memory override facts.
The mitigations are engineering-based rather than dependent on the model’s self-discipline: maintain an internal API index and a code snippet library, turn “memory problems” into “retrieval problems” through retrieval augmentation; enforce command whitelists and parameter validation at the tool layer; and require sources for key conclusions.
def resolve_api(name: str, version: str) -> dict:# Search the internal index first; only allow free generation if there is no hithit = internal_index.search(name, version)if hit is None:raise UnknownAPIError(f"{name}@{version} is not in the index; guessing calls is forbidden")return hit
4. The Boundary of Single-Modality: Why Full-Stack Projects Stall on the Front End
When a model can only handle text, a clear break appears in full-stack development. The back end has explicit success signals: compilation, unit tests, and API contracts, which allow a closed automated loop. The front end lacks an automatically checkable signal for “visual correctness”; misaligned layout, overlapping layers, and poor color balance cannot be inferred from code text.
Agents with multimodal and interface-operation abilities can bring UI screenshots into the observation loop, forming a “render-compare-adjust” iteration. A single-modality approach can only hand this part back to humans. A practical compromise is to externalize the visual step explicitly: automated screenshots produce images, a vision-capable model or a human reviewer evaluates them, and the conclusions are converted into structured change requests fed back to the coding agent.
Coding agent → build preview → automated screenshot → visual review (multimodal/human)↑ │└────────── structured change requests (JSON) ←────┘
5. Autonomy Levels: From Module Development to End-to-End Delivery
A five-level ladder can describe current engineering usability:
- Clear requirements + mainstream framework + single module: highly automatable;
- Cross-module changes: humans need to split tasks and accept results;
- Introducing unfamiliar dependencies: authoritative documentation must be provided by a human;
- Involving UI and aesthetic requirements: visual capability must participate;
- End-to-end delivery from requirement analysis, prototype design, and asset generation through testing, deployment, and metric monitoring: still a frontier capability that requires long-running frameworks and solid observability.
Deciding which level your own requirements fall into is more practically valuable than arguing about model rankings.
6. Engineering Support for Long-Chain Tasks
For an agent to finish long tasks reliably, it needs a full set of infrastructure beyond the model itself:
- Context management: layered summarization, retrieval on demand, and compression of historical trajectories to avoid context-window bloat that causes goal drift;
- Sandboxing and isolation: containerized execution environments, least privilege, and resource quotas to keep mistakes from spreading;
- Observability: a log service that collects execution trajectories centrally, plus monitoring and alerting that flag abnormal loops and repeated failures in real time;
- State and artifacts: object storage for build artifacts and screenshots, and a message queue to decouple long-task scheduling;
- Evaluation system: a regression set built from internal real repositories, run after every model or prompt change, tracking trends in completion rate and ineffective-operation rate.
On the cloud, these capabilities map to general product categories: a container platform provides isolated execution, object storage holds artifacts, log service together with monitoring and alerting forms the observability loop, and a message queue handles task orchestration. Baidu AI Cloud offers corresponding capabilities in these general infrastructure areas, which can be combined as needed and kept decoupled from the model layer to avoid lock-in to a single vendor.
7. Conclusion
Evaluating coding agents should shift from “per-task accuracy” to “long-chain reliability”: the completeness of the post-training pipeline sets the ceiling on stability, whether the capability distribution is balanced defines the applicable scope, multimodal and interface-operation abilities determine whether full-stack work can be covered, and engineering support decides whether these capabilities actually reach production. For teams, the pragmatic path is to first identify the autonomy level of the task, fill in the three foundations of retrieval, sandboxing, and observability, and then gradually expand the scope of work handed over.
