Agent Builder Foundations
Evidence-tiered mechanisms for agent builders
Agent foundations
Can you evaluate an agent's model router by replaying logged trajectories?
Concept·Evals and reliability·3 sources·updated 2026-10-16
If you evaluate a per-step model router by swapping a cheaper model into one step of a logged trajectory and checking the rest of the log, you are scoring a run that stops existing at the swap. The Replay Gap study found 61-94% of later actions change after a live swap, and replay scoring mispredicted every swap-dependent outcome. A router shipped on replay numbers is effectively untested.
No. Replay substitution assumes the rest of the trajectory would unfold the same way whichever model produced the swapped step. Forking live agent runs at the swap point and continuing them for real rejects that assumption: the agent takes a different path, only 3% of logged states remain reachable, and replay evaluators get the outcome wrong exactly when it matters.
A model swap is a fork, not an edit.
- Replay treats the swap as a local patch. Substitute one step, keep every later logged step, diff the ending. Cheap: no execution, no environment.
- Reality branches. From the swap on, the new model reads tool outputs and errors produced by its own actions, so every later step differs. The two runs share a prefix and nothing after it.
The fix is a branching rollout: fork the real trajectory at the swap, rebuild the sandbox, let the new model run, and compare against a same-model control fork. The control isolates how much divergence is the swap versus ordinary sampling noise.
An agent trajectory is a chain of model output, environment response, and next model input. Each input depends on what the environment returned for the previous action. Swap the model at step N and step N+1's input is built from a different tool call, edit, or command. The next output diverges, which changes the next environment response, and the difference compounds every step. A replay evaluator that keeps consuming the original log is grading the swapped step against a continuation the swap invalidated.
Three features of the measured divergence matter for builders:
- It starts immediately. Most early swaps diverge on the very first post-fork action, far above the same-model control rate.
- It shrinks late in a run only because fewer steps remain, not because late swaps are safe to replay.
- Outcome flips are rare but real. Every solved-to-unsolved or unsolved-to-solved flip came from a swap arm, never a control, so final-state accuracy on replayed logs misses exactly the changes a deployment would produce.
- Discount replay-measured router accuracy. Treat it as unvalidated until confirmed with live rollouts.
- Evaluate with branching rollouts. Fork at the decision point, run the swapped-in model against a real or faithfully rebuilt environment, and grade the outcome, not a diff against the log.
- Add a same-model control arm. Without it, sampling noise and swap effects are indistinguishable.
- Sample early swap points heavily if your router switches models early, where first-action divergence is highest.
- Decide what history crosses the swap. A recipient imitates the habits in raw history it inherits; test summarized handoffs against raw ones, especially when a weaker model's history goes to a stronger one.
- Keep cost and correctness as separate claims. Fewer frontier calls is measured correctly from logs; unchanged success rate needs live evidence. See model routing for the cost side.
- Reporting replay-substitution accuracy as if it were a live production measurement.
- Assuming a swap affects only its own step.
- Favoring late swap points in evals because divergence looks smaller there.
- Running swap experiments without a same-model control, misattributing sampling noise to the swap or the reverse.
- Treating a router's cost savings as proof it is safe to ship.
See model routing for the routing policy itself and agent eval design for auditing an eval's correctness before trusting its score.
newest first
- TheoryNew Model, Old Habits: Behavior Transfer under Model Swapping in Multi-Session LLM Agentstheory/paper-backed
Preprint. Studies multi-session agents that switch LLMs mid-history. The receiving model adopts reasoning and action patterns of the model that wrote the history; transfer is strongest with raw history and substantially reduced by summarization. Proposes DASH (direction- and authorship-aware summarization), which beats raw and naive-summary transfer in repeated swaps. The abstract gives no numbers.
- BenchmarkThe Replay Gap: Static Evaluation of Model Switching in LLM Agents Scores the Wrong Worldbenchmark/result-backed
COLM 2026. Forks live SWE-bench trajectories at a model swap, rebuilds the sandbox, and compares against same-model control forks (~900 rollouts). Swaps rewrite 61-94% of post-fork actions; 74-77% of early swaps diverge on the first action versus 6-35% of controls; 3% of logged states stay valid. All five outcome flips occur in swap arms, none in 359 controls. A log-stitching replay evaluator mispredicts every swap-dependent outcome (0.00-0.11 patch similarity).
- EditorialLLM Digest synthesiseditorial inference
A methodology result about evaluating model routers, not a routing-policy result. It says nothing about which routing policy to use, only that the common way teams check a policy before shipping measures something other than what production will do.