Choosing the harness and model
Every run uses one harness, and a model that the harness serves. Flags choose them for one run, targets in your configuration choose them every time, and when nothing chooses, Pandra picks the harness it finds. Pandra runs a harness already on your PATH, or installs one itself (which installation runs).
Choosing for one run
# a harness, with its own default model, effort, and login
pandra run github.com/acme/changelog@v2.0.0 --harness codex
# a harness, model, and prompt
pandra run github.com/acme/reviewer@v1.2.0 --harness claude-code \
--model claude-opus-5-5 --prompt "Review PR 12."
# a target from your configuration
pandra run github.com/acme/reviewer@v1.2.0 --target claude-work \
--prompt "Review PR 12."--harnesstakesclaude-code,codex, orpi.- Without
--model, the harness chooses the model. --providertakesanthropicon Claude Code,openaion Codex, and any provider Pi knows on Pi, where it needs a model (Pi).--efforttakeslow,medium,high,xhigh, ormax. A model that lacks the level runs at the nearest one it has, with the warningeffort_adjusted, and a run never fails because of its effort.
Every option is in the pandra run reference.
What decides a run
The harness, provider, model, effort, and credentials come from one target, the first of these that applies:
--target NAME- the agent's target, set with
pandra config target use NAME --agent AGENT defaults.target, set withpandra config target use NAME- none: the harness's own defaults, on the harness Pandra finds (which harness runs)
On the target chosen, --model and --effort replace that key. A --harness or --provider that differs from the agent's target or defaults.target drops that target, so the run uses the harness's defaults. Next to an explicit --target, a differing value is a usage error, with exit code 2:
error: --harness codex conflicts with --target deep, whose harness is claude-code--dry-run shows what decided each value (dry runs).
Which harness runs
With no target and no --harness, Pandra uses the harness it finds:
| Pandra finds | On a terminal | Without a terminal |
|---|---|---|
One supported harness: on PATH, pinned, or installed by Pandra | Uses it | Uses it |
| Several | Asks which one, then whether to make it the default target from now on; --yes never answers that, because it changes your configuration | Fails with harness_ambiguous |
| None | Asks which one to install, and installs its newest stable release | Fails with harness_not_found, which gives the pandra harness install command |
In a CI job, which has no terminal, a run with several harnesses installed fails:
$ pandra run . --prompt "Review PR 12."
error: several harnesses are installed (claude-code, codex); choose one with --harness
To run it on the harness you choose:
pandra run . --harness HARNESS --headless --prompt 'Review PR 12.'Which installation runs
For the selected harness, a run uses the first of these that applies:
A pin: a version written by
pandra harness use, or--harness-versionfor one run, which Pandra downloads and verifies on first use; or a program pinned withpandra harness use NAME --path PATH.The harness on
PATH, when Pandra supports its version.The newest version Pandra installed.
None of these: on a terminal, the run asks before it downloads, and
--yesanswers the question:textclaude-code is not installed. ? Install the latest (2.1.326, about 370 MB) now? [Y/n]Without a terminal and without
--yes, the run fails before anything starts and points atpandra harness install claude-code.
To never download a harness automatically, for example in an image that must not download at start, run pandra config set harnesses.downloads manual. A run then never offers to install one, and a pinned version that is not installed fails until you install it with pandra harness install.
Installing and pinning versions
To install a harness and keep every run on that version:
$ pandra harness install claude-code
Installed claude-code 2.1.317
In use: claude-code 2.1.285 on PATH
To use 2.1.317 in every run:
pandra harness use claude-code@2.1.317
$ pandra harness use claude-code@2.1.317
$ pandra harness list
HARNESS VERSION SOURCE PANDRA SUPPORT IN USE
claude-code 2.1.317 managed yes yes (pinned)
claude-code 2.1.285 PATH yes noA run on a pinned version starts sooner, because Pandra runs a harness on PATH with --version before every run to check that it supports it. A version older than Pandra supports is an error; newer versions run without a warning.
pandra harness use NAME --path PATHpins a program instead, andpandra harness unuse NAMEstops pinning.pandra harness installwith no name installs every version your configuration pins.pandra harness remove NAME@VERSIONremoves an installation Pandra made, never the one onPATH, and keeps the pin.
The pandra harness reference has every option. On Alpine and other musl systems, Pi is installed with npm (Pi).
Passing harness arguments
Arguments after -- go to the harness that the run selects. --add-dir is a Claude Code option, so this run selects Claude Code:
pandra run . --harness claude-code --prompt "Update the docs." -- \
--add-dir /home/me/shared-docsPandra rejects arguments that repeat the ones it supplies itself, and a target's args work the same way:
$ pandra run . --harness claude-code --prompt "Update the docs." -- --permission-mode plan
error: . cannot start: 1 problem
the harness arguments repeat flags Pandra owns: --permission-mode
To run it without the options the checks refused:
pandra run . --harness claude-code --tui --prompt 'Update the docs.'How the harnesses differ
| Claude Code | Codex | Pi | |
|---|---|---|---|
Providers (--provider) | anthropic | openai | Any provider Pi knows, with a model; anthropic, openai, and openrouter also take a target credential |
| Login Pandra reuses | Claude Code's own login, API key and token environment variables | auth.json, the provider your ~/.codex/config.toml selects, CODEX_ACCESS_TOKEN, and CODEX_API_KEY; not a login only in the OS keyring | auth.json, models.json, API key and token environment variables |
--effort becomes | --effort | model_reasoning_effort | --thinking |
| Permission checks | Automatic review | Automatic review of requests to leave its sandbox | None, so a run needs bypass or read-only |
| Background work in a headless run | The run waits for it (background work) | Stopped when the turn ends | None; a command detached with & or nohup keeps running after the run |
| Skill name | /superpowers:brainstorming | $superpowers:brainstorming | brainstorming |
| Kept out of the run | The workspace's settings, hooks, MCP servers, and instructions files | The workspace's AGENTS.md, .codex/ configuration, hooks, rules, and skills | The AGENTS.md and CLAUDE.md files of the workspace and its parents, and the workspace's Pi resources |
[harnesses.<name>.settings] goes into | settings.json | config.toml | settings.json |
Settings for one harness go under [harnesses.<name>] in your configuration (harness programs and runners). The instructions files of your home and of the repository reach a run only when you add the instructions your harness reads.