Troubleshoot a run

Some of the fixes below need the host's log, others the line's Terraform, so have access to both.

The task shows In progress but nothing happens

Open the task. Under Activity, the latest run reads Queued: it is waiting for a runner to claim it. Open Settings from the workspace menu, then Runners, and look for the first of these that applies:

  • No host is listed, or every host reads Offline: no machine is taking work. Run a host, or read the log of the host that is offline.
  • A host's Slots reads <capacity> of <capacity>: it is full, and the run waits for a free slot. Runs, warm sandboxes and idle sandboxes take slots. Hover over Slots to see how many of each. Raise the host's capacity or add a host.
  • No host's Harnesses include the station's harness (the Run page's composer shows that harness), or Harnesses reads None: use a runner image that holds the harness. Spotlight's runner image holds none. See Install a harness in your runner image.
  • The host's Images reads <n> unavailable: the host will not start runs from those images. Hover over it for each image and its reason, and fix the reason as in the table below.
  • The station's harness profile gives an MCP server a secret, or the run is a setup chat's, and the workspace's only runners come from push pools that name no egress. Such a run waits for a host, or for a push pool that names an egress. See Send push pool runs through an egress.
  • The line or station names runners or an image: only a host that matches that placement can claim the run. Compare the names on the Runners page (Pool <key>, Trust <key>, the images) with the line. See Send a line's work to particular runners.
ReasonWhat to change
The host's SPOTLIGHT_RUNNER_IMAGE doesn't allow this image.Add the image, or a prefix that covers it, to SPOTLIGHT_RUNNER_IMAGE on the host. See Run a line in your own runner image.
Image can't be pulled. Error: …Check the image reference and the host's registry access. See Pull runner images from a private registry.
Image can't be inspected. Error: …Check that the image is built on the Spotlight runner image. See Run a line in your own runner image.
Runner is on release <release>. Minimum version required: <release>Rebuild the image on a newer runner release.
Runner doesn't report its release number. Minimum version required: <release>Rebuild the image on the Spotlight runner image, at that release or a newer one.

The run failed with a message

A failed run puts an item in the assignee's inbox that starts "The run failed:" and gives the reason, and its Run page shows the same note. When the same failure happens again while the item is open, no new note is written: the item's count goes up instead. If such a run never reached the agent, its Run page reads "The run failed before the agent started.", and the message is on the inbox item. Run failure messages lists every message and its code.

MessageWhat to change
Runner image <image> can't be pulled. Error: …The image reference or the host's registry credentials. See Pull runner images from a private registry.
Runner image <image> is unavailable. …Fix the reason as in the table above.
Runner image <digest> no longer has the <harness> harness.Put the harness back in the image, or change the station's harness.
The sandbox's egress didn't start. Error: …Read the host's log. See Egress.
The runner couldn't prepare the run. Error: prepare: git clone <path>: …Check that the GitHub App can read the repository and that the line names it correctly. See Point a line at your repositories.
The runner couldn't prepare the run. Error: prepare: preparing <path> did not finish within 10m0sCheck the host's network to GitHub. See Limits and timeouts.
The runner couldn't start the agent. Error: start agent: …, The runner couldn't start the agent. Error: open a session: …If the rest of the message names authentication, check the harness key: the workspace secret, or the key the host keeps in sandbox.env. See Give hosts your harness keys.
The runner couldn't start the agent. Error: resume the session: …The harness could not reopen the task's earlier conversation.
The runner couldn't prepare the run. Error: fetch attachment <id>: …One of the task's attachments could not be fetched into the sandbox.
No runner was provisioned after N attempts. Last failure: …Check the push pool's provision endpoint. See Provision call.
Hooks did not answer after N tries. Last error: …Check the hook named in the message. See spotlight_hook.

For a message that names neither a setting nor a guide, read the rest of it, then the host's log.

When you have fixed the cause, reply to the item to start a new run at the same station, as in Answer the inbox.

The run refused to start

A station's run fails before it starts when the station requires something the team or workspace does not have. The message after "The run failed:" says which:

  • harness_profile_unknown: Harness profile <profile> is not in this team. Station: <Station>: create that harness profile for the team, or remove it from the station. See Limit what agents may do.
  • not_entitled: … or entitlement_expired: …: the station enables a catalog item that the workspace's plan does not include, or that its plan included before the plan expired. Remove the item from the station.
  • catalog_item_unknown: … or catalog_item_wrong_kind: …: the station names a catalog item that does not exist, or names it as the wrong kind. Correct the reference on the station.
  • secret_awaiting_value: Secret <NAME> has no value. Station: <station>: the station's harness profile injects a secret, or puts one in the sandbox, that has no value yet. Set its value in Settings, then Secrets, or with spotlight secret set <NAME>. See Give an MCP server a secret.
  • secret_sandbox_not_allowed: Secret <NAME> does not allow its value in a sandbox. Set sandbox = "env" on the secret. Station: <station>: the station's harness profile puts the secret in the sandbox with env, but the secret keeps its value out of sandboxes. Set sandbox = "env" on the secret, or remove the variable from the profile's env. See Give a run a secret as an environment variable.

Refused runs are not retried. After changing the station or setting the value, reply to the item.

The page says Spotlight cannot start the agent

The run page or the inbox item reads Spotlight cannot start <Harness> at <Station>. No run started at the station: the station's harness is one that this Spotlight release does not know or cannot prepare. The control plane's log has Did not dispatch a run with station-has-no-harness or harness-not-prepared.

  1. Change the station's harness in the line's Terraform to a harness from Harnesses, and apply it. Or update Spotlight to a release that has the harness.
  2. Select Try again, or send a message to the task. Either one tries to start the run again. Your message is kept even when the run still does not start.

See A run that did not start.

The run used all its attempts

"The run did not finish after N attempts. Spotlight does not try it again." means runners claimed the run and then stopped renewing its lease, or ran it past the host's run time limit, N times in a row. Spotlight puts such a run back in the queue by itself until it has used all its attempts. On Insights, the Traces tab shows the run as Exhausted under its task, with its code beside it: runner-lost or timed-out.

Read the log of the host that claimed it around the time of each attempt. Look for the host stopping or restarting, and for the warning the run ran past its time, which the runner logs, in the host's log, when it stops a run at the host's run time limit. See Limits and timeouts.

The inbox item says it failed N times

×N on an inbox row (the tooltip reads "Failed N times") means the same failure happened again in the same conversation. A lost runner and a run time limit count as the same failure here, named for the latest. Find the message in the tables above and fix what it names before you reply again.

The trace reads Egress not enforced

On a push pool's run, the run's row in the task trace shows a warning mark, which reads Egress not enforced when you hover over it, and the run's details show Not enforced under Egress: the sandbox could connect to the Spotlight address without egress. The secrets that egress injects still stayed out of the sandbox, but a tool that ignores the proxy went out directly. Set the platform's firewall so that the pool's containers connect only to the egress host, as in Limit the container to egress. See Enforcement.

The trace shows a connection in red

A red row with a host name under a step is a connection of the run with an error. Select it, and read Outcome, Reason and Cause.

Outcome and reasonFix
Blocked, Not on the allow-listIf the run needs the host, add it to the allow-list of the egress. See Set the allow-list.
Blocked, Private addressIf the run needs a private host, name the host in the allow-list. See Reach a private host.
Blocked, No bound secretNo secret of the run is bound to the host. Check the host of the secret.
Failed, Unknown host, Timed out, TLS failed or No connectionEgress could not connect to the host. Check that the host name is correct and that the host is up.
Auth failed, status 401 or 403The host did not accept the secret that egress injected. Check that the secret is correct, not expired, and has the necessary permission.
Server errorThe host failed. Try the run again later.

See Connections in the trace.

The agent worked without the repository's setup

A failing setup command does not fail the run; the agent starts without it.

On the Run page, open the Ran setup step. Its output ends with Setup failed for <path>. Error: …. Fix the repository's setup command in the line, then reply to the item, or send the work back to the station to run it again.

The agent ignored, missed or was misled by what the team knows

Open the Run page. Below the run's last step, select the Memories icon in the toolbar. The toolbar shows once the run stops working, and the icon only when the run was supplied or proposed memories. The pane lists:

  • Supplied to the agent: the memories the run was briefed with before it started, the ones the agent looked up with spotlight recall or read from .spotlight/memory, and the ones it was shown when it used a path they are about. Each spotlight recall is also a spotlight.recall span in the task's trace, with the words or handle it searched for and how many it found; each time memories are shown at a path, a spotlight.memory span names their handles and the paths.
  • Proposed by this run: what the run put to the team to keep, and the status of each.

Then read it against what went wrong:

What you seeCauseWhat to change
The memory it needed is not in the pane, and not on the Memory pageNobody approved it.Write it on the team's Memory page, or turn on memories at the station.
It is on the Memory page but not in the pane, and it applies to this run's line, station, repository and filesThe briefing contains at most eight memories, or 3,000 characters, and memories that are more specific, closer to the task's words, or warnings filled it. The agent did not look it up in .spotlight/memory.Retire memories that no longer help, narrow where others apply, or say the memory in words the task will use.
It is on the Memory page but not in the pane, and it does not apply to this runIts scope does not include this run's line, station, repository or files. A memory of another line or station about the same repository is only in .spotlight/memory/elsewhere/, and never shown at a path.Correct it to apply more widely.
It is under Supplied to the agent and the agent acted against itThe agent didn't follow it.Say it more plainly in a correction, or in the station's prompt.
A listed memory is itself wrongThe memory is wrong.Select This was wrong beside it, say why it no longer applies, and select Retire. Later runs aren't told it. An agent can propose the same with spotlight forget.

Each memory's handle links to it on the team's Memory page, which also shows how many runs were briefed with it or recalled it. A run counts as briefed once it is queued with the memory, even if it is cancelled before it starts.

On this page