O1: Rust crate, profiles and persistent run state machine #2

Closed
opened 2026-11-12 23:12:58 +00:00 by hermes · 0 comments
Collaborator

orch is an orchestrator that runs many hx coding agents (Rust harness, one-shot via hx -p TEXT --mode json = NDJSON events on stdout, or --mode rpc = JSON-RPC over stdio; flags --sandbox, --session FILE, --provider, --yolo; hx stats shows token usage). It must work for work and private use, so it is not tied to any git host. Rewrite the O0 spike in Rust (cargo workspace, small deps: serde, toml, tokio, clap).

  • Profile file ~/.config/orch/profiles/NAME.toml: source, repos, provider and HOME dir (separate auth per profile, e.g. work vs private), budget (max turns, tokens, wall time), sandbox mode, permission allowlist, gate command.
  • Run state machine: queued -> running -> gating -> retry (max N) -> done, failed or needs-human. One JSON state file per run, survives restarts.
  • CLI: orch run TASK, orch status, orch logs ID.

Acceptance: kill orch mid-run, restart, status is correct; tests use a fake hx.

orch is an orchestrator that runs many `hx` coding agents (Rust harness, one-shot via `hx -p TEXT --mode json` = NDJSON events on stdout, or `--mode rpc` = JSON-RPC over stdio; flags `--sandbox`, `--session FILE`, `--provider`, `--yolo`; `hx stats` shows token usage). It must work for work and private use, so it is not tied to any git host. Rewrite the O0 spike in Rust (cargo workspace, small deps: serde, toml, tokio, clap). - Profile file `~/.config/orch/profiles/NAME.toml`: source, repos, provider and HOME dir (separate auth per profile, e.g. work vs private), budget (max turns, tokens, wall time), sandbox mode, permission allowlist, gate command. - Run state machine: queued -> running -> gating -> retry (max N) -> done, failed or needs-human. One JSON state file per run, survives restarts. - CLI: `orch run TASK`, `orch status`, `orch logs ID`. Acceptance: kill orch mid-run, restart, status is correct; tests use a fake hx.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: johannes/orch#2