Replays

A replay runs a work station's past task runs again under a candidate config, and scores each one. Spotlight keeps one replay set for each work station and refreshes it from the station's runs. Spotlight starts every replay itself: for a search, for a replay check of a planned change, and for the set's replay with the answer. See How Spotlight improves a station.

The app has no page for a replay set, a replay or a replay run. The results show task by task in the config pull request that a search opens and in the output of spotlight replay check. The replayed candidates show under Candidates on the Insights Stations tab.

What a set is made of

A set holds past task runs of its station, one run of each task. How each original run turned out decides which runs a refresh adds.

Outcomes

How an original run turned out comes from people's verdict on it, from how it ended, and from whether a person answered it. The first row that applies decides.

OutcomeThe run
AcceptedPeople's verdict passes the run: its deciding action is Accepted and the run completed or stopped, or its deciding action is none of Accepted, Sent back and Held as wrong in a hold that ended with the reason The line got it wrong, its task's pull requests all merged and the run is the station's last completed run on the task.
Sent backPeople's verdict fails the run: its deciding action is Sent back, or Held as wrong in a hold that ended with the reason The line got it wrong.
FailedThe run ended failed, even when a person accepted it. A superseded run, or one that ended another way, goes on to the next rows.
Asked a personA person answered it, also when they decided the run later, it ended asking a person, or a person approved or dismissed a tool call it asked approval for.
OtherNone of the above, such as a run no person has acted on since.

When people did two things that decide the run at the same moment, the first of holding as wrong, sending back, accepting, parking and starting counts.

How Spotlight keeps the set

Spotlight creates a work station's replay set, empty, when a run of the station first ends, and keeps that one set for the station's life. Nobody creates, renames or deletes a set, or adds or removes its runs.

A refresh reads the station's 100 newest ended task runs and changes the set:

ChangeWhich runs
Takes outRuns in the set that ended more than 90 days ago, and runs of a task that a search's reflection blamed on the task itself, unless a later reflection gave the task another cause.
Takes outRuns of a task with no accepted change.
AddsUp to 30 runs in the set in all: the newest run of each task that has no run in the set, among the runs that can be replayed, ended within 90 days, and whose task has an accepted change at the station. A task that a reflection blamed on the task itself is not added.

Runs are added one at a time: the outcome among "Accepted", "Sent back", "Asked a person" and "Failed" that the set, with the runs added so far, has fewest of, that some run left has, and that occurs fewer times than the most common outcome, "Other" included. Ties go to "Accepted", then "Sent back", "Asked a person" and "Failed". The newest run left of that outcome is added. With no such outcome, the newest run left is added. See Outcomes.

A refresh runsWhen
On a schedule7 days after the last refresh for a set of 30 runs, and 1 day after it for a set of fewer. A set never refreshed is refreshed at once.
Before a searchEach time Spotlight starts a search of the set.

A refresh does not run while the set is in use: while a replay of it is queued or running, while a search of it is in progress, or while a replay check waits for its baseline. A replay check does not refresh the set. A set whose station has left its line is not refreshed.

Results

Each task of a replay has a result on each side, the live config and the candidate, with a one-line reason. The config pull request and spotlight replay check show them as <result>: <reason>:

ResultShownMeaning
succeededSucceededEvery repeat of the task was scored and succeeded.
failedFailedEvery repeat was scored and failed.
mixedSucceeded <n>%Some scored repeats succeeded and some failed; <n> is the share that succeeded.
unscoredNot scoredNo repeat could be scored.
pendingRunningA repeat has not ended, or its checks or judging have not finished.
absentNot replayedThe task was not replayed on that side.

A repeat fails when the run failed with exited, refused, timed-out or no failure code, asked a person while it ran, handed over with a word that moves the task to no station, or failed a check or the judge. A run that hands the task over to review, or with no word, at its end is scored by its check and judge. A repeat is unscored when nothing could score it: it could not be replayed or started, its replay stopped or reached its ceiling first, its checks or judging could not give an answer, or it failed before the agent began or for another reason outside the candidate. Unscored and pending repeats never count against the candidate.

A run is scored by the judge, and by the candidate's own station block:

Scored byWhenPasses
Its checksThe block sets diffs: true and a check.The check passes on every layer of the run's change stack.
The judgeAlways. See Judging.The replay does what the accepted change did, and, when the block has a judge, meets at least passThreshold of its claims.

With checks, a run must pass both.

Judging

The judge compares each replay run with the change people accepted for its task. The accepted change belongs to the task's latest run at the station whose outcome is Accepted. It is the first of these that has a change:

Accepted changeWhat it holds
The pull requestFor each repository, the pull request diff as last pushed after that run, with the fixes people pushed after the agent. A repository that nobody pushed to keeps the change of that run.
The accepted runThe change of that run, as the agent made it.

Spotlight keeps the accepted change as it was when the run was added to the replay set. Later pushes do not change it, so every baseline and candidate replayed from the set is compared with the same change.

A task with neither has no accepted change, and its runs are not added to the set. A replay run is unscored with Judge could not judge it: the task has no accepted change to compare with. when its run is no longer in the set, or when the kept pull request diff was deleted.

The judge asks one question of every replay run: Does the candidate’s change do what the accepted change did? When the candidate's station block has a judge, the judge then checks each of its claims on its own. The run passes when the answer to the question is yes and, with claims, the share of the question and the claims met is at least passThreshold. With no claims, the question alone decides.

The judge is told the run is a replay. It grades the work the run produced, its changes and the plan, findings or note in its steps, as if every effect the replay blocked had succeeded: a push, a pull request, a review comment or message, a tool or MCP server call. It never counts a blocked effect, its failure or its absence against the run. Live task runs are never judged.

The reason is the first reason of a repeat that shows the result: a repeat that succeeded for succeeded, one that failed for failed and mixed, and one that went unscored for unscored. It reads <reason>., or <reason>: <detail>. where there is a detail, cut at 200 characters:

CodeReasonDetail
unreplayableSpotlight could not replay or start the runWhy
not-runThe run did not startWhy
run-failedThe run failedIts failure
run-stoppedThe replay stopped before the run finished
asked-a-personThe run asked a person, and a replay cannot answer
check-failedChecks failedThe layer that failed
check-skippedChecks could not runThe skip
change-not-generatedSpotlight could not make the changeThe skip
no-changeThe run changed no files for the checks
no-change-stackThe change did not get to Spotlight
change-unknownSpotlight could not read what the run changed
judgedJudge passed itThe judge's reason
judge-failedJudge failed itThe judge's reason
unjudgedJudge could not judge itWhy

Without a reason to show, the side reads Checks passed., The run failed., The repeats did not agree., Nothing scored the run., The replay has not finished. or Not replayed., by result.

When a replay stops, or reaches its ceiling, before a run that finished could be judged, that run is unscored with Judge could not judge it: the replay stopped before judging. In a replay that calibrates the set, changes are judged and checked a second time; the second answer never changes a result.

Run failures

FailureDetailResult
exitedthe agent stopped with an errorFailed
refusedthe config is not allowed in a replayFailed
noneFailed
unpreparedthe run failed before the agent startedUnscored
unprovisionedno runner was availableUnscored
hooks-unansweredhooks did not answerUnscored
runner-lostSpotlight lost the runnerUnscored
timed-outthe run went over the time limit of the hostFailed
cancelledthe run was cancelled before a runner claimed itUnscored
supersededa newer run replaced itUnscored

A config is refused when it has no harness profile, or uses tools, MCP servers or secrets that replays don't get. An exhausted run with no failure code is unscored. A failure code Spotlight does not know shows as the detail as it is. When an attempt is queued again, as after timed-out, its cost is not part of the run's cost: only the run's last attempt, and attempts suspended on the way, add to the replay's spend.

Check skips

CodeDetail
no-basethe starting commit is missing
no-checkoutthe checkout is missing
checkout-failedthe checkout failed
setup-failedthe repository setup failed
working-copy-failedthe runner could not open a working copy
out-of-timethe checks ran out of time
no-imagethe check image is missing
provision-failedno runner was available for the check
queue-timeoutno runner claimed the check in time
skippedthe checks were skipped
not-generatedthe change was not made
no-check-askedthe candidate has no check command. When the candidate has a check but no change stack ended passed, failed, skipped or not generated.

A replay's checks run as a station's checks do. See Checks.

Judging failures

CodeDetail
unavailableno judge model was available
no-referencethe task has no accepted change to compare with
no-evidencethere was nothing to judge
request-failedthe judge request failed
insufficient-creditsthe judge model account has no credits
unreadablethe answer of the judge could not be read
ungroundedthe judge cited nothing that the run did
erroredjudging failed
interruptedjudging was interrupted
stopped-before-judgingthe replay stopped before judging

Guidance

The first time the judge judges a replay run, it also gives the guidance field: one sentence of at most 280 characters that says what the run should do differently to do the task well, in terms of the task. Spotlight keeps the guidance field only when the judge failed the run. Only a search's agent reads it, in the replay run's result.json from spotlight history. That file never includes the judge's reasons.

Spotlight drops the guidance field when it:

  • is more than 280 characters, or contains a line break;
  • names a claim by its number or place, as in claim 2, #3 or the first claim;
  • repeats 5 or more words in a row from a claim, ignoring case and punctuation;
  • contains a whole sentence of 3 or more words from a claim, ignoring case and punctuation. The text between two line breaks counts as a sentence too.

These judgings give no guidance field: the second judging of a change when a replay calibrates the set, and side-by-side judging.

Success

A replay's success is worked out task by task, a task being one run of the set. A task's success is the share of its scored repeats that succeeded: 1 or 0 with one repeat, and 2/3 when 2 of 3 repeats succeeded. The replay's success is the average over the tasks with a scored repeat.

Beside it is its range: the 95% interval of the average, from 2,000 resamples of the scored tasks. Reading the same results again gives the same range.

Gains

A replay compared with another, its reference replay, has a gain over it: on each task both scored, its success less the reference replay's, averaged, in points, with the 95% interval of that average from the same resampling of those tasks.

SignificanceWhen
betterThe whole interval is above 0, and the gain is at least min_gain.
worseThe whole interval is below 0, and the loss is at least min_gain.
within-noiseAnything else, and always when fewer than 5 tasks were scored on both sides.

min_gain is the line's replay_check.min_gain, or 0.05 when the line has no replay_check. A replay reads it from the line as it is now; a replay check keeps the one it started under.

Side by side

A replay that keeps a reference replay to set its changes beside is set beside it, task by task, once the replay has finished. Baselines and replays with the answer are never set side by side, nor is a replay that was stopped or reached its ceiling. Each repeat of a task is set beside the reference replay's repeat with the same number, or else its first repeat, when all of these are true:

  • Both runs completed with a change of at least one line, and have their result.
  • People accepted the original run's change: its outcome is Accepted.
  • Both replays are judged under the same claims, or both with none.

The judge is given the claims of the replay's own candidate, if any, the task's title and description, the two changes as hunks labelled A and B, and the accepted change, which is neither. The changes are cut at 60,000 characters, and each hunk at 200 lines. It is not told which change is the replay's. It answers A, B or a tie, with 1 to 5 reasons, each citing 1 to 10 hunks of A or B and never of the accepted change. It judges the pair in two passes: once in an order drawn from the two runs, and once the other way round. When the two passes name the same change, or both a tie, that is the outcome; otherwise the outcome is a tie. Reasons that cite no hunk, or cite the accepted change, are dropped, and a pass is ungrounded when half its reasons or fewer remain. The replay's change winning is a win, the reference replay's a loss. At most 4 pairs are judged at once, and a pair whose judging fails is tried once more at most; one that failed no-evidence, interrupted or unavailable is not tried again.

A task with repeats is a win when more of its compared repeats won than lost, a loss when more lost, and a tie otherwise. The replay's wins, losses and ties count tasks with at least one compared repeat. They never change a run's result, the replay's success, its gain or its regressions. The config pull request gives them for the searched and the held-out tasks.

Health

A set's health says whether the set can tell a better config from a worse one. Spotlight reads it for the station's live config as it is now: only replays of the live config at the station's current config fingerprint count, other than a search's, unless that search's replay of the live config calibrated the set. Before Spotlight starts a search, it reads the health, and skips the search when a check found a problem. A check not yet measured stops no search.

CheckRead fromProblemSkip reason
NoiseThe newest finished replay of the live config that replayed each run 2 or more times.The spread is more than min_gain allows at the search's repeats.noisy
Room to improveThe newest finished replay with the answer of the live config, against the live replay that started it.The answer does not do clearly better.no-headroom
Judge agreeing with itselfThe newest finished replay of the live config over every run of the set that calibrated the set.The judge passed or failed the same change alike less than 80% of the time.judge-unstable
Flaky checksThe same replay.The check passed once and failed once on at least one change.flaky-checks

The live config's success over the whole set also decides a search's aim: above 95%, a search aims for the same success for less, unless the station's objective says otherwise.

Noise

The spread is the highest repeat's success rate less the lowest's, a repeat's rate being the share of its scored runs that succeeded. The repeats a search needs are the spread divided by min_gain, squared and rounded up. A search with fewer repeats than that is skipped as noisy. The config pull request gives the spread under "About this search", or says Spotlight has not measured the noise yet.

Room to improve

Spotlight measures room to improve with the replay with the answer. When its gain over the live replay that started it reads better, the set has room. When it reads within-noise or worse, the set has none, and a search is skipped as no-headroom. With fewer than 5 tasks scored on both sides, or before the replay with the answer has finished, room to improve is not measured.

Replay with the answer

After a replay of the live config over every run of the set finishes, other than a search's that does not calibrate the set, Spotlight starts a replay of the same live config with each run's answer, when:

  • the station still runs that config, at the same config fingerprint;
  • the station has not left its line;
  • at least one of the set's original runs was "Accepted" or "Sent back" (see Outcomes);
  • the set has no replay with the answer of that config that is queued, running or finished.

Nobody starts it. Its candidate is named With the answer, <date>. It replays only the set's runs whose original was "Accepted" or "Sent back", among the runs that live replay replayed and that are still in the set, with the repeats and a ceiling of its own equal to those of the live replay whose finishing started it. Its reference replay is that live replay.

Each replay run's briefing ends with a section headed ## The answer:

OriginalThe answer
AcceptedPeople accepted this change for the task. Make the same change., then the original run's change as a diff.
Sent backA person sent an earlier attempt at this task back and said:, then what people wrote on the task after the run, up to the task's next run, each quoted, then Do the task so that it meets what they requested.

Which kind of answer each run gets is fixed when the replay starts; a run whose original change has no hunks, or whose sending back came with no words, is left out. The hunks and people's words are read again when each run is queued, and the answer is cut at 60,000 characters. If a run's answer is gone by then, the run is not replayed (answer-gone). If the station's config changes while it is queued or running, Spotlight stops it.

Calibration

A calibration is a replay of the live config over the whole set that also measures the set's noise, whether the judge gives the same verdict twice, and flaky checks. The first search on a set calibrates it in its replay of the live config, when both are true:

  • the set contains 5 runs or more;
  • no replay of the live config at its current config fingerprint has calibrated the set as it is now, every run of it, or is calibrating it, while queued, running or finished.

So the first search on a new set, on a set a refresh changed, and after a change to the station's config, calibrates the set. The baseline of a replay check never calibrates the set.

The calibration replays each run 3 times, or the search's repeats when more. Its ceiling comes out of the search's ceiling, which also keeps room for the replay with the answer that follows it. Once it finishes, every change whose check passed or failed is checked a second time, and every change the judge gave a verdict on is judged a second time. A second judging or check never changes a run's result. Its finishing then starts the replay with the answer.

A search that calibrates the set starts before the set's health is measured, so the health checks apply from the next search.

Reference replays

A replay's reference replay is the replay of the set it is compared with. Its task-by-task results and its gain are measured against it.

ReplayReference replay
A search's replay of a candidate, on the searched or the held-out tasksThe search's replay of the live config it started from.
A replay check of a planned changeThe seed of the search whose replays it reuses. Else the baseline that starts beside it, or the set's current baseline that covers its runs with at least three repeats, and at least as many as the check's.
A replay with the answerThe replay of the live config whose finishing started it.

The first two also set their changes side by side with it. A replay whose reference replay is gone is compared with nothing. A baseline has no reference replay. A baseline that was stopped or reached its ceiling is not compared with, and the next replay check of the set starts a new one.

Regressions

A task regressed when this replay is clearly worse on it than the reference replay, or when the judge found clearly fewer claims met on this replay. Either is enough: a task whose repeats all succeeded still regresses when the judge found clearly fewer claims met on it. The reference question counts as a claim in this share.

"Clearly worse" takes the noise of each side into account. Spotlight counts the scored repeats that succeeded and failed on each side. From these counts, it calculates the chance that this replay succeeds less often on the task than the reference replay. The task regressed when that chance is above 90%. So the number of repeats is important:

This replayReference replayRegressed
Failed its 1 repeatSucceeded on 3 of 3Yes
Failed its 1 repeatSucceeded on 2 of 3No: the task is flaky on the live config too
Failed its 1 repeatSucceeded on 1 of 1No: one repeat each cannot tell a regression from noise
Succeeded on 1 of 3Succeeded on 3 of 3Yes
Failed 2 of 2Succeeded on 2 of 2Yes

"Clearly fewer claims met" uses the same rule, with the share of claims the judge found met as a share of a success. From these shares on each side, Spotlight calculates the chance that this replay meets a lower share of claims on the task than the reference replay. The task regressed when that chance is above 90%. So one lower share against one is noise, but a quarter of the claims met on each of 3 repeats against every claim met on each of 3 is a regression.

A task can regress only once every repeat of it, on both sides, has ended and has its result. A repeat that has neither a scored result nor a judge's verdict cannot make a task regress.

Shares of claims met are compared only when both runs were judged under the same claims.

Why a run cannot be replayed

A refresh adds only runs that can be replayed. A run that cannot be replayed when its replay comes to start it is unscored, with the reason Spotlight could not replay or start the run: <why>., or The run did not start: <why>. when it never started:

CodeWhy
unknown-runthe run does not exist
not-a-task-runthe run has no task
task-gonethe task was deleted
still-runningthe run has not ended
no-starting-pointthe run recorded no starting point
no-briefingthe task briefing was not kept
archive-gonethe starting working copy is gone
attachments-gonethe briefing files are gone
answer-gonethe answer is gone
repository-gonethe repository is not on the line
not-at-the-stationthe run was not at this station
candidate-unfitthe candidate cannot run it
cannot-startthe run could not start
uncheckedSpotlight could not check it
cancelledthe run did not start
dispatch-failedthe run did not start after several tries

candidate-unfit means the candidate was removed, or its block no longer fits the line as it is now. cannot-start means the candidate's station runs no harness a runner can start. dispatch-failed follows 10 failed attempts to queue the run.

A working copy archive is kept for at least 30 days after the latest run that started from it, and while a run that started from it is in a replay set. Once the run's task is deleted, the replay set no longer keeps it. See Working copy archives.

Spend and ceiling

A replay's spend is the cost of its runs, every repeat included, and of generating their change stacks, counted in the ceiling's currency. A generation attempt that failed counts what it was billed. Judging costs nothing against the ceiling: the judge's model calls are not counted. A run's spend is what its harness cost and what its metered tool calls cost, each in its currency. A known cost always counts, also when another part of the run has no price. Each call whose cost was never reported counts at a fixed amount against the ceiling. A run or a change stack generation call with no cost reported counts the same way. A replay run ends when its usage arrives. Every run that ends records its usage once. If Spotlight cannot read what a run used, the run's usage is unknown. The run then counts as one run with no cost reported. It is not paired for judging. On a station scored by checks, a run with no change stack gets the reason change-unknown. A cost in another currency is summed apart. Against the ceiling, it counts at the same fixed amount, once for each run or generation call and currency. Each replay has its own ceiling: a search divides its ceiling among its replays (see Spend and ceiling), and a replay check takes the line's replay_check.ceiling.

Once a replay's spend reaches its ceiling, it ends as ceiling-reached: nothing more of it starts, its runs not yet started are cancelled, and its runs already running finish. What they spend still counts, so a replay can end above its ceiling.

Replay runs

Replay runs and a search's agent runs do not show in the app: a Run page at their id reads This team has no such run. A replay run differs from a task run:

Replay run
TaskHas no task. The task's state, notes, board and inbox do not change.
Working copyThe exact archive the original run restored, or none if it restored none. A replay that cannot restore it fails.
CheckoutsEach repository at the commit the original run started from.
BriefingThe task as briefed to the original run, with its notes, attachments and decisions then. The memories it was briefed with are looked up again when the replay run is queued: a memory deleted since is left out, and each one reads as it is now. spotlight history and spotlight recall read as of the original run's start. A replay with the answer adds the answer.
Agent commandsspotlight trace, spotlight remember and replies to a pull request's review comments are not allowed.
GitFetch only. A push fails with this run may only fetch.
Tools, MCP servers, secretsNone.
HooksOnly run.starting hooks that match the run. A replay of a replay check candidate runs the hooks as the plan would apply them. A hook with a step that sends a request, or that calls a tool which is not read-only, needs a person's approval, acts as the person who started a task, or which no integration of the team offers, does not run, and the replay records why, as in Step open calls linear.create-issue, which is not read-only. See Hooks a replay skips for each reason. A broken hook does not run either, even one whose failure is block, and the replay records The hook is broken. Reason: <reason>. No hook on another event runs.
Asking a personEnds the run, counted as asked. Handing the task to a person, or to nowhere, does the same.
Change stackGenerated when the candidate sets diffs: true, checked, and never sent to GitHub.
ArchiveNone is archived for a later run.
OutcomesNot recorded among the station's outcomes or in the Insights figures of the team's runs.
PriorityBelow every task run and chat run. At most 2 of a team's replay runs, other than a search's, are queued or running at once. A search's replay runs keep to its own limit; see Spend and ceiling.

On this page