Skip to main content
Command-line reference | HarnessCommands, common option groups, output streams, and exit statuses.Harnessreferenceharnessreferenceadopterdeveloperoperatorreference

Command-line reference

The installed binary is b10x-harness. Its generated --help output is the canonical reference for the exact argv accepted by a particular build:

b10x-harness --help
b10x-harness run --help

The repository pins that generated command-line surface as a versioned contract; the current pin is contracts/cli/b10x-harness/2026-09-02. A released version — one reachable on origin/main — never changes, and a changed surface cuts the next one. This page groups the options by task rather than copying every help paragraph.

Commands

CommandPurpose
runRun one request to completion
chatRead one line at a time over the same local session
workflowWorkflow command group
workflow planValidate a workflow document and print what runs in what order, without an endpoint
workflow runWalk a workflow document: one turn per step, one session per section
sessionsList local sessions newest first
toolsPrint the catalogue, skills and agents this machine would publish, without a model call
context showAssemble context and print its body-free manifest, or the explicit model-facing body
profilesProfile command group
profiles listList configured profile names
profiles showPrint one profile
profiles explainResolve profile layers to argv without contacting a model
profiles initWrite a commented starter configuration
providersProvider command group
providers listList built-in and overridden providers
providers showPrint one effective provider, including credential and renewal facts
toolchainsDeclarative toolchain command group
toolchains listList built-in and explicitly loaded custom providers
toolchains showPrint one validated provider definition and body-free provenance
toolchains validateValidate custom YAML specifications against built-ins and each other
app-serverServe one Codex app-server-compatible JSON-RPC connection over stdio
eventsConvert a Harness JSONL record into metaharness.event/1

Global options

OptionMeaning
--helpPrint help for the selected command
--versionPrint the binary version

Profiles

OptionMeaning
-p, --profile NAMEApply a profile from ~/.config/b10x/harness.toml; repeatable, later wins

A provider carries the endpoint, wire, model and credential source and grants nothing, so the collection ships built in. A profile carries write, the approval ceiling, the allow-list and the write scope, and nothing of that shape is compiled in. A typed flag beats both, and typing --base-url opts out of the provider bundle entirely. session.started names every profile that contributed with a digest of what it said. See Configuration reference.

Endpoint and wire

OptionMeaning
--base-url URLEndpoint origin plus API prefix. Optional where a provider supplies one
--model IDExact identifier served by the endpoint. Optional where a provider supplies one
--wire openai-responses|anthropic-messagesProvider API projection; defaults to openai-responses
--context-window TOKENSRequest bound and compaction input; defaults to 128000
--temperature, --top-p, --reasoning-effortOptional sampling values; omitted from the request when unset

Credentials

API-key and OAuth sources are mutually exclusive.

OptionMeaning
--api-key-file PATHRead a bearer API key from the named file
--api-key-env NAMERead it from the named environment variable
--oauth-token-file PATHRe-read a subscription token file per model call
--oauth-token-env NAMERead the subscription token from the named variable
--oauth-token-pointer POINTERSelect a token inside a JSON OAuth source

Harness searches no ambient default. A provider may default a credential path — that is what makes provider = "claude" enough on its own — and a run that took one reports credential_source: "provider:<name>", so the default is visible in the record rather than silent. A credential you name yourself always wins and records its class and source kind — for example "api-key:file" or "oauth:environment" — without recording the path, variable name or secret. Naming none records "none".

Workspace and tools

OptionMeaning
--workspace PATHRoot visible to workspace tools; defaults to .
--surface flat|verbsPublish entries directly or under three catalogue verbs
--context FILEPreload a file; repeatable
--instructions-file FILEAdd operator instructions beside the harness's immutable guidance
--no-project-instructionsOmit AGENTS.md or CLAUDE.md from the standing instruction
--write-scope GLOB=SCOPERestrict matching paths; repeatable, first match wins
--scope-announce stated|silentTell the model the write restrictions or test the gate silently
--execution-path direct|metaharnessTell the model whether this native loop was launched directly or as a metaharness comparison arm; grants no authority

Outbound MCP

run, chat, workflow run, and tools accept the same reviewed outbound surface.

OptionMeaning
--mcp-profile FILEPublish the explicit subset in one Harness authority profile; repeatable
--mcp-registry FILEOverride the shared b10x-mcp registry; requires at least one profile

The profile pins the registry SHA-256 and exact frozen tools/list snapshot, then supplies local names, reviewed descriptions, envelopes, and subjects. Discovery and server annotations grant nothing on their own. Preparation refuses digest drift and name collisions before the first model request; every admitted call still uses the normal approver, hooks, deadline, and result bound. The standalone b10x-mcp config check, connections check, and tools snapshot commands provide the review inputs. See design 0005 in the source repository for the strict TOML shape.

Skills and agents

Both run and tools take these. Each is repeatable, and a named directory that is not there refuses the run by name, as --context does.

OptionMeaning
--skills-dir DIROffer every DIR/<name>/SKILL.md as a skill: its description in the standing instruction, its body only when the model calls the skill tool by name
--agents-dir DIROffer every DIR/<name>.md as a named agent a delegate call may pick; needs --delegate
--plugin-dir DIR--skills-dir DIR/skills plus --agents-dir DIR/agents, each name qualified <plugin>:<name> from DIR/.claude-plugin/plugin.json

The layout is the one Claude Code writes, so a plugin written for it runs here unchanged. The frontmatter reader takes top-level key: value lines and nothing else: a document using a key this build does not read refuses the run rather than being half-read. An agent's tools: list uses the vendor's names — Read, Grep, Glob, Bash, Write, Edit, LS — and a name outside that table refuses the document, as does tools: []. See Structured runs, delegates and hooks for what an agent may and may not do.

Confinement

OptionMeaning
--substrate SOCKETUse a substrate daemon
--substrate-embeddedHold a local substrate driver in this process
--workspace-id IDSelect a daemon workspace
--cgroup-root PATHName a delegated cgroup root for embedded execution
--driver PATHStage one host executable read-only at /toolchain/driver and admit that mounted path
--allow-program NAMEAdmit one root executable as argv[0]; repeatable. Descendants are not re-matched and remain confined with the root process
--process-write-subtree DIRGive confined child processes exact write access to one workspace-relative directory; repeatable. With none, their workspace is read-only
--toolchain auto|NAME[,NAME...]Discover matching providers or select providers explicitly
--toolchain-spec FILELoad an additive custom provider document explicitly; repeatable and never workspace-discovered

See Confined workspaces for prerequisites.

Context inspection

b10x-harness context show assembles the same typed context layers without starting a model turn. It prints a body-free provenance manifest by default; --json makes that manifest machine-readable, and --body explicitly prints the model-facing rendering. Digests, byte counts, timestamps and cache classes stay out of the model prompt. The prompt carries only semantic kind and trust, plus a source path where knowing the document's identity can improve the answer.

Approvals

OptionMeaning
--approve auto|prompt|deny|allWho decides a call above the ceiling
--approve-up-to low|medium|high|destructiveHighest risk that runs without asking
--yesSame as --approve all; cannot combine with --approve-up-to

Budgets and accounting

OptionMeaning
--max-turns NTotal model-turn ceiling
--max-output-tokens NTotal reported output-token ceiling
--max-output-tokens-per-turn NMaximum offered to one turn
--max-duration-ms NWall-clock ceiling
--prices FILEDated JSON rate card used for cost reporting
--max-cost-microunits NSpend ceiling in millionths of a US dollar; requires --prices

Sessions and output

OptionMeaning
--session-dir PATHOverride the local session directory
--resume ID|latestContinue a stored conversation
--no-sessionWrite no session file
--jsonWrite one JSON event per stdout line
--quietHide progress from stderr; warnings remain
--output-schema FILEMake run finish with one structured object

--output-schema belongs only to run: an open-ended chat conversation has no single final object, and workflow run derives one schema per step for itself.

Advanced loop features

OptionMeaning
--delegatePublish one fresh-context sub-agent tool; with agents offered, a call may name one
--delegate-turns NCap one delegate; default 20, minimum 1
--delegate-parallel NCap neighbouring delegates that may run together; default 4, minimum 1
--hooks FILELoad explicitly named operator hook programs

Under workflow run, --hooks also accepts on: "transition", asked before a section is entered and after it leaves. See Workflow reference.

Workflows

OptionMeaning
--flow FILEThe workflow document; YAML or JSON, decided by extension
--input TEXTThe task, given to every step beside its own prompt — the same word run uses
--max-attempts NOverride every repeat.max in the document, the root's included; absent means the document's own bounds

workflow plan accepts --flow and --max-attempts only, and contacts no endpoint. workflow run takes the option groups above — endpoint, credentials, workspace, confinement, approvals, budgets, sessions — and refuses --resume by name, because a flow names its own sessions. --output-schema is not a flag of workflow run at all: the runner derives the schema each step answers under, so typing it is an unrecognised argument rather than a refusal. Step budgets (--max-turns, --max-output-tokens, --max-output-tokens-per-turn) bound one step; --max-cost-microunits and --max-duration-ms bound the whole flow.

Standard streams

Modestdoutstderr
DefaultStreamed answer textProgress, reasoning summary, calls, usage, warnings, session ID
--output-schemaOne compact JSON object on completed successModel prose and normal progress
--jsonJSONL event streamPre-loop failures and session diagnostics where applicable

Under --json, a refusal before the loop starts is one {"kind":"refused","reason":"..."} line and exit status 1.

The events converter reads its Harness JSONL record from --in FILE and writes the projected record to --out FILE.

Exit status

StatusCaller actionUnder workflow run
0Consume the completed answer, or inspect a typed handoffThe flow came out clean, or stopped at an operator step with terminal flow-paused
2Inspect the named stop: a budget, cancellation, or unstructured result bound the runThe flow finished and did not come out clean: a failed step, a skipped or exhausted section, or a cancelled run. Inspect flow-finished
1Treat it as a configuration, credential, confinement, transport, or protocol failureRefused before the flow started, or aborted mid-step on a loop error

workflow plan exits 0 when the document validates and 1 when it does not.

Clap parse errors are normalized to status 1 by this command because status 2 already means a run that started and stopped.