From Chat Models to Long-Horizon Agents: A New Paradigm for Large Model Upgrades
Post-training compute is shifting from chat quality toward environments where agents can keep working for hours or days. This article explains what long-horizon agents require, why hosted execution harnesses matter, how programming agents are evaluated, and what tiered API pricing signals for cost control.
1. The upgrade direction has changed: post-training compute is flowing into agent environments
For the past few years, large-model iteration has focused mainly on conversation quality, knowledge breadth, and reasoning depth. Recent industry activity points to a clear shift: more post-training compute is being spent on environments where agents can keep working, including coding, financial research, 3D tool use, and autonomous execution of long-running tasks.
That shift is not accidental. A chat model shows its value in single-turn or multi-turn question answering. An agent shows its value by finishing a job—a complex task that may run for hours or even days. The technical requirements differ in kind:
- Chat models need high-quality responses, accurate knowledge, and an appropriate style.
- Long-horizon agents need to stay aligned with the goal over long runs, correct themselves after errors, and manage planning and state across dependent steps.
For developers, this means a general Q&A leaderboard is no longer enough to judge whether a model fits agent work. What matters is how it behaves in long-running, resource-constrained, multi-step environments.
2. Three new requirements long-horizon agents place on models
1. Persistent goal tracking
Long-horizon tasks often span dozens or hundreds of steps. As context grows, the model still has to remember the original goal, what has already been done, and what remains. Technically, that depends on two things: the model’s own long-context understanding and compression, and external memory and state management. If either is weak, later stages tend to lose the goal, repeat work, or drift off course.
2. Reliable tool use and error recovery
Agent execution chains are full of failures: command errors, missing dependencies, network timeouts, and insufficient permissions. The real difference among strong agent models is not whether they can call a tool, but whether they can attribute a failure, change strategy, and retry. Much of that ability comes from feedback collected during post-training in real execution environments—which is why compute is moving toward a paradigm of repeated trial and error in those environments.
3. Awareness of multi-agent collaboration
When a task exceeds one agent’s context or capability, splitting work across agents becomes a natural choice: a lead agent breaks down the task, sub-agents run in parallel, and results are aggregated into one decision. The model needs clear instruction passing, a sense of role boundaries, and the ability to understand and integrate other agents’ outputs.
3. Hosted agents: turning the harness into cloud infrastructure
A notable engineering trend is that model providers are starting to offer the technical base that keeps agents running for a long time—often called a harness, or execution framework—as cloud infrastructure, rather than exposing only a conversational API.
Why the harness matters
A stable agent runtime has to solve a large set of engineering problems:
- Sandbox isolation: each task runs in its own resource-limited container so tasks do not interfere with each other.
- State persistence: intermediate state, filesystem changes, and execution logs must be stored reliably so work can resume from a checkpoint.
- Scheduling for long, always-on tasks: jobs may run for hours or across days, which requires heartbeat monitoring, timeout handling, and automatic retries.
- Multi-agent orchestration: channels for communication between agents, task distribution, and result aggregation.
Enterprises have traditionally had to build this themselves, combining container orchestration, message queues, object storage, logging, and monitoring and alerting. Productizing those pieces as a managed service lets teams spend less effort on the execution environment and more on task design and result validation. General-purpose offerings on major cloud platforms, such as Baidu AI Cloud’s container platform, message queues, and monitoring and alerting, are also common building blocks for a private agent runtime.
What this means for enterprise architecture
Typical layered architecture:┌──────────────────────────────────────────┐│ Business: task definition / acceptance │├──────────────────────────────────────────┤│ Orchestration: multi-agent collaboration││ and scheduling │├──────────────────────────────────────────┤│ Execution: sandbox / toolchain / state │├──────────────────────────────────────────┤│ Model: inference API / cache service │└──────────────────────────────────────────┘
Managed services push the complexity of the execution and orchestration layers into the cloud, so the enterprise mainly maintains business-layer logic. The tradeoffs still need to be weighed: data sensitivity, cost control, and dependence on a vendor all belong in the selection decision.
4. Evaluation: how to measure coding agents objectively
Long-horizon coding ability is currently measured mainly with two kinds of benchmarks. Understanding how they test is more useful than memorizing scores.
1. Tests in real terminal environments
The core design gives the agent a real, resource-limited terminal and asks it to finish a complete engineering task, such as configuring an environment, fixing a defect, or deploying a service. Each task has its own acceptance criteria and is scored automatically. The value is:
- End-to-end realism: the agent does not explain how to do the work; it actually finishes it.
- Resource constraints: memory, time, and permission limits similar to production test whether the model can plan under constraints.
Public results show leading models clustered around the 60% range on this kind of test, with gaps narrowing to about one percentage point. Completing more than half of real terminal tasks in a stable way has become a baseline for the newest models. The remaining gap—edge cases in environment understanding and reasoning about complex dependencies—is still where vendors separate themselves.
2. Long-horizon code benchmarks
A second family of benchmarks focuses on the long-horizon property: longer task chains and deeper dependencies between steps. Vertical comparisons show new-generation models gaining a stable few percentage points over the previous generation on the same kind of test. That margin matters because early mistakes are amplified as a long task proceeds. A few points often reflect real progress in error recovery and state management.
Advice for developers: do not select a model from a single leaderboard score. Build a small internal evaluation set around the traits of your own tasks—duration, toolchain, and how often failures must be recovered—and validate with real business samples.
5. Technical signals in the pricing structure
APIs for the new generation of agent models commonly use three price tiers: cache-hit input, cache-miss input, and output. A faster tier often costs about twice as much in exchange for lower latency. The structure itself points to several trends:
- The cache-hit discount is large. A cache hit is often priced at about one-tenth of a cache miss. In agent workloads, system prompts, task context, and prior execution records repeat across many calls, so the cache-hit rate directly sets the cost scale.
- Output is the most expensive tier. Agent tasks produce large amounts of tool-call instructions and reasoning text, so output tokens are the main cost. Making output more concise—structured instructions, less redundant reasoning—has real cost value.
- Speed is priced in tiers. Long-horizon jobs are not latency-sensitive; running in the background for hours is acceptable. Interactive coding needs immediate feedback. Latency-based tiers let developers choose by scenario, so one model capability can cover both calling modes.
A simple cost-optimization practice:
# Place the stable prefix at the front of the context to maximize cache hitsmessages = [{"role": "system", "content": STABLE_SYSTEM_PROMPT}, # cache hit{"role": "user", "content": stable_task_context}, # keep the prefix stable{"role": "user", "content": delta_instruction}, # put incremental instructions at the end]
The principle is to put content that rarely changes at the front of the context and the part that actually changes on each request at the end, raising the prefix-cache hit rate.
6. Conclusion
The logic of this upgrade cycle is clear: from stronger conversation to more reliable execution. Post-training compute is going into real execution environments, engineering effort is shifting toward managed infrastructure for long-running work, and evaluation is focusing on end-to-end task completion. Enterprises and developers need matching evaluation frameworks and cost models—validate capability in real task environments, control cost with caching and output optimization, and use mature infrastructure to lower the engineering bar for putting agents into production. Competition among long-horizon agents is no longer only about model parameters. It is a system-level contest of model, infrastructure, and evaluation.
