Skip to content

Choosing a harness

A harness is the LLM driver — one way of calling a model. Every harness serves every runbook (the output schema is a parameter), so picking one is purely about how you want the model to run: which CLI/SDK, which auth, cloud or local. Select with --harness, env HARNESS, or config harness:; default claudecode.

You want…PickWhy
Zero-setup local reviews (default)claudecodeDrives your claude CLI — subscription auth, git tools, explores beyond the diff
Predictable CI costpydanticOne structured API call, no agentic wandering
The OpenAI/Codex stackcodexcodex exec in a sandbox, OAuth or API key
Local / offline modelspiOllama / LM Studio / vLLM via ~/.pi/agent/models.json — no API key, nothing leaves the machine
To experiment with orchestrationdeepagentsLangChain orchestrator — unstable, may skip the submit tool
HarnessInstallRuns viaAuthStatus
claudecode(core)single claude -p subprocesssubscription or ANTHROPIC_API_KEYstable
codexjunior[codex]single codex exec in sandboxOAuth or OPENAI_API_KEYstable
pydanticjunior[pydantic]single structured pydantic-ai callAPI key requiredstable
deepagentsjunior[deepagents]LangChain orchestrator + subagentsAPI key requiredunstable
pi(core)single pi --mode json subprocessprovider key, auth.json, or none (local models)stable

junior config list harnesses shows what’s installed and ready on your machine; junior config env --harness X lists the exact env vars one needs.

Every harness does a single structured call and returns a validated instance of the runbook’s output schema. They differ in how the schema is enforced and whether the model can read repository files itself (file_access — see Glossary):

pydanticclaudecodecodexdeepagentspi
Diff in user messageYesNo — reads files via toolsNo — reads files via sandboxYesSmall diffs yes; tools beyond
file_accessFalseTrueTrueFalseTrue
File toolsread_file, list_dir, grep (Python)Read, Grep, Glob, Bash(git…) (built-in)Sandbox filesystem accessread_file, ls, grep, glob (via deepagents)read, grep, find, ls (read-only)
Output contractReturns the output schema instance directlyOutput schema via --json-schemaOutput schema via --output-schemasubmit_review tool whose schema is the output modelSchema embedded in system prompt + validated reply
Token usagepydantic-ai usageCLI JSON outputCLI stderrlangchain callbackJSON event stream (per-turn usage)

Small diffs (≤ 50k chars) are inlined for every harness — the diff is the review’s primary evidence; file tools serve for context beyond it.

[!NOTE] --harness / HARNESS / config harness: is canonical. The old --backend / BACKEND / backend: is kept as a deprecated alias for one version.

Per-harness internals (subprocess flags, event parsing, error handling): Claude Code · Codex · Pydantic AI · DeepAgents · Pi. Writing your own is one file — Adding runbooks & harnesses.