Install a harness in your runner image
Spotlight's runner image, ghcr.io/usespotlightai/spotlight-runner:<release>,
holds no harness. A host that serves only that image runs change-stack checks,
but no agent run. Build your own image FROM it, with the harness that your
subscription covers, and let your hosts serve that image.
On your own computer, spotlight host init with no flags builds the image for
you, with the harnesses you pick, and makes it the host's image. See
Install a host. Follow the steps
below to build the image yourself, for example to push it to a registry for
more than one host. You need Docker or Podman on the machine that builds the
image, and a shell on each host machine.
Find the release your hosts run
Open Settings from the workspace menu, then Runners. Release shows
the release of each host. On the host machine, spotlight version prints it
too. Use this release as <release> in the steps below.
Build the image
The Spotlight repository has one Dockerfile for each harness, in
data-plane/host/internal/harnesses/dockerfiles.
spotlight host init builds from the same files:
| Harness | Dockerfile | Installs |
|---|---|---|
| Claude Code | claude-code.Dockerfile | @anthropic-ai/claude-code and @agentclientprotocol/claude-agent-acp |
| Codex | codex.Dockerfile | @agentclientprotocol/codex-acp |
| Cursor | cursor.Dockerfile | cursor-agent, from Cursor's install script |
| OpenCode | opencode.Dockerfile | opencode-ai, major version 1 |
Download the Dockerfile for your harness into an empty directory, and build it
with BASE set to Spotlight's image at your hosts' release. For Claude Code:
mkdir -p ~/spotlight-runner && cd ~/spotlight-runner
curl -fsSLO https://raw.githubusercontent.com/usespotlightai/spotlight/main/data-plane/host/internal/harnesses/dockerfiles/claude-code.Dockerfile
docker build --file claude-code.Dockerfile \
--build-arg BASE=ghcr.io/usespotlightai/spotlight-runner:<release> \
--tag ghcr.io/acme/spotlight-runner-claude-code:<release> .Always set BASE. Without it, the Dockerfile builds on :latest, which can be a
different release from the one your hosts run. To pin a harness version, also
set its build argument: CLAUDE_CODE_VERSION and CLAUDE_AGENT_ACP_VERSION
for Claude Code, CODEX_ACP_VERSION for Codex, or OPENCODE_VERSION for
OpenCode. OPENCODE_VERSION is 1 by default, because Spotlight supports
OpenCode version 1. CLAUDE_CODE_VERSION is 2.1.323 and
CLAUDE_AGENT_ACP_VERSION is 0.107.0 by default. The other arguments are
latest by default.
To put more than one harness in one image, build the Dockerfiles one on top
of the other. Set BASE of the second build to the tag of the first:
curl -fsSLO https://raw.githubusercontent.com/usespotlightai/spotlight/main/data-plane/host/internal/harnesses/dockerfiles/codex.Dockerfile
docker build --file codex.Dockerfile \
--build-arg BASE=ghcr.io/acme/spotlight-runner-claude-code:<release> \
--tag ghcr.io/acme/spotlight-runner:<release> .If you write your own Dockerfile, obey these rules:
- Build
FROMSpotlight's runner image. Model discovery and version probes needsh,curl,jqand, for Claude Code,node. The base image has them. - Install as
root, where every user'sPATHfinds the harness. The harness runs as theagentuser. - Install the ACP executable that Spotlight looks for:
claude-agent-acp,codex-acp,cursor-agentoropencode. Theclaudeorcodexcommand line alone is not sufficient.
To check that the image holds the harness, find its executable:
docker run --rm --entrypoint sh ghcr.io/acme/spotlight-runner-claude-code:<release> \
-c 'command -v claude-agent-acp'The command prints the path of the executable. If it prints nothing, the
harness is not on PATH.
Push the image
If more than one machine serves the image, push it to a registry that your hosts can pull from:
docker push ghcr.io/acme/spotlight-runner-claude-code:<release>If the registry is private, set up the hosts as in Pull runner images from a private registry. A host on the machine that built the image can use it without a registry.
Let the hosts serve it
On each host, make your image the default:
spotlight host config set image=ghcr.io/acme/spotlight-runner-claude-code:<release>The first exact entry of image is the default image, which every line that
names no image runs in. The running host applies it at once, to the sandboxes
it starts next.
You can also give the image when you install the host: spotlight host init
asks for it, or takes --image <your image>. Run again, init keeps the image
it saved.
Give the host the key or token for the harness, as in Give hosts your harness keys.
Check that it is served
Open Settings from the workspace menu, then Runners. In the host's row, Harnesses shows the logo of each harness that its images hold.
If Harnesses reads None in red, the images that the host can use hold
no harness. Hover over it for the reason. Check that the first entry of
SPOTLIGHT_RUNNER_IMAGE is your image, and that the host was restarted. The
host log also has the warning
the runner image holds no harness, so it runs checks but no agent run; run spotlight host init in a terminal to build one with a harness.
Rebuild for a new release
A host cannot use an image whose runner is older than the release Spotlight
needs. When your hosts move to a new release, build the image again with
BASE at that release, and update the tag in SPOTLIGHT_RUNNER_IMAGE.
Related
- Harnesses: what Spotlight looks for in an image, and what each harness reads.
- Run a line in your own runner image: add a line's toolchain and dependencies to the image.
- Host settings