Why changes are replayed on past tasks
A team changes a work station to make its runs better, with a sharper prompt or another model. Whether the change helped shows in the runs after it, but slowly and with noise. Each run works a different task, so a run that went badly after the change may have had a harder task. People act on a run hours or days after it ends, and a pull request merges later still. By the time enough runs have been recorded to say anything, the station may have been changed again.
A replay answers the question sooner, on fixed ground. It takes runs the station has already done and runs their tasks again under a changed config, called a candidate. The tasks are the same for every candidate, so the results can be set side by side, task by task, before the change reaches the team's real work.
The same start, a different config
For a comparison to mean anything, the only thing that differs between a replay and the run it repeats has to be the config. So a replay starts where the original run started, as closely as Spotlight can rebuild it:
- the same working copy, restored from the exact archive the original restored, with each repository checked out at the commit the original started from;
- the task as it was briefed to the original: its title, description, notes, attachments and decisions then, not as they read now;
- the team memories the original was briefed with, and only memories that were active when it started;
- the station's history and outcomes, as
spotlight historyreads them, as they were when the original started.
What changes is the station block: the candidate's prompt, harness, model, effort, harness profile, skills, check and judge, compiled into the line as it is now.
What a replay may not touch
A replay works a real task in a real repository, and its agent believes it is doing the work. Anything it did outside the sandbox would act on the task a second time: a push to the task's branch, a comment on its pull request, a question in someone's inbox, a memory proposed to the team. So a replay is a run of its own kind. It never works on the task, and it leaves nothing behind but its own result:
- Its git access is fetch-only. A push fails.
- It has only the tools that change nothing: those of its station and of its
task's marks that are marked
readOnlyand need no approval. It calls them as no person, so a tool that needs a person's connection fails. It has no MCP servers or catalog tools enabled, and so egress injects no secrets for it. See Tools in a replay. - Before it starts, it runs the
run.startinghooks that match it, but only those whose steps all call read-only tools that need no person. Such a hook changes nothing and can add to the run's briefing, so leaving it out would make the replay start from a different briefing than a real run. A hook with a step that sends a request, or that calls a tool which is not read-only, needs approval or acts as the person who started the task, does not run, and the replay says so. No hook on another event runs. - It cannot reply to a pull request's review comments, propose a memory or read a task's trace.
- Its change stack is generated and checked, and never sent to GitHub.
- It never asks a person. A replay that asks a person while it runs, such as
for permission, ends there and counts as asked. So does one that hands over
with a word that moves the task to no station. A replay that hands the task
over to
review, or with no word, at its end is scored by its check and judge, as a run that moves the task on is. - Its judge knows it is a replay. It grades the work the run produced, and never counts against it a push, pull request, review comment or tool call that the replay blocked.
- It is not counted among the station's outcomes or in the Insights figures of the team's runs. Insights shows replays apart, under Candidates on its Stations tab.
The sandbox's network is not narrowed further. Egress lets a replay reach the hosts the host's allow-list allows, as for any run; see Limit where sandboxes can connect.
Scored against the station as it is now
A replay is scored by the judge, and by what the candidate itself requires. If
the candidate's station generates change stacks (diffs: true) and has a
check, its change must pass that check. The judge compares the change with
the change people accepted for the task: the task's pull request as it was
last pushed, with the fixes people made after the agent, or else the change of
the run people accepted. It asks whether the replay's change does what the
accepted change did. If the station has a judge block, the judge also checks
each of its claims. With both a check and the judge, a run must pass both.
The judge scores replays only. A live run has a better verdict than any model can give: what people did with it, whether they accepted the work, sent it back or merged its pull request. A replay has no such verdict, because nobody sees it. The accepted change carries people's verdict into the replay. In the docs' view, a question grounded in what people accepted needs no upkeep, and claims that a team writes can only add to it. A task that people never accepted has nothing to compare with, so its runs are not in the replay set.
A replay's judge verdicts never count in the station's alerts or the Insights figures of the team's runs. They are only compared between replays.
Some runs cannot be scored. A run that changed nothing gives the check nothing
to run on; a check that could not run, or judging that could not finish, says
nothing either way. Those runs are unscored and left out of the success rate,
each with its reason. So are runs that could not be replayed or started, runs a
replay's stop or ceiling cut short, exhausted runs with no failure
code, and runs that failed for a reason outside the candidate: a working copy that
could not be made ready, or a harness that could not open a session, before the
agent began (unprepared), no runner
provisioned (unprovisioned), hooks unanswered (hooks-unanswered), a lost
runner (runner-lost), cancelled or superseded.
Only some runs count against the candidate as failures:
a run that failed with exited, with timed-out (it kept running past its
host's time limit), with refused (Spotlight would not start it as configured,
as for a missing harness profile or tools, MCP servers or secrets a replay is
not given) or with no code; a run that asked a person while it ran, or handed
over with a word that moves the task to no station; and a run that failed its
check or judge. In
the docs' view, this keeps a failure to measure from reading as a failure of
the candidate.
Every candidate is compared with the station's live config replayed on the same runs: most often the set's baseline, replayed at about the same time, and for a replay with the answer, the finished live replay that started it. The original runs are not the comparison. In the docs' view, they ran under conditions a replay cannot bring back, such as an earlier model release or a dependency that has since moved, and a baseline replayed now meets the same conditions the candidate meets. A task regresses when the candidate is clearly worse on it than the baseline, after the noise of both sides, or when the judge found clearly fewer claims met on the candidate, after the same noise. How many repeats each side has decides what "clearly" means; see Repeats of the same run.
Side by side with the baseline
A judge's verdict is absolute: it says how good one change is, read on its own. Where there is a replay to compare with, the judge can instead be shown both changes and prompted to say which is better, which makes its verdict steadier and easier to check. In the docs' view, two changes can both pass while one is plainly closer to what the task needed, and verdicts given to each on its own may not show it.
So once a replay has finished, on each task where both it and the replay it is compared with changed something, the judge is shown the two changes together, labelled A and B, beside the accepted one, and prompted to say which is better. It is not told which change is the candidate's, so it cannot favour it. It reads the pair twice, once each way round, and when the two passes disagree, the task counts as a tie. In the docs' view, a model can lean to whichever change it saw first, and a preference that flips with the order was never a preference.
The wins, losses and ties sit beside the success rate and never change it. The success rule, the gain and its significance stay as they are. In the docs' view, a comparison that counts only tasks both sides changed covers too few tasks to replace the rate, but where the rate reads Within noise, it can say which way the candidate leans.
A replay other than a baseline keeps one reference replay, chosen when it starts: a search's candidates the live config the search replayed when it started, a replay check's candidate the set's baseline, and a replay with the answer the live replay whose finishing started it. Its task-by-task rows and its gain use that one replay, and so do its wins and losses, where it has them; a replay with the answer is never set side by side. A baseline started later does not change what an earlier replay was compared with. In the docs' view, figures read against two different replays could not be read together. Pairs judged under different claims are left out; in the docs' view, comparing them would mix two questions.
The comparisons do not count against the replay's ceiling, its spend or its cost per run. They measure the change, not what running the candidate costs; that reason is the docs' own.
A replay check also compares what a run of the candidate uses with what a run of its baseline uses: the mean cost, which adds the harness's cost and what metered tool calls cost, the tool calls' cost on its own, the harness tokens and the wall time. A change can keep the success rate and still pay off, such as a hook that has a fast model read a log so the agent does not have to. These figures do not decide the check.
Every result comes with a range
An agent does not do the same thing twice. Replayed twice on the same task under the same config, a run can pass the first time and fail the second. So a replay's success rate is partly chance, and so is the difference between a candidate and its baseline. On a set of 20 tasks, one task going the other way moves the rate by 5 points.
So every success rate comes with a range: a 95% interval, drawn by resampling the replay's tasks 2,000 times and reading where the middle 95% of the resampled rates fall. A candidate's gain over the baseline is worked out task by task, as the candidate's success on each task less the baseline's on the same task, and its range is resampled the same way. In the docs' view, pairing the tasks this way keeps how hard each task is out of the gain, since the candidate and the baseline faced the same tasks. Here, and wherever results count tasks, a task is one run of the set: a set that contains two runs of the same task counts them as two.
A gain then reads one of three ways. It is better when its whole range lies
above no change and it reaches the smallest gain the line counts as real,
min_gain in the line's replay_check, 5 points unless set. It is worse when
its whole range lies below no change and the loss reaches the same size.
Anything else is within noise. With fewer than 5 tasks scored on both sides,
every gain is within noise. In the docs' view, a gain can be clearly real and
still too small to be worth a change, and min_gain is where a team says how
small that is.
A replay check reads its gain the same way, but the gain does not decide the check: a pull request still passes or fails on its count of regressions.
Repeats of the same run
A replay can replay each run up to 5 times. Each task's success is then the share of its repeats that succeeded, so one task can count as two thirds of a success. The rate is averaged over tasks, not over repeats, so a task replayed more often does not weigh more, and the range is drawn over tasks. More repeats make each task's score steadier, which narrows the range. They add no tasks: a set that is too small, or whose tasks are too alike, stays so.
With repeats, a task regresses only once every repeat on both sides has ended. Counted by success, it regresses when the candidate is clearly worse on it than the baseline: the chance that the candidate succeeds less often, from both sides' repeats, is above 90%. A task that the baseline did not pass every time is flaky, and one failed repeat of the candidate does not make it regress. With one repeat on each side, no task regresses by success, because one repeat each cannot tell a regression from noise. A search's seed and a replay check's baseline therefore replay each run at least three times. See Regressions. Counted by claims met, the same rule takes the share of claims the judge found met as a share of a success, so one lower share against one does not make a task regress either.
The baseline a replay is compared with must have at least as many repeats of each run. When it has fewer, a new baseline starts beside the replay with the same number of repeats. A replay check's baseline has at least three.
How noisy a set is
Replaying the live config with repeats shows how far a set's success moves when nothing changed: the spread between the repeats' success rates, and which tasks went both ways. That spread is the set's noise. It is measured on the station's config as it is now, from the newest finished replay of the live config with at least 2 repeats. Once a change gives the station a new config fingerprint, the noise is unmeasured again, since the new config may be steadier or less so.
Spotlight reads the noise before it starts a search. The repeats a set needs
are the spread divided by min_gain, squared and rounded up. That rule takes
the spread to shrink with the square root of the number of repeats, as an
average of independent tries does. When the search's repeats are fewer than
that, Spotlight skips the search and records that the set is noisy: a gain the
search found could be luck. More than 5 needed means no search of that set, at
any number of repeats, can tell such a gain from noise. With no noise measured
yet, a search can start, and its small gains may be luck. See
When Spotlight skips a search.
Whether a set can tell configs apart
Noise is one way a set can fail to tell a better config from a worse one. There are others, and on any of them a search would chase something other than a better config. Spotlight reads each of them for the live config as it is now, as the set's health, and skips a search on a set that fails one of them.
- Room to improve. When the live config already succeeds on more than 95% of
the set, a candidate has almost no tasks left to win. A search of such a set aims, unless the station's
searchblock sets another aim, for the same success for less: it ranks the candidates whose gain over the live config is not Worse by what a run costs. A set can also leave little room well below 95%, when no config could do better on its tasks; see Why a set is replayed with the answer. - A judge that is not consistent. A judge is a model, and prompted twice about the same change it can answer differently. When it passes or fails the same change alike less than 80% of the time, part of every score is chance, and a search would chase luck.
- Flaky checks. A test that passes on one run and fails on the next, on the same change, can flip a candidate's result by chance. Running the check a second time on the same change shows which tasks do it.
What the set contains matters as well. A set whose original runs were nearly all accepted, or nearly all sent back, says little about how runs that turned out other ways would go. In the docs' view, a candidate that wins on such a set may lose on the runs it lacks. So when Spotlight refreshes the set, it adds runs of the outcomes the set is short of first, when the station has such runs. A task that a search found to be the cause of its own failure, such as a task that is unclear or that no config can do, leaves the set at the next refresh. See The replay set Spotlight keeps.
Nobody has to request these checks. The first search on a new set, or on a set whose runs or live config changed since it was last measured, calibrates the set as it starts: its replay of the live config replays each run 3 times, which measures the noise, and once it finishes, each change is judged and checked a second time. It then replays the live config with the answer, as below. That first search costs more for it. In the docs' view, a set is only worth reading once it has been calibrated, and a search has to replay the live config anyway. The health this measures decides from the next search on whether a search starts. A set of fewer than 5 runs is never calibrated, since it is too small to measure noise on. A second judging or check never changes a run's result. In the docs' view, it measures the judge and the check, not the run.
Why a set is replayed with the answer
A set is for telling a better harness from a worse one: a better prompt, skills, tools or setup. It should reward a better config around the model, not a better model. So the question for a set is how much a better config could gain on its tasks.
Spotlight answers it with an upper bound. After a replay of the live config over the whole set finishes, it replays the live config again with each run's answer added to its briefing: for a run people accepted, the change they accepted; for a run a person sent back, what they wrote when they sent it back. Runs that failed, asked a person or turned out another way have no answer, so they are left out, and both sides are compared on the same runs. The gain the answer brings is the most a better config could gain on those runs. It is never the gain to expect: no config hands the agent the answer.
When even the answer does not do clearly better, the live config already does about as well on these tasks as any config could show, and a search on the set would find little. What helps is tasks the live config fails. Spotlight skips a search of such a set until harder tasks come in.
The replay with the answer is a replay like any other. It has its own ceiling, the same as the live replay's, and its own runs. The set's health reads its gain against the live replay that started it, task by task and with a range. Its changes are never judged blind beside that replay's. In the docs' view, an upper bound that skipped the usual scoring would not be comparable with the gains it bounds.
Spotlight starts one for each set and each config of the station, and only while the station still runs the config that was replayed. If it is stopped or runs over its ceiling, the next replay of the live config over the whole set starts another.
What it costs
A replay spends what its runs cost, and what generating change stacks for their
changes and judging them cost. Each repeat of a run is a run of its own, so a
replay with 3 repeats starts three times the runs. Each replay has a ceiling,
taken from the search's ceiling or the line's replay_check, and once a
replay's spend reaches it, nothing more of it starts. Runs already running
finish, so a replay can end a little over its ceiling. Costs in another
currency than the ceiling's, and costs never reported, do not count against
it. See Spend and ceiling.
Replays take runners the team's real work needs. At most 2 of a team's replay runs run at once, apart from a search's, which keep to a limit the search sets, and replay runs wait behind every waiting task run and chat run. In the docs' view, a replay answers a question about the future, and should never delay work that people are waiting on now.
What a replay can start from
A run can be replayed only if Spotlight retained where it started. Each task run records the working copy archive it restored and the commit each repository started from. Runs that ended before Spotlight began recording this cannot be replayed.
Spotlight keeps that archive for 30 days after the run started, and for as long as the run is in its station's replay set. After that the archive goes, and the run can no longer be replayed. A run also cannot be replayed if its task was deleted, if a file its task was briefed with is gone, or if a repository it worked in has left the line. Why a run cannot be replayed lists each reason.
Replays beside live runs
The Candidates section of the Stations tab on the team's Insights page sets every candidate replayed in a period beside the live config replayed on the same replay set, station by station, and its Config changes section can draw a station's replayed candidates on the same chart as the agent configs its live runs used.
The two kinds of point measure different things. A live agent config's height is what happened to real runs: whether a person accepted the work, sent it back, or merged its pull request. A replayed candidate's height is replay success: the share of replayed past runs that passed the candidate's own check and judge. The agent configs chart under Config changes draws replayed points apart, as a series of their own, and says what their height is, so neither is read as the other.
A candidate is read against the live config replayed on the same runs, not against the live runs, because only that replay worked the same tasks at about the same time. A search's candidates are set beside the live config on that search's own runs. A search's held-out score is never drawn as a point. In the docs' view, it comes from other tasks than the search score, so one point cannot show both, and it is the score to trust, so it is given as a figure of its own. The candidates of a pull request's replay check are left out: their result is in the check's output.
A replay changes nothing
A replay never changes the station, however well its candidate does. A search, which replays many candidates an agent proposes, goes no further: when one of its candidates meets Spotlight's rules, Spotlight opens a pull request, which the team reviews and applies. See How Spotlight improves a station. A line can also have its CI replay each pull request's station changes before they merge. Why configuration lives in Terraform gives the reasons. Once applied, the change's own runs are recorded under its new config, and its outcome verdict says whether it did better on the team's real work.