Predict the Product, Not the Observation: Product-Level World Models for Coding Agents

Coding agent world models should predict the product, not the observation; PreVision internalizes product-level prediction into reasoning to boost task success rates.
The article introduces the paper "Predict the Product, Not the Observation," pointing out that coding agents' observation signals (tool confirmations, local tests) have a systematic gap with product-level ground truth (whether official tests pass, rendered behavior), so world models should predict product state rather than the next observation. The authors propose PreVision, which writes verified product predictions into the agent's reasoning chain during training so the agent predicts outcomes before acting, with supervision signals from verifiable product outcomes requiring no human annotation. To evaluate the method, the authors build ProWM-Bench, which simultaneously examines agent capability and world-model capability on the same real repository tasks. Experiments show PreVision improves trial-level success rate by 10.4 percentage points on SWE-MM and 7.7 percentage points on SWE-rebench V2 + ScaleSWE compared to agent-only training, with product-level prediction capability also improving. The article concludes by discussing the method's limitations on tasks with insufficient test coverage.
Why Coding Agents Need a Redefined World Model
World models enable LLM agents to anticipate how the environment will respond to their actions, thereby supporting planning and learning. In robotics, games, and similar settings, this prediction is typically aimed at the "next-frame observation." However, coding agents face a fundamentally different environment: they change program behavior through code edits, yet the observable signals often fail to reflect the real change.
A typical example: whether you fix a bug or introduce a new error, the code-editing tool may return the same "changes applied" confirmation. Local tests passing does not mean the official tests will pass. In other words, there is a systematic gap between observation-level signals and product-level ground truth. If an agent only learns to predict observations, it cannot distinguish "the action executed successfully" from "the problem was actually solved."

The paper "Predict the Product, Not the Observation: Product-Level World Models for Coding Agents" argues that a coding agent's world model should predict the state of the "product"—i.e., whether the code passes the official tests, how the rendered program behaves—rather than predicting the observations returned by tools. This shift in perspective elevates the world model from an "environment simulator" to an "outcome predictor."
World model in reinforcement learning and agent research refers to an agent's internal representation of environment dynamics, enabling it to predict the consequences of actions without actually executing them, thereby supporting planning, exploration, and sample-efficient learning. Classic works such as Dreamer and MuZero use world models for game playing and robot control, with prediction targets typically being the next-frame observation or state transition. The uniqueness of coding agents lies in: the action space is code editing (adding/deleting/modifying files), the environment state is program semantics and test results, and there is a semantic gap between observable signals (text returned by tools, logs) and the true product state. Therefore, following the "predict next observation" paradigm would learn surface patterns of tool behavior rather than the substantive impact of code changes on program behavior.
PreVision: Internalizing Product-Level Prediction into the Reasoning Process
Based on this insight, the authors propose PreVision, a training method that enables agents to internalize a product-level world model during reasoning and use it to guide action selection.
The core approach of PreVision is: at key decision points during training, write verified product predictions into the agent's reasoning chain, teaching the agent to "predict the outcome first, then take action." This is not about having the model additionally call a separate world-model module, but rather weaving prediction capability directly into the agent's own reasoning process.
This design brings two benefits. First, prediction and decision-making are no longer separated; the agent can complete the reasoning of "if I do this, what will the product become" within a single inference pass. Second, the training signal comes directly from product-level outcomes (e.g., whether official tests pass), avoiding the noise introduced by observation signals.
One detail: PreVision does not rely on human-annotated prediction data, but instead uses verifiable product outcomes as supervision signals. This means the method can be applied at scale to real code repository tasks.
Reasoning chain (chain-of-thought) refers to the series of intermediate reasoning steps a model generates before producing a final action. PreVision's key operation is inserting "product prediction" segments at decision points during training, so that the model becomes accustomed in its reasoning distribution to first performing outcome simulation. This differs from tool-call-style world models (e.g., an external simulator module): the latter requires additional calls at inference time, incurring latency and error accumulation; the former internalizes prediction as part of language generation, with reasoning and decision-making sharing the same context. The supervision signal comes from verifiable product outcomes (whether official tests pass), which is programmatic verification and requires no human-annotated prediction labels, thus offering potential for scaling to real repository tasks.
ProWM-Bench: Simultaneously Evaluating Agents and World Models on Real Repository Tasks
To validate the method's effectiveness, the authors built ProWM-Bench, a benchmark that simultaneously evaluates agent capability and world-model capability on the same real repository tasks.
The key design of this benchmark is that it does not test "prediction accuracy" in isolation, but binds prediction capability to task completion. The agent must perform modifications in a real codebase, and the system simultaneously examines whether it can correctly anticipate product-level outcomes and whether it ultimately solves the problem. This dual-track evaluation is closer to the actual working scenario of coding agents—predict accurately, and ultimately do it right.
On ProWM-Bench, PreVision achieves significant improvements over agent-only training: on SWE-MM, trial-level task success rate improves by 10.4 percentage points; on SWE-rebench V2 + ScaleSWE, it improves by 7.7 percentage points. Meanwhile, product-level prediction capability also improves.
These numbers show that improved product-level prediction capability can directly translate into higher task completion rates, rather than remaining a surface-level optimization where "prediction metrics look good but tasks are not done right."
The SWE-bench family of benchmarks is the de facto standard for coding agent evaluation: given an issue from a real GitHub repository, the agent must generate a patch, and official tests (FAIL_TO_PASS and PASS_TO_PASS) determine whether it is resolved. SWE-MM, SWE-rebench V2, and ScaleSWE mentioned in the paper are extensions or resampled versions of this family, used to expand task scale and diversity. Trial-level task success rate refers to the proportion of multiple independent attempts in which at least one succeeds (pass@k style), which better reflects the agent's robustness under randomness than single-attempt success rate. ProWM-Bench's "dual-track evaluation" measures, on the same batch of tasks, both whether the patch passes official tests (agent capability) and whether predictions match true product outcomes (world-model capability), thereby avoiding the optimistic bias of decoupling the two.
Implications for Coding Agent Research
The value of this work lies not only in a training method, but in redefining the prediction target of coding agent world models.
Many existing agent studies assume "observation is feedback," but the feedback chain in coding tasks inherently has delay and distortion. Differences between local and official tests, and generic confirmation messages returned by tools, are manifestations of observation-level inability to capture product state. PreVision's approach suggests: the prediction target of a world model should align with the quality of the final deliverable, not intermediate signals.
Another noteworthy aspect is the integration of training and inference. Writing product predictions into the reasoning process means the agent actively performs outcome simulation before acting—a "think first, then act" pattern that is closer to the mental model of human programmers. In the future, similar ideas may be extended to more domains characterized by "verifiable but observation-lagged" properties, such as data pipeline construction and configuration management.
Of course, the method also depends on the verifiability of product-level outcomes. For tasks with insufficient official test coverage or outcomes that are difficult to automatically determine, the supervision signal for product-level prediction becomes sparse. This is a challenge for future research.
Summary
PreVision's core claim is simple and powerful: a coding agent's world model should predict the product, not the observation. By injecting verified product predictions into the reasoning process during training, the agent learns to anticipate outcomes before acting, and achieves quantifiable improvements in task success rate on ProWM-Bench. This work provides a direction for coding agent world-model research that is closer to actual delivery quality.
Related articles

Ladybird Browser Alpha First Look: An Independent Engine Takes On Google's Dominance
Ladybird browser Alpha first look: independent engine, no Chromium dependency, macOS and Linux packages. Minimalist UI, YouTube playback works, but no security guarantees yet.

Infinite Canvas + Multi-Agent Collaboration: A New Paradigm for Driving Complex Projects
A Bilibili creator shares his infinite-canvas multi-Agent workflow: Claude Opus plans, GPT/Codex executes, Gemini and DeepSeek cross-review, with web GPT as strategist.

A Deepfake in 20 Minutes: Can We Still Trust Our Own Eyes?
Tech YouTuber Network Chuck made a convincing deepfake in 20 minutes, showing why visual checks fail and how detection tools help verify suspicious videos before you share, click, or pay.