# Harnesses A harness is the agent CLI that does the work inside your sandbox. HareBox runs it non-interactively as the sandbox's `user` account, streams what it does as events, keeps its session with the conversation, and stops it when a budget runs out. ```sh harebox harnesses ``` | ID | Harness | How HareBox drives it | In the base image | |---|---|---|---| | `claude` | Claude Code | `claude -p` with its stream-json output | Yes | | `codex` | OpenAI Codex | `codex exec --json` | Yes | | `opencode` | OpenCode | `opencode run --format json` | Yes | | `shell` | Runs the prompt as a command | Directly; needs no model | Always | | `pi` | pi | Simulated adapter | Yes | | `openclaw` | OpenClaw | Simulated adapter | Yes | | `kimi` | Kimi Code | Simulated adapter | On first use | | `mistral` | Mistral Vibe | Simulated adapter | On first use | | `hermes` | Hermes | Simulated adapter | On first use | | `prime` | Prime Agent | Simulated adapter | On first use | | `cursor` | Cursor CLI | Simulated adapter | On first use | > **Status:** on real machines, `claude`, `codex` and `opencode` run the real CLI in the sandbox, and their adapters are tested against each CLI's event format. A turn needs a model key, connected as described in [Credentials proxy](credentials-proxy.html). The other harnesses keep their simulated adapters, which stream a scripted turn and report `simulated: true`, until each has a tested adapter. On the labelled simulator, every harness except `shell` is simulated. **Simulated adapters don't call any model.** ## What a turn does 1. HareBox checks that the CLI exists in the sandbox. If it doesn't, the turn fails with an install hint. 2. It runs the CLI as `user`, in `/home/user`, with the sandbox's environment. Model keys arrive only as credential-proxy placeholders, so the real key never enters the machine. 3. Text, tool calls and token usage stream as `prompt.*` events. 4. The CLI's session ID is saved with the conversation, so the next prompt in it resumes the same session, after a stop or in a fork. ## Options | Field | CLI flag | Used by | |---|---|---| | `model` | `--model` | All. Leave it out, or send `default`, for the harness's own default | | `reasoning_effort` | `--effort` | Codex (`low`, `medium`, `high`) | | `attachments` | | All: files are put in `~/.harebox/attachments//` and named in the prompt | | `budget_usd` | `--budget` | All. The turn stops when its spend reaches this | ## Adding a harness Install any CLI with `harebox-harness install NAME` (needs the sandbox's network), or run your own agent with `harebox exec`. See [Customize](customize.html).