r1 run
Run a task end to end. Drives the four-phase loop and writes a signed receipt at the COMMIT transition.
r1 run <task> [--implementer model] [--reviewer model] [--budget USD] [--no-verify]
| flag | description |
--implementer | Override the default implementer model. Family is read from the registry. |
--reviewer | Override the default reviewer. Must be a different family unless --allow-same-family is also passed. |
--budget | Halt the run before exceeding the named USD ceiling. Per-task ceilings stack on per-workspace. |
--no-verify | Skip the VERIFY phase. Recorded in the receipt; the receipt carries an unverified flag. |
--receipt-out | Write the receipt to the named path. Default: .r1/receipts/<timestamp>.json. |
r1 run "Add rate-limit middleware to /auth"
r1 run "Refactor billing.js" --reviewer gpt-4o --budget 2.50
r1 daemon
Start and operate the long-running R1 process. Daemon mode persists queue state and the append-only WAL to disk, exposes an HTTP control plane, and lets operators change worker count without restarting the process.
r1 daemon [start|enqueue|status|workers|pause|resume|wal|tasks] ...
| flag | description |
start | Boot the daemon, restore queue and WAL state, and begin polling the worker pool. |
enqueue | Submit a new task to the persisted queue. The queue tracks estimate, priority, and underdelivery outcomes. |
workers | Resize the worker pool at runtime. |
pause / resume | Temporarily halt scheduling and later restore the prior worker count. |
wal | Inspect the append-only ndjson log of INTENT, DONE, and BLOCKED transitions. |
tasks | List, inspect, or cancel queued and running tasks through the daemon control plane. |
r1 daemon start --listen 127.0.0.1:4317
r1 daemon enqueue "Run the invoice reconciliation playbook"
r1 daemon workers --set 10
r1 daemon wal --tail 40
For the operator model and HTTP endpoints, read /daemon-mode/.
r1 resume
Resume a halted session by receipt id or by the most recent halt.
r1 resume [<receipt-id>] [--from phase]
| flag | description |
--from | Resume from a specific phase: plan, execute, verify, commit. Default: the phase that halted. |
--list | List resumable receipts and their halt reasons. |
r1 resume --list
r1 resume r-2026-04-24-08-13-09 --from verify
r1 inspect
Open a TUI over a receipt. Walk events, filter by phase or tier, jump to artifacts.
r1 inspect <receipt-path> [--filter phase=verify]
| flag | description |
--filter | Pre-filter events. Repeatable. Examples: phase=verify, type=TOOL_CALL, tier=L2. |
--json | Emit a non-interactive JSON dump matching the inspector's view. |
r1 inspect .r1/receipts/2026-04-24T08-13-09Z.json
r1 inspect <receipt> --filter phase=verify --json | jq
r1 receipt verify
Verify the signature, canonicalisation, and event-graph integrity of a STOKE receipt.
r1 receipt verify <receipt-path> [--key-id kid]
| flag | description |
--key-id | Override the key id. Default: read from the receipt header. |
--strict | Fail on any unknown event type. Useful when verifying receipts from older clients. |
r1 receipt verify ./shared/receipt.json
r1 receipt verify ./shared/receipt.json --strict
r1 init
Initialise an R1 workspace inside the current directory. Creates .r1/ and registers local skills.
r1 init [--template name] [--no-skills]
r1 skills
List, install, and manage skills. {{TBD-cli-full-surface}}
r1 skills [list|install|remove] ...
r1 memory
Inspect and manipulate the L0..L3 memory tiers. {{TBD-cli-full-surface}}
r1 memory [show|prune|export] ...
r1 config
Read and write workspace and user-level configuration. {{TBD-cli-full-surface}}
r1 config [get|set|list] [key] [value]
Exit codes
| code | meaning |
0 | task shipped (COMMIT phase reached). |
1 | generic failure; see stderr. |
2 | gate blocked the run; receipt names the gate. |
3 | budget exceeded. |
4 | cross-family review unavailable; pass --allow-same-family to override. |
Environment
| variable | purpose |
R1_HOME | Workspace directory. Default: ./.r1. STOKE_HOME is accepted for the rename window (90 days). |
ANTHROPIC_API_KEY | Anthropic family key. |
OPENAI_API_KEY | OpenAI family key. |
R1_DEFAULT_BUDGET | Default per-task budget in USD. |
R1_RECEIPT_KEY | Path to the Ed25519 signing key. If absent, an ephemeral key is generated and the kid noted in the receipt. |