Skip to content

corral-harness

Generated by scripts/gen-cli-docs.sh from corral-harness’s own -h output and its main.go doc comment. Do not hand-edit — run scripts/gen-cli-docs.sh and commit the result.

corral-harness — loops a headless coding agent (Claude Code, Gemini CLI, Codex, ...) as a swarm bee over MCP
Usage:
corral-harness claim one task, work it, complete it, exit
corral-harness -h print this help and exit
Env:
CORRAL_BRAIN brain URL (default http://localhost:9019)
AGENT_NAME swarm name (default Harness)
AGENT_ROLE role(s) to serve (default generalist): a single role, a
comma-separated list (e.g. "mutant-generator,test-writer,test-critic") to
claim any ready task in that set, or "any"/"*"/empty to
claim ANY ready task as a pure generalist
AGENT_MODEL the model driving this harness (e.g. gpt-5.1-codex); adds a
report_host step so findings attribute to it in model_comparison
AGENT_BACKEND the backend/vendor for AGENT_MODEL (e.g. openai, anthropic, gemini)
AGENT_WORKSPACE working directory for the harness (default .)
HARNESS_CMD command template; placeholders: {prompt} {mcp_config} {brain}
e.g. claude -p {prompt} --mcp-config {mcp_config} \
--allowedTools "mcp__corral__*,Read,Write,Edit,Bash" \
--permission-mode acceptEdits
HARNESS_DESC how to announce this harness (default derived from HARNESS_CMD)
AGENT_ROUNDS max tasks to run, 0 = forever (default 0)
HARNESS_TIMEOUT_SECONDS per-invocation kill deadline (default 900)
HARNESS_IDLE_SECONDS backoff when the queue is empty (default 30)
AGENT_PROMPT_FILE optional file replacing the built-in bee prompt; the same
placeholders are substituted into it