Agents
Supported Agents
Overview of the four coding agent backends harness supports
Harness supports four coding agent CLIs. Each has its own adapter that translates the agent's native output into the unified event stream.
Agent comparison
| Feature | Claude Code | Codex | OpenCode | Cursor |
|---|---|---|---|---|
| Binary | claude | codex | opencode | cursor-agent |
| Provider | Anthropic | OpenAI | Multi | Multi |
| Headless flag | -p | exec | run | -p |
| Native format | NDJSON | JSONL | NDJSON | NDJSON |
| Model flag | --model | --model | --model | --model |
| Resume support | Yes | Yes | Yes | Yes |
| Full-access mode | --dangerously-skip-permissions | --sandbox danger-full-access | Default | --force |
| Read-only mode | --permission-mode plan | --sandbox read-only | --agent plan | --mode plan |
Auto-detection
If you omit --agent, harness will:
- Check your project config (
harness.toml) - Check legacy config files
- Scan for available agents — if exactly one is installed, use it
- Error if multiple agents are found (you must specify)
Binary resolution
For each agent, harness searches for the binary in this order:
- Explicit path from
--binaryflag or config - Project config (
harness.toml) agent-specific binary path - Legacy settings file
- PATH lookup using all candidate binary names