Inside a sandbox

A host starts a sandbox from a runner image. A task's or chat's sandbox serves the runs of that task or chat, one after another, until Spotlight drains it. A change stack check gets a sandbox of its own, destroyed when the check ends. Why a sandbox belongs to one task gives the reasons.

Runner image

Spotlight's runner image is ghcr.io/usespotlightai/spotlight-runner:<release>. It holds no harness. A team builds its own image FROM it with a harness, as in Install a harness in your runner image. A host's default image is the first exact entry of its SPOTLIGHT_RUNNER_IMAGE. A line can name an image of its own. See Run a line in your own runner image.

Spotlight's runner image contains:

PartValue
Basedebian:bookworm-slim
Packagesgit, jq, curl, ca-certificates, bash, unzip, Node.js 20
Terraform1.16.4, at /usr/local/bin/terraform, checked against HashiCorp's SHA-256 sums
spotlight/usr/local/bin/spotlight
Agent useragent, uid 2000, shell /bin/bash, home /home/agent
/workspaceowned by agent, mode 0700
ENVSPOTLIGHT_AGENT_USER=agent, SPOTLIGHT_WORKSPACE=/workspace, CHECKPOINT_DISABLE=1
USERroot
ENTRYPOINT["spotlight", "runner"]

The runner runs as root. The harness, setup commands and the agent's own commands run as agent. See Harnesses for what each harness installs.

Files

PathContents
/workspaceThe run's working copy. Every run and check uses the same path.
/workspace/<repository>Each checkout, named by the repository's name without its owner. acme/api is at /workspace/api.
/workspace/.spotlight/attachments/<attachment id>/<name>Each file attached to the task, or to a message during the run.
/workspace/.spotlight/memoryEvery active team memory that applies to the run's team, line, station and repositories, as Markdown files named by handle, such as M-12.md. A memory scoped to a repository is in repositories/<owner>/<name>/, or, when it is about paths, in repositories/<owner>/<name>/<path>/ once for each path. Any other memory is in team/, line/ or station/. A memory of the team learned at another line or station about one of the run's repositories is laid out the same way under elsewhere/, and its file says to check it still fits before following it. Each file contains the handle and kind, the memory, where it applies, and its source: who approved it and from where; then the memory it replaced, if any, and the spotlight trace command for the task it came from, if any. Laid afresh each run; changing the files changes nothing the team remembers. When the team's memory cannot be read, the folder contains only README.md. A search's agent run gets no memory files.
/workspace/.spotlight/stateThe harness's state directory, SPOTLIGHT_STATE_DIR. Contains the harness's sessions and the files a harness profile lays down.
/workspace/.claude/skillsSkills, for Claude Code.
/workspace/.spotlight/skillsSkills, for Cursor and Codex.
/workspace/.opencode/skillsSkills, for OpenCode. OpenCode also reads .claude/skills and .agents/skills.
/workspace/.spotlight/background-lost.jsonThe background work that still ran when the sandbox last stopped. The next run or attempt reads it, names the work to the agent, and removes it.
/workspace/.spotlight/outcome.jsonRead if the agent never runs spotlight handover. Removed at the start of each run. See Agent commands.
/run/spotlight/assignment.jsonThe work the host assigned to the sandbox, mode 0400. The host copies in a new one for each run it delivers into a live sandbox. The runner deletes it after reading it.
/etc/spotlight/egress/authority.pemThe run's egress certificate authority. On a runner of a push pool that names an egress, the authority of the runner's local proxy.
/etc/spotlight/egress/bundle.pemThe image's system certificates with that authority added.
/spotlight/mirrors/<repository>.gitThe host's mirror of each repository, mounted read-only when the host has one.
/spotlight/editor-serversThe host's volume spotlight-editor-servers-<host id>-<workspace id>, mounted into a task's or chat's sandbox once the host knows its workspace. Keeps the VS Code and Cursor server releases that editors bring, copied to and from ~/.vscode-server and ~/.cursor-server of the agent user when an editor connects.

At start the runner also appends the egress authority to each of these files that exists in the image: /etc/ssl/certs/ca-certificates.crt, /etc/pki/tls/certs/ca-bundle.crt, /etc/ssl/cert.pem.

Environment

The runner's environment

A host sets these on the sandbox:

VariableValue
SPOTLIGHT_URLSPOTLIGHT_SANDBOX_URL from the host configuration.
SPOTLIGHT_ASSIGNMENT_FILE/run/spotlight/assignment.json
SPOTLIGHT_RUN_TIMEOUTSPOTLIGHT_RUN_TIMEOUT from the host configuration, as a Go duration.
SPOTLIGHT_MIRRORS/spotlight/mirrors, when mirrors are mounted.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxyhttp://sandbox:<credential>@egress:3128, with a credential for this sandbox alone.
NO_PROXY, no_proxylocalhost,127.0.0.1,::1
SSL_CERT_FILE, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, GIT_SSL_CAINFO/etc/spotlight/egress/bundle.pem
NODE_EXTRA_CA_CERTS/etc/spotlight/egress/authority.pem
Variables from SPOTLIGHT_SANDBOX_ENV and SPOTLIGHT_SANDBOX_PASSAs given, except harness keys, which become spotlight-egress:<NAME>. See Host settings.

A runner a push pool provisions gets SPOTLIGHT_URL and a one-run SPOTLIGHT_RUN_TOKEN from its provider instead. When the pool names an egress, it also gets SPOTLIGHT_EGRESS_URL and SPOTLIGHT_EGRESS_PROXY_CREDENTIAL, and the agent gets the proxy and certificate variables of the runner's local proxy. When the pool names none, the runner has no egress. See The spotlight command for the variables the runner reads.

The agent's environment

The harness, and every command the agent runs, get the runner's environment with these changes:

ChangeVariables
RemovedEvery variable starting with SPOTLIGHT_.
Set to the agent user'sHOME, USER, LOGNAME, SHELL
SetTERM=xterm-256color, COLORTERM=truecolor
Set for the runSPOTLIGHT_AGENT_API_URL, SPOTLIGHT_AGENT_API_TOKEN, SPOTLIGHT_STATE_DIR
Set for a run that uses Spotlight's APISPOTLIGHT_URL, the runner's Spotlight address, and SPOTLIGHT_API_TOKEN=spotlight-egress:spotlight-api. See The run's Spotlight token.
Set by the harnessThe harness's own variables. See Harnesses.
Set for each harness key the workspace holds<NAME>=spotlight-egress:<NAME>, for the keys of the run's harness. See Harness keys.
Set for a harness profile with envEach variable the profile's env names, holding the real value of its secret. See Environment variables.
Set for tracingTRACEPARENT
Set on a hostHTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy to http://127.0.0.1:3128. See The runner's proxy relay.

Git commits in a checkout use user.name Spotlight and user.email noreply@usespotlight.ai, unless SPOTLIGHT_GIT_AUTHOR_NAME and SPOTLIGHT_GIT_AUTHOR_EMAIL reach the runner.

Sandbox lifetime

The sandbox of a task or chat is held by leases. Spotlight decides from them when the sandbox drains.

LeaseHeld
RunWhile a run of the task or chat is claimed in the sandbox. A run that is suspended, completes or fails gives it up.
EditorWhile an editor connection is open. Renewed every 30 seconds while the connection carried traffic in the last 30 minutes. Expires 2 minutes after the last renewal.
ArchiveFrom just before a run reports its turn until the runner has stored the run's working copy, or failed to. Renewed every 30 seconds. Expires 2 minutes after the last renewal. While it is held, the sandbox takes no run, its task or chat gets no new sandbox, and the host is not told to drain it.
StateMeaning
startingRequested, or started by a host that has not reported it yet.
readyReported by its host. Takes runs of its task or chat, one at a time.
drainingSpotlight told the host to drain it.
goneDestroyed, or no longer reported by its host.
RuleValue
Idle graceWith no lease, the sandbox drains this long after its last lease ended. The control plane's SPOTLIGHT_SANDBOX_GRACE, default 10m. See Self-hosted settings.
ReplayA replay's sandbox drains when its run ends. It gets no idle grace, because no later run or editor uses it.
Completed taskWhen a task moves to Completed or is deleted, its sandbox drains as soon as no run and no editor holds it. It gets no idle grace. A task finished at another station can reopen, so its sandbox keeps the grace. A new run of the task that takes the sandbox first keeps it up.
Editor limitWith only editor leases, the sandbox drains this long after its last run lease ended, or after it started when no run held it. SPOTLIGHT_EDITOR_LIMIT, default 12h.
CheckedEvery 30 seconds.
LostA sandbox that its host stops reporting, or whose host sends no heartbeat for 90 seconds, is gone. A sandbox that starts and is not reported within 60 seconds is gone.
One per task or chatAt most one sandbox of a task or chat is starting or ready.

A queued run whose task or chat has a ready sandbox with no run in it is claimed only by that sandbox's host, into that sandbox, and before the host's other work. A run that the sandbox's image cannot run drains the sandbox, and starts in a new one.

A sandbox that an editor requested starts before the queued runs of other tasks and chats, because a person waits for it. When a run of its own task or chat is queued, that run is claimed first and starts in the requested sandbox.

To drain a sandbox, the host sends it SIGTERM. The runner stores the working copy when it changed since it was last restored or stored, then exits. The host stops the sandbox with a 30-second grace and destroys it with its egress and network. A runner that gets SIGTERM during a turn stores the working copy before it exits, and does not report the turn; the run's lease expires and the run is tried again. A runner that gets SIGTERM while it stores the working copy after a completion continues for up to 25 seconds. Spotlight does not tell a host to drain a sandbox that holds an archive lease.

A sandbox takes one place in the host's SPOTLIGHT_CAPACITY, and counts toward its pool's maxRuns, for as long as it lives, with or without a run in it.

Before the host delivers a run into a live sandbox, it restarts the sandbox's egress with the run's egress token, and copies the run's assignment into the sandbox. A run delivered into a live sandbox uses the image the sandbox started from.

Memory

ItemValue
LimitThe host's SPOTLIGHT_SANDBOX_MEMORY, set when the sandbox starts. No swap above it. Default: no limit.
At the limitThe kernel stops a process in the sandbox.
OOM scoreEvery sandbox starts with oom_score_adj 500. When the machine runs out of memory, the kernel stops a process in a sandbox before the host. Egress keeps the runtime's default score.

To find a limit, divide the machine's memory, less about 2 GiB for the host, Docker and egress, by SPOTLIGHT_CAPACITY. spotlight host init suggests this value. A later change of SPOTLIGHT_CAPACITY does not change the limit.

Warm sandboxes

A line with warmSandboxes above 0 has that many warm sandboxes. A warm sandbox belongs to no task. Its repositories are cloned from the host's mirrors at each repository's default branch, and their setup runs in it. A task's first run then starts in it, and the sandbox becomes that task's sandbox.

RuleValue
KeptEvery 30 seconds, Spotlight requests the missing warm sandboxes of each line and drains the extra ones. A warm sandbox whose line changed its repositories, setups, image or runners drains, and a new one replaces it.
PlacedOn a host that matches the line's runners and image and has two or more free places. A warm sandbox never takes the last free place of a host. The host starts it only when no run of the workspace waits for that host.
Gives wayWhen a host has no free place and a queued run waits for a new sandbox, the host drains its oldest ready warm sandbox. It drains one at a time. The run takes the free place. A new warm sandbox replaces the drained one when the host has room again.
MirrorsThe host mounts its mirror of each repository. A host with no mirror of a repository cannot warm the sandbox: the sandbox is gone, and the line gets no new warm sandbox for 15 minutes.
SetupA failed setup is not recorded, so the first run runs it again.
First runA queued first run of a task of the line, which restores no working copy, starts in a ready warm sandbox with no run in it. For 60 seconds after it is queued, other hosts leave such a run to the warm sandbox's host. Replays, searches and chats do not use warm sandboxes.
AgeA warm sandbox that no run took drains this long after it started. The control plane's SPOTLIGHT_WARM_SANDBOX_AGE, default 24h. A new one replaces it.
CapacityAs for any sandbox: one place in the host's SPOTLIGHT_CAPACITY and its pool's maxRuns.

Editor connections

A person opens a sandbox over SSH with spotlight ssh proxy. Spotlight starts the sandbox of the task or chat when none is up, waits up to 10 minutes for it to be ready, and joins the connection to a stream that the sandbox's host opens to Spotlight. The host runs spotlight runner ssh in the sandbox for each connection.

Who may connectRule
A task's sandboxA member of the workspace that has the task.
A chat's sandboxThe person who started the chat.

The person signs in with the browser session, from the same origin only, or with the login from spotlight login. A workspace token cannot connect.

ItemValue
UserThe agent user, agent in Spotlight's runner image.
Working directory/workspace
EnvironmentThe sandbox's environment, without the variables that start with SPOTLIGHT_, with the agent user's HOME, USER, LOGNAME and SHELL. The egress proxy variables are kept.
Host keyOne for each sandbox.
SupportedCommands, shells with a terminal, environment variables, window size changes, signals, SFTP, and forwarding to localhost in the sandbox.
Waits forThe runner to restore the working copy, at most 10 minutes.

Processes started from an editor connection keep running between runs.

Run phases

The runner takes these phases in order. A failure in a phase marked "fails the run" ends the run with that message and exit code -1. A failure before the harness start phase has the failure code unprepared. In the harness start phase, a harness that does not start (start agent) or refuses a session option has exited, and a harness that cannot resume or open a session has unprepared. A failure after the harness start phase has exited. See Failure codes.

PhaseWhat happensTime limitOn failure
Sandbox envFor a run whose harness profile has env, the runner gets the value of each secret from Spotlight and checks it. From then on, it puts spotlight-egress:<NAME> in place of each value in what the run records.Fails the run: The runner couldn't prepare the run. Error: Secret <NAME> could not be put in the sandbox: <reason>, The runner couldn't prepare the run. Error: Spotlight sent a value for <VARIABLE>, which the run did not ask for, or The runner couldn't prepare the run. Error: reveal the sandbox env: <error> where the runner could not get the values from Spotlight. A run that is no longer leased to the runner does not start. See Run failure messages.
RestoreIn a new sandbox, the newest working copy archive of the run's task is fetched and unpacked into /workspace, whichever station left it. A sandbox of a task or chat restores it once, when it starts, and each later run keeps the working copy as it is. A chat's run restores its chat's archive only when it carries on a conversation. A replay run restores exactly the archive the run it replays restored, or none.30 minutes to fetchStarts with an empty working copy. A replay run fails instead: The runner couldn't prepare the run. Error: the archive the replay starts from, <id>, is no longer stored, or The runner couldn't prepare the run. Error: restore the archive the replay starts from: <error>.
Outcome.spotlight/outcome.json from an earlier run is removed.Fails the run: The runner couldn't prepare the run. Error: clear an earlier run's outcome: <error>.
CheckoutEach repository is cloned into /workspace/<repository>, from the host's mirror when there is one, or fetched when the checkout already exists. The run's branch or ref is checked out; a ref the checkout already has is not fetched again. A replay run checks out the commit the run it replays started from, and may only fetch: a push fails with this run may only fetch. A restored checkout that is not a working git repository, or whose HEAD names no commit, is moved aside to <path>.unusable and cloned again. An unfinished rebase, merge, cherry-pick, revert or git am that the last run left is stopped, with HEAD kept at refs/spotlight/interrupted/<sha>; if git cannot stop it, the runner clears it and resets the files to HEAD. A task's run then switches each checkout to the task's branch: the local branch if there is one, else a local branch that tracks the remote one, else a new branch from the task's base as the remote has it. A branch that only the remote moved is fast-forwarded. A branch that moved both in the checkout and on the remote has its local commits rebased onto the remote; when the rebase does not apply cleanly, the local commits are kept at refs/spotlight/diverged/<branch>/<sha> and the branch is reset to the remote. Uncommitted changes block the fast-forward and the rebase, and the checkout is then left as it is. What the runner changed is told to the agent: see Checkout notes. Runs as root.10 minutes for all checkoutsFails the run: The runner couldn't prepare the run. Error: prepare: <error>, or The runner couldn't prepare the run. Error: prepare: preparing <path> did not finish within 10m0s.
Starting pointA task's run records the archive it restored and the commit each checkout is at. See Starting point.Recorded under start. The run continues.
AttachmentsEach attachment is written to .spotlight/attachments/<id>/<name>.Fails the run: The runner couldn't prepare the run. Error: fetch attachment <id>: <error>.
SkillsFor a task's run, skills from earlier runs are removed from every skill directory, and the station's skills are written.Fails the run.
MemoryThe memory folder from earlier runs is cleared, and every active memory that applies to the run is written under .spotlight/memory.Recorded. The run continues, with only a README.md in the folder saying the team's memory could not be read.
Harness filesFor a task's run, files a harness profile laid in an earlier run are removed from .spotlight/state, and the station's harness profile's files are written there.Fails the run.
Ownership/workspace is given to agent. Files agent already owns are left alone.Fails the run: The runner couldn't prepare the run. Error: hand over workspace: <error>.
SetupEach repository's setup runs in its checkout as agent, with /bin/sh -c. The setups of a run's repositories run at the same time, at most four at once. A setup is skipped when it is not needed: see Setup.15 minutes per checkoutRecorded. The run continues, and the agent is told: see Setup.
Egress checkA runner given SPOTLIGHT_EGRESS_URL tries a direct connection to the Spotlight address, and records egress.checked. See Enforcement.3 seconds
Harness startThe harness starts in /workspace as agent, over the Agent Client Protocol. The previous session is resumed, or a new session opens. A session the harness no longer has opens a new one. The harness command's session options, such as OpenCode's effort, are then set on the session.Fails the run: The runner couldn't start the agent. Error: start agent: <error>, The runner couldn't start the agent. Error: resume the session: <error>, The runner couldn't start the agent. Error: open a session: <error> or The runner couldn't start the agent. Error: set the harness's <option> to <value>: <error>. The codes are exited for start agent and set the harness's <option>, and unprepared for resume the session and open a session. A session option marked optional that the harness refuses is logged, and the run continues without it.
PromptThe briefing is sent. Each message a person sends during the turn cancels the turn and is sent next. When a turn ends, messages waiting are sent as the next prompt. With none, the run completes, or, when it put the task to a person, is suspended. A message that came in during a turn that put the task to a person starts the run again at once.See below.
Change stacksFor a station with diffs: true, each checkout's changes are sent for a change stack. A replay run sends them when its turn ends, before it completes.Skipped for that checkout.
CompletionThe exit code, the handover and the session id are reported. From then on, the answer, the question or the handover shows in the inbox, in Slack and on the run. Before it reports, the runner takes the sandbox's archive lease.
ArchiveThe working copy is packed and stored after the completion, unless nothing changed since it was last restored or stored. The sandbox's archive lease holds the task's or chat's next run until the archive is stored or has failed. While the lease holds, the next run, in this sandbox or a new one, does not start from an older archive. If the lease expires or the sandbox is lost, a new sandbox restores the newest archive that was stored. A runner with no sandbox, such as one a push pool provisions, or one whose sandbox does not take the lease, stores the working copy before the completion. A replay run stores none.2 GiB packed, 8 GiB unpacked; 30 minutes to uploadSkipped. The run keeps the outcome it reported. A sandbox that drains later stores the working copy again.

The runner stops a run, in any phase, once it has run for SPOTLIGHT_RUN_TIMEOUT (default 6h), and reports it timed-out with Run stopped at the host's time limit. Time limit: <timeout>. The sandbox stays up. For a change stack check, the host stops the whole sandbox at that time. A task's run is tried again, 3 attempts in all; see Failure codes.

After a run completes, and before the host delivers the next run, the runner stops every process of the agent user, apart from those started from an editor connection.

A turn that ends with end_turn, max_tokens or cancelled finishes the prompt phase with exit code 0. Any other stop reason gives 1. A harness that fails mid-turn gives -1. A person stopping the run ends it as stopped.

When a harness profile asks before a kind of action, the harness's permission request goes to Spotlight, which allows it, rejects it, or puts it to a person. A request put to a person cancels the turn, and the run is suspended until the answer. Requests of other kinds, such as ACP's fetch, are allowed.

Profile kindHarness permission kinds
readread, search
editedit, delete, move
executeexecute

A change stack check runs in a sandbox of its own, in place of a run. See Checks.

Setup

After a setup succeeds, the sandbox records its command, the content of the repository's dependency files, and a hash of the variables and values that the harness profile's env puts in its environment. The next run in the same sandbox skips that setup when all three are the same. A new sandbox, a restored working copy and a replay run record nothing, so their setup runs. A skip looks only at the command, the dependency files and the secrets in its environment, so keep setup to what installs dependencies: a build or code generation step in it is skipped with the install.

The dependency files are the files with these names anywhere in the checkout that git tracks or does not ignore: package.json, package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, pnpm-workspace.yaml, yarn.lock, bun.lock, bun.lockb, go.mod, go.sum, go.work, go.work.sum, Cargo.toml, Cargo.lock, pyproject.toml, poetry.lock, uv.lock, Pipfile, Pipfile.lock, requirements*.txt, Gemfile, Gemfile.lock, composer.json, composer.lock, mix.exs, mix.lock, .node-version, .nvmrc, .python-version, .ruby-version and .tool-versions.

A failed setup is recorded under the setup step, and nothing is recorded for the next run, so it runs that setup again. The agent's first message then starts with a note before the briefing. The note names each failed repository, its setup command, the error and the last 20 lines of output. It tells the agent to do the task as far as it can and to say in its handover which setups failed and why.

Checkout notes

When the checkout phase changed a checkout, or could not bring it up to date, the agent's first message has a note for each case. The notes come after the note on failed setups, if there is one, and before the briefing:

CaseNote
Moved asideSpotlight could not use <path> as the last run left it: <reason>. It moved that folder to <path>.unusable and cloned the repository again.
Unfinished git operation stoppedThe last run left <what> unfinished in <path>. Spotlight stopped it, and the files are as they were before it started. HEAD as the last run left it is at <ref>. Do the <operation> again if it is still necessary.
Unfinished git operation clearedThe last run left <what> unfinished in <path>, and git <command> --abort failed. Spotlight cleared it and reset the files to HEAD as the last run left it, which is at <ref>. Do the <operation> again if it is still necessary.
Switched backThe last run left <path> on the branch <other branch>. Spotlight switched it back to <branch>, the branch of this task. Commits on <other branch> are not part of the change of this task.
RebasedSomeone pushed to <branch> since the last run. Spotlight rebased the commits of the last run in <path> onto the remote branch. The commits as they were before the rebase are at <ref>.
ResetSomeone pushed to <branch> since the last run, and the commits of the last run in <path> did not rebase onto it cleanly. Spotlight reset the branch to the remote. The commits of the last run are at <ref>. Compare them with the remote, and apply what is still necessary.
Rebase blockedSomeone pushed to <branch> since the last run, and <path> has commits that are not on the remote. Uncommitted changes block Spotlight from rebasing them. Commit your changes, then run git rebase origin/<branch> before you push.
Fast-forward blockedSomeone pushed to <branch> since the last run. Uncommitted changes in <path> block Spotlight from catching up with it. Commit or move them, then run git merge --ff-only origin/<branch>.

<what> is a rebase, a merge, a cherry-pick, a revert or a git am. A second unusable folder of the same checkout goes to <path>.unusable-2, and so on. <ref> is refs/spotlight/interrupted/<sha> or refs/spotlight/diverged/<branch>/<sha>, where <sha> is the first 12 characters of the commit.

Briefing

The briefing is the first prompt a task's run sends its harness. It contains these parts, in this order, each only where it applies:

PartContains
The station's promptThe station's prompt, as written.
## <task title>The task's title and description.
AttachmentsThe task's attachments, under Attached, in the workspace:.
## Already doneEach note on the task, under the name of the station it was written at.
## Decisions on recordThe task's decisions and their disputes.
## What the team has learnedThe active team memories that are most relevant to the run, at most eight or 3,000 characters. A memory must apply to the run's team, line, station and repositories. It is ranked by how specific its scope is, how well its words match the task's title, description and latest notes, whether it warns (a failure, a rejected approach or a correction), and whether earlier runs recalled it; then the newest first. A memory about paths comes in once the task has touched them, or when its words match the task. Each is named by its handle, such as M-12.
## The rest of what the team remembersWhere the memory folder is, how it is laid out, and when to look there. Left out when no memory applies.
## RememberingWhen to propose a memory with spotlight remember.
## Record what you decideAt a station with decisions: true: the kinds of decision to record with spotlight decide, and how.
## The workspaceThe line's repositories and the directory each is checked out in, and that the task keeps the workspace from one run and station to the next.
## Secrets in your environmentFor a harness profile with env: each variable and the secret it holds, and how to keep the values out of what the run writes and sends.
## SkillsFor cursor and codex: each skill's SKILL.md path and description.
## Replying to review commentsReview comments on the task's pull request that have no reply, with their handles for spotlight reply.
## When you are doneHow to run spotlight handover, and the keys of the stations the run may pass the task to.
## From hook <key>For each hook on run.starting with brief, its text, sorted by hook key, with each line written so that it cannot start a heading or a code block. The hook sections hold at most 16,000 characters in all, counted as the agent gets them. Sections past the limit are left out, and a note names their hooks.

A chat's run has a briefing of its own. Its first one also lists what the team has learned, taking only memories scoped to the whole team or its repositories and matching them against what the person said, and points at the memory folder. A chat has no task to ground a memory in, so it is not told to run spotlight remember.

Journal steps

These phases record their output on the run under a step name:

StepMessages
restoreRestored the workspace the last run left (<size>), Kept the workspace this sandbox restored or the last run left in it, Started afresh: <error>, Restored the workspace the replayed run started from (<size>)
startWhere the run started was not recorded: <error>
preparereusing <path>, cloning <path> from the host's mirror, cloning <path>, moved <path> aside to <path>.unusable and cloned it again: <reason>, stopped <what> that the last run left unfinished in <path>; HEAD before the stop is at <ref>, cleared <what> that the last run left unfinished in <path>, after git <command> --abort failed; HEAD before is at <ref>, switched <path> back to <branch> from <other branch>, where the last run left it, caught <path> up with what was pushed to <branch>, rebased the commits of the last run in <path> onto what was pushed to <branch>; the commits before the rebase are at <ref>, reset <path> to what was pushed to <branch>: the commits of the last run did not rebase onto it cleanly; they are at <ref>, left <path> as the last run left it: <branch> has moved on both here and on the remote, and uncommitted changes here block a rebase, left <path> behind the remote's <branch>: uncommitted changes here block the fast-forward, and git's output
branchAt handover, for each checkout not on the task's branch: The run ended with <path> on <where>, not on <branch>, the branch of this task. Commits that are not on <branch> are not part of the change of this task. The next run switches <path> back to <branch>. <where> is the branch <name> or a detached HEAD.
setupThe command's output, Setup failed for <path>. Error: <error> on failure, and Skipped setup for <path>: the setup command, the dependency files and the secrets in its environment did not change after the last setup in this sandbox.
archiveCaptured the workspace for the next run (<size>), Coalesced: nothing changed since the workspace was last restored or archived, Skipped: <error>

The archive step comes after the run's completion. The sandbox records it on the run under its archive lease.

A run that fails in any phase up to and including the harness start records a failed event with the failure message. See Troubleshoot a run.

Host messages that fail a run

MessageCause
Runner image <image> can't be pulled. Error: <error>No pull and no local copy.
Runner image <image> is unavailable. <reason>The host does not support the image.
Runner image <digest> no longer has the <harness> harness.The image changed and lost the station's harness.
The sandbox's egress didn't start. Error: <error>See Egress.

On this page