TRANSMISSION // 2612.04946v1
Why coding agents should predict what their code does
Source published
PreVision trains coding agents to forecast official test outcomes and rendered software behavior. In the paper’s benchmark experiments, it improved trial-level task success over agent-trajectory training alone.

A tool’s “file edited” message does not show whether a bug is fixed. A preprint explores whether coding agents can make better decisions by forecasting software outcomes—not just the next tool response.
A coding agent can make an edit and receive a simple confirmation: “file edited.” That response does not reveal whether the change fixed the problem. The paper also reports examples in which local tests were outdated or environment-dependent, and their results disagreed with the official tests used to judge code.
Qingyao Li and colleagues ask what a “world model”—a system that predicts how actions change an environment—should predict for a coding agent. Their proposal is to forecast the state of the software product: whether official tests pass and, for user-facing software, what the program displays.
Teaching forecasts at decision points
The researchers introduce PreVision, a training approach that adds verified forecasts to an agent’s reasoning at selected decision points. The forecasts describe product outcomes checked against official tests and, when available, a fixed rendering probe. The agent is trained to consider those forecasts alongside evidence when deciding what to do next.
To create training examples, the team selected successful agent trajectories on real repository issues. At chosen points—such as after edits, after new test or rendering feedback, and before finishing—a teacher model proposed forecasts based on information visible to the agent. The researchers kept a forecast only if it matched the verified outcome. They trained the agent on these forecast-augmented trajectories, along with a smaller set of direct prediction examples. At deployment, PreVision runs as a single agent without an extra forecasting model or verifier.
The team also built ProWM-Bench to evaluate coding success and prediction on the same repository tasks. It records intermediate code states and checks them in separate environments, keeping those hidden results from the agent during its run. For visual issues, the benchmark uses issue-specific render probes that undergo validation; tasks without an accepted probe are excluded. The SWE-rebench V2 + ScaleSWE evaluation subset uses repositories held out from training, while SWE-MM is a separate evaluation set.
Results on the benchmark
Compared with Agent-SFT, which trains on agent trajectories alone, PreVision raised the trial-level resolved rate by 10.4 percentage points on SWE-MM and 7.7 points on the render-eligible SWE-rebench V2 + ScaleSWE subset. These are results for individual attempts. The paper also reports task-level results, where a task counts as solved if at least one of two attempts succeeds. PreVision improved product-level prediction on several measures, but did not lead on every prediction metric.
The authors examined why tool observations might be a weak guide to code correctness. In their training data, local test results contradicted official outcomes at 56% of the 975 decision points immediately following a local test run. Across all 3,554 decision points examined, the latest observation reflected the official result at only 12% of points. These figures describe the analyzed trajectories, not coding work in general.
In comparisons among the study’s training setups, forecasting the next tool observation did not improve task success over Agent-SFT. Mixing prediction examples into training improved some prediction measures but did not produce the same task-success gains as PreVision. This suggests that, in these experiments, the prediction target and how forecasts enter training both mattered. It does not establish that every method of prediction training will behave the same way.
Limits and uncertainty
The researchers studied one base model and one teacher model. The approach also depends on executable repositories with official tests and suitable rendering probes, which may not be available for every software task. The probes are fixed, issue-specific checks of behavior—not general assessments of whether an interface looks good to users.
The paper reports evidence that forecasts appear in the agent’s reasoning and are associated with different actions. However, a counterfactual test that flipped forecasts found a modest effect on stopping, with confidence intervals that included zero for PreVision’s forecast-flip effect. The results therefore support the usefulness of the overall training approach in the tested settings, but do not by themselves establish that forecasts caused every improvement.
The manuscript identifies itself as a preprint; the supplied material does not establish its peer-review status. Its findings should be read in the context of the reported experiments and their limitations. The authors also note that forecasts and generated code can still be wrong, and recommend independent testing and human review before deploying changes in real systems.
- coding agents
- world models
- software engineering AI
- PreVision
- ProWM-Bench
- AI benchmarks
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
WorldPhy Tests Robot World Models’ Physics
Source published
Shared keywords: ai benchmarks, world models
Can a “world model” help AI untangle social situations?
Source published
Shared keywords: ai benchmarks, world models
A Safety Check for Video World Models at Walls
Source published
Shared keywords: ai benchmarks
Testing Coding Agents on LLM Infrastructure
Source published
Shared keywords: ai benchmarks, coding agents
Can AI Remember a Place After It Leaves?
Source published
Shared keywords: ai benchmarks, world models