Harnesses
A harness is the agent CLI a station runs. A station names one by its id in
harness. Spotlight runs four. The runner starts each over the Agent Client
Protocol (ACP), in /workspace, as the agent user. See
ACP versions.
Built-in harnesses
| Claude Code | Cursor | Codex | OpenCode | |
|---|---|---|---|---|
| Id | claude-code | cursor | codex | opencode |
| Name | Claude Code | Cursor CLI | Codex | OpenCode |
| ACP command | claude-agent-acp | cursor-agent acp | codex-acp | opencode acp |
| ACP version | 2 | 1 | 1 | 1 |
| Model binding | ANTHROPIC_MODEL environment variable | --model <model> argument | model in the JSON of CODEX_CONFIG | model in the JSON of OPENCODE_CONFIG_CONTENT, as provider/model |
| Effort binding | CLAUDE_CODE_EFFORT_LEVEL environment variable | appended to the model as <model>[effort=<effort>], when a model is set | model_reasoning_effort in the JSON of CODEX_CONFIG | the ACP session option effort, set when the session opens. See OpenCode effort. |
| Model discovery | GET https://api.anthropic.com/v1/models | cursor-agent models | GET https://api.openai.com/v1/models, ids starting gpt, o<digit> or codex | opencode models |
| Key model discovery sends | ANTHROPIC_API_KEY, else CLAUDE_CODE_OAUTH_TOKEN | none; cursor-agent models signs in by itself | CODEX_API_KEY, else OPENAI_API_KEY | none; opencode models reads the provider keys by itself |
| Version probe | the bundled claude CLI's --version | cursor-agent --version | codex-acp cli -V | opencode --version |
| Skills directory | .claude/skills, read by the harness | .spotlight/skills, listed in the briefing | .spotlight/skills, listed in the briefing | .opencode/skills, read by the harness |
| Native settings format | JSON object | JSON object | config.toml text | JSON object (OpenCode's opencode.json) |
Spotlight's runner image holds no harness. A team installs each harness in its
own image, built FROM that image, or lets spotlight host init build one.
See Installation.
A station names its harness; there is no default, and a station without one
runs nothing. The work stations of the built-in lines
name claude-code.
Harness environment
The runner sets these for the harness, besides the model and effort bindings.
${SPOTLIGHT_STATE_DIR} is /workspace/.spotlight/state.
| Harness | Variable | Value |
|---|---|---|
claude-code | CLAUDE_CONFIG_DIR | ${SPOTLIGHT_STATE_DIR}/claude |
claude-code | CLAUDE_CODE_ENABLE_TELEMETRY | 1 |
claude-code | CLAUDE_CODE_ENHANCED_TELEMETRY_BETA | 1 |
claude-code | OTEL_TRACES_EXPORTER | otlp |
claude-code | OTEL_METRICS_EXPORTER, OTEL_LOGS_EXPORTER | none |
claude-code | OTEL_EXPORTER_OTLP_PROTOCOL | http/json |
claude-code | OTEL_EXPORTER_OTLP_ENDPOINT | the runner's loopback telemetry address |
claude-code | OTEL_TRACES_EXPORT_INTERVAL | 1000 |
codex | CODEX_HOME | ${SPOTLIGHT_STATE_DIR}/codex |
opencode | OPENCODE_DB | ${SPOTLIGHT_STATE_DIR}/opencode.db |
opencode | OPENCODE_DISABLE_AUTOUPDATE | 1 |
opencode | OPENCODE_CONFIG_CONTENT | a JSON object with "share": "disabled" and "autoupdate": false, the model, and the permissions of the harness profile |
OpenCode keeps its sessions in OPENCODE_DB, so a later run can resume the
session.
A harness profile adds the harness's native settings, MCP servers and permission rules. See Inside a sandbox for the rest of the agent's environment.
ACP versions
The runner asks Claude Code for ACP version 2. If claude-agent-acp answers
with version 1, the runner speaks version 1 to it. The runner speaks version 1
to Cursor, Codex and OpenCode.
| The harness reports | Over ACP version 2 | Over ACP version 1 |
|---|---|---|
| Background work: commands, monitors and subagents that still run after a turn ends | Yes | No |
| Turns that the agent starts by itself, for example when background work ends | Yes | No |
| That it waits for a permission | Yes | No |
| Token usage at the end of each turn | Yes | Yes. See Token counts. |
A run waits for background work only when its harness reports it. See Turns without a handover.
Token counts
The runner journals the token usage each harness reports at the end of every turn. Claude Code reports input, output, cache-read and cache-write tokens. Codex reports no cache-write tokens, and its counts cover only the last request of each turn. OpenCode reports input, output, total and cache-read tokens. Cursor's counts are not confirmed. See Spend.
Efforts
Every harness takes the same efforts, from least to most: low, medium,
high, xhigh, max. A station with no effort sets none.
OpenCode effort
OpenCode calls effort levels "variants", and each model has its own set, for
example low, high, max and default. If the model has no variant with
the station's effort, the runner logs
the harness refused an optional setting, so it runs without it and the run
continues without it.
Models
A model id is the first field of each line a harness's discovery command prints, kept when it matches:
^[a-z0-9][a-z0-9._:@/-]*$opencode models prints one provider/model per line, for example
anthropic/claude-sonnet-4-5. It lists the models of each provider that has a
key in the environment, and the free OpenCode Zen models (opencode/...).
A discovery command that fails, or does not finish within 15 seconds, lists no models. Model discovery runs behind an egress, which injects the harness keys into requests to the model endpoints: the keys the host keeps, and the harness keys the workspace holds as secrets.
Harness keys
| Harness | Keys |
|---|---|
claude-code | ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN |
codex | CODEX_API_KEY, OPENAI_API_KEY |
cursor | CURSOR_API_KEY |
opencode | ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY |
A workspace secret with one
of these names is a key of each harness that lists it. Spotlight adds
<NAME>=spotlight-egress:<NAME> to the environment of every run of the
harness, and the run's secrets include the key. A run whose secrets egress
injects goes only to a runner with an egress.
A host learns which keys the workspace holds from
GET /api/hosts/requirements, as harnessKeys. For model discovery, the
host's egress fetches them with the host's pool token or trust, from
POST /api/hosts/harness-keys. Values that Spotlight stores come back sealed
to egress. When the list of held keys changes, the host checks its images
again.
Installation
| Claude Code | Cursor | Codex | OpenCode | |
|---|---|---|---|---|
| Dockerfile | claude-code.Dockerfile | cursor.Dockerfile | codex.Dockerfile | opencode.Dockerfile |
| Installs | npm @anthropic-ai/claude-code and @agentclientprotocol/claude-agent-acp | Cursor's install script, from https://cursor.com/install, into /opt/cursor | npm @agentclientprotocol/codex-acp | npm opencode-ai |
Executable on PATH | claude-agent-acp | cursor-agent, linked at /usr/local/bin/cursor-agent | codex-acp | opencode |
| Build arguments | CLAUDE_CODE_VERSION, CLAUDE_AGENT_ACP_VERSION | none | CODEX_ACP_VERSION | OPENCODE_VERSION, default 1 |
| Credentials | ANTHROPIC_API_KEY, or CLAUDE_CODE_OAUTH_TOKEN from claude setup-token | CURSOR_API_KEY | CODEX_API_KEY or OPENAI_API_KEY. A ChatGPT sign-in is not supported. | the provider's key, for example ANTHROPIC_API_KEY, OPENAI_API_KEY or OPENROUTER_API_KEY, or OPENCODE_API_KEY for OpenCode Zen. A ChatGPT or GitHub Copilot sign-in is not supported. |
The Dockerfiles are in
data-plane/host/internal/harnesses/dockerfiles
in the Spotlight repository. Each takes the build argument BASE, the image
it is built on, with the default ghcr.io/usespotlightai/spotlight-runner:latest.
A version argument has the default latest, except OPENCODE_VERSION, which
is 1, CLAUDE_CODE_VERSION, which is 2.1.323, and
CLAUDE_AGENT_ACP_VERSION, which is 0.107.0.
Spotlight supports OpenCode major version 1. The npm dev tag of
opencode-ai publishes version 2, which Spotlight does not support. An image built from one Dockerfile
can be the BASE of another, so that one image holds more than one harness.
spotlight host init, with no flags in a terminal, builds one image on the
machine from the Dockerfiles of the harnesses picked, with BASE set to
ghcr.io/usespotlightai/spotlight-runner:<release> at the binary's release.
Its tag is spotlight-harnesses:<release>-<harness ids>, as in
spotlight-harnesses:0.1.0-claude-code-codex. The host does not pull an image
that exists only on its machine.
The claude and codex command lines alone do not count as installed.
Model discovery and version probes run sh, curl, jq and, for Claude
Code, node. Spotlight's runner image contains them. See
Install a harness in your runner image
for the steps, and Harness keys
for the credentials egress keeps.
Installed harnesses
A harness counts as installed in an image when its ACP executable
(claude-agent-acp, cursor-agent, codex-acp or opencode) is on PATH. The host
runs spotlight runner harnesses '<json>' in each image it supports, within 2
minutes, and reports each installed harness with its models and version. The
Runners page shows them.
A run goes only to an image that holds its station's harness. An image that
holds no harness still runs change-stack checks, but no agent run. If an image
changes and no longer holds the harness, the run fails with
Runner image <digest> no longer has the <harness> harness.
For each image that it can use and that holds no harness, the host logs
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.
When all the images that a host can use hold no harness, the
Runners page shows "None" in
red under "Harnesses".
Versions
A harness's version is the one built into the runner image. The image digest pins it. To install a particular version, set the version build arguments of the Dockerfile. Cursor's install script installs Cursor's latest release.
Spotlight's runner image is built from .docker/runner/Dockerfile in the
Spotlight repository, with this
build argument:
| Argument | Default | Installs |
|---|---|---|
TERRAFORM_VERSION | 1.16.4 | Terraform |
See Run a line in your own runner image for an image with a line's own tools.