The CLI validates trusted configuration, syncs taskpack digest lockfiles, and manages bounded local runs. Install loopwright first via Installation, then use it to prepare, run, inspect, reconcile, or audit capability closure.
- Step 1: Prepare and check
- Step 2: Execute runs
- Step 3: Inspect and recover
- Step 4: Audit closure
- Delegated stepping
- Suites and App
- Runner and evolution
- Exit codes
Scaffold Managed Controller drafts outside the checkout (controller.draft.yaml, registry.draft.yaml, README.draft.md), pin digests.lock.json for Taskpacks, and compile statically:
loopwright init --directory ./loopwright-config
loopwright digest sync --taskpack .loopwright/taskpack.yaml --repo . --check --json
loopwright check --config CONFIG --registry REGISTRY --registry-sha256 DIGEST --json
loopwright run --dry-run --taskpack .loopwright/taskpack.yaml --repo . --json- Drafts: Replace
REVIEW_REQUIREDplaceholders and compute the approvedregistry.yamlSHA-256 before runningcheck. For repositoryTaskpacks, use the bootstrap prompt. - Digest lockfile:
digest synchashespreflight.script,command.v1directories, instructions, and skills (DIGEST_LOCKFILE_DRIFT, exit4on drift). - Static check:
checkandrun --dry-runperform zero preflight, model, or publication calls; managedrun --dry-runrefuses privilege flags.
Run a local Taskpack, launch a Managed Controller cycle, or resume an existing run under identical trusted bindings:
loopwright run --taskpack .loopwright/taskpack.yaml --repo REPO --run-root TRUSTED_ROOT --run-id demo
loopwright run --config CONFIG --registry REGISTRY --registry-sha256 DIGEST --repo REPO --run-root TRUSTED_ROOT --run-id demo
loopwright resume --config CONFIG --registry REGISTRY --registry-sha256 DIGEST --repo REPO --run-root TRUSTED_ROOT --run-id demo- Local taskpack mode:
--taskpackaccepts--mode,--baseline-alignment,--source-revision, and--role-model. PR publication or PR memory fails closed locally (TASKPACK_HOST_BINDING_INVALID). - Dual-key privileges:
run,resume,step next, andstep submitaccept--allow-privilegedand--allow-workflow-writes;runandstepalso accept--allow-host-mounts <csv>. - Diagnostics & decisions:
--output-format(json,github-step-summary,markdown,text) and--step-summary-fileemitRunEval. Enabledspec.decisionswires live adapters with fallback.
loopwright status --run-root TRUSTED_ROOT --run-id demo --json
loopwright inspect --run-root TRUSTED_ROOT --run-id demo --output INSPECTION_DIR --json
loopwright reconcile --config CONFIG --registry REGISTRY --registry-sha256 DIGEST --repo REPO --run-root TRUSTED_ROOT --run-id demo --receipt RECEIPT --jsonInspect state and run-eval.json offline before recovery. Settle any unknown external outcome with its matching authenticated receipt via reconcile; never silently retry uncertain remote effects.
loopwright closure --verify-failures --jsonClosure audits the 23-capability matrix and 14-case failure suite, exiting 0 when valid, 3 on unsupported/falsified capability, 4 on failure-matrix failure, and 8 on integrity failure.
| Disposition | Evidence scope | Meaning |
|---|---|---|
closed_local |
Recorded local evidence | Local criterion and failure matrix passed |
blocked_external |
Unprovisioned external service | Live provider, host, or hardware remains external |
deferred_owned |
Deferred owned capability | Recorded prerequisite remains unimplemented |
Hand delegated roles to host coding agents (see Coding Agents for the full coroutine loop and overlay application):
loopwright step next --taskpack .loopwright/taskpack.yaml --repo REPO --run-root TRUSTED_ROOT --run-id demo --json
loopwright step submit --run-root TRUSTED_ROOT --run-id demo --lease TOKEN --status completed --json
loopwright step cancel --run-root TRUSTED_ROOT --run-id demo --json- Leases & recovery: Submit each single-use
--leasetoken once (--status completed|no_change|failed|blocked, optional--submission-fileor--reason). Pass--reissue-leaseto rotate a lost lease on a parked run. - Model overrides:
check,run,resume, andstep nextaccept up to8repeatable--role-model ROLE=PROVIDER/MODEL[:THINKING]entries (argv <= 64).
Validate multi-domain TaskpackSuite manifests and resolve GitHub Actions matrices or comment commands offline:
loopwright suite check --suite .loopwright/suite.yaml --repo . --verify-digests --json
loopwright suite resolve --suite .loopwright/suite.yaml --repo . --event schedule --schedule nightly --jsonsuite resolve emits { include: [...] } in --json mode, exiting 0 for eligible/deferred/ignored, 2 for schema or unknown --domain errors, and 3 for blocked probes or branch mismatches.
loopwright app-serve --config github-app.yaml --repo . --jsonRequires spec.listen.enabled: true (exit 2 when disabled or invalid; 130/143 on SIGINT/SIGTERM). See GitHub App.
loopwright runner relay --config relay.yaml --json
loopwright runner worker --config worker.yaml --once --jsonrunner relay isolates controller HMAC secrets from worker tokens, enforces leaseEpoch fencing, and streams 1 MiB CAS artifacts so private GPU workers open zero inbound ports. Workers compile Stage A without held_out_workloads and execute Stage B read-only with networkMode: none.
loopwright evolve check --campaign campaign.yaml --repo . --json
loopwright evolve run --campaign campaign.yaml --state ../campaign-state --repo . --json
loopwright evolve status --campaign ../campaign-state --json
loopwright evolve inspect --campaign ../campaign-state --island 0 --json
loopwright evolve resume --campaign ../campaign-state --repo . --json
loopwright evolve export --campaign ../campaign-state --out ../bundle --format oci-layout --jsonKeep --state strictly outside --repo (EVOLUTION_SCHEMA_INVALID, exit 2 otherwise). evolve export verifies every HMAC verdict receipt fail-closed (EXPORT_UNVERIFIED_FORBIDDEN, exit 3) and refuses synthetic_fixture receipts without --allow-synthetic-probe.
| Environment variable | Purpose |
|---|---|
LOOPWRIGHT_BENCHMARK_GATE_URL |
Fallback HTTPS or loopback benchmark-gate.v1 URL for runner relay |
LOOPWRIGHT_GATE_SIGNING_SECRET |
Required HMAC secret for benchmark submission and fail-closed evolve export |
LOOPWRIGHT_GATE_AUTH_TOKEN |
Optional bearer token bound to authCredentialRef on remote relays |
LOOPWRIGHT_MODELS_JSON |
Optional Pi models.json path for custom providers and endpoints |
| Code | Meaning |
|---|---|
0 |
Completed, no change, successful static command, or suite eligible/deferred/ignored |
2 |
Usage, configuration, unknown --domain, or manifest rejected |
3 |
Unsupported capability, blocked work, TEAM_ENVELOPE_VIOLATION, or EXPORT_UNVERIFIED_FORBIDDEN |
4 |
Execution, acceptance, DIGEST_LOCKFILE_DRIFT, or artifact validation failed |
5 |
Allowance or campaign budget exhausted |
6 |
Deadline expired |
7 |
Reconciliation, EVOLUTION_CONFLICT, lease fenced (QUEUE_LEASE_FENCED), or clock drift |
8 |
Authoritative result unavailable, incident, store corruption, or runner teardown failure |
130 / 143 |
Cancellation, pause, or accounted SIGINT / SIGTERM (subject to uncertainty precedence) |
See also — Coding Agents (zero-secret loopwright step loops) · Installation (CLI install and bootstrap prompts) · Controller and Registry (trusted execution bindings)
Next → Managed Controller — populate registry.yaml and controller.yaml end to end.