hi is an agentic coding tool written in Rust. Point it at any model — local or remote — and it reads, writes, and edits files and runs shell commands in your project to do what you ask.
Its distinguishing feature is verification-in-the-loop: give it a test command and it runs the model, checks the result, feeds failures back, and iterates until the tests pass — something a single-shot completion endpoint structurally can't do.
Workspace version 0.3.1 continues the post-0.2 core API. The intentional
0.2 break (CLI, report, and benchmark schema) is documented in the
0.2 migration guide. For crate layout — interactive
agent vs RSI control-plane — see docs/architecture.md.
GPU and local-inference crates (hi-mlx, hi-cuda, hi-local,
hi-local-core, and hi-gguf) remain separately versioned from the core
workspace members.
# Fix failing tests with a local model, iterating until green:
hi "the tests in test_parser.py are failing — fix the parser"cargo build --release # fast core binary at target/release/hi
cargo build --release --features voice # include microphone + local Whisper
cargo install --path crates/hi-cli --locked
# OpenRouter (default endpoint)
HI_API_KEY=sk-or-... hi -m anthropic/claude-sonnet-4 "add a --json flag to the CLI"
# pipenetwork.ai (OpenAI-compatible coding endpoint; defaults to ipop/coder-balanced)
PIPENETWORK_API_KEY=... hi --provider pipenetwork "add a --json flag to the CLI"
# A local Ollama model (no API key needed)
hi --provider ollama -m qwen2.5-coder "..."
# Native Anthropic
HI_API_KEY=sk-ant-... hi --provider anthropic -m claude-sonnet-4-20250514 "..."
# xAI (Grok); defaults to grok-4.3
XAI_API_KEY=xai-... hi --provider xai "add a --json flag to the CLI"--provider accepts openai (any OpenAI-compatible URL), anthropic, pipenetwork, ollama, and xai. All but the first two are presets that set the right base URL, key env var, and — for pipenetwork and xai — a default model, so they work with no extra flags.
Run with no prompt for an interactive session; pass a prompt for one-shot. Piped stdin is folded into a one-shot prompt as context, so hi composes with other tools:
cargo test 2>&1 | hi "fix the failing tests"
cat error.log | hi "what's going wrong here?"
cat data.json | hi -q "extract every email address" | sort -u # -q: text only, no chatterOne OpenAI-compatible client covers OpenRouter, pipenetwork.ai, xAI (Grok), Ollama, llama.cpp, LM Studio, and vLLM — they differ only by --base-url and --api-key. A native Anthropic adapter (--provider anthropic) adds extended thinking and tool-use blocks.
Settings resolve in this order: CLI flags → profile → environment → defaults.
| What | Flag | Env | Default |
|---|---|---|---|
| Model | -m, --model |
HI_MODEL |
— (required) |
| Base URL | --base-url |
HI_BASE_URL |
OpenRouter / api.anthropic.com |
| API key | --api-key |
HI_API_KEY, then provider-specific (OPENROUTER_API_KEY / OPENAI_API_KEY / ANTHROPIC_API_KEY / PIPENETWORK_API_KEY / OLLAMA_API_KEY / XAI_API_KEY) |
— (required; Ollama ignores it) |
| Tool mode | --tool-mode |
— | auto |
| Compatibility | --compat |
— | auto |
Keep several models on hand in ./hi.toml or ~/.config/hi/config.toml and use one with -p at startup or /provider mid-session:
default_profile = "sonnet"
[profiles.sonnet]
provider = "anthropic"
model = "claude-sonnet-4-20250514"
api_key_env = "ANTHROPIC_API_KEY"
[profiles.local]
provider = "ollama"
# no model field — set one later with /model/provider <name> changes the active profile (base URL, API key, wire format) mid-session, then opens the model picker over the live model list. The model field is optional and can be set later with /model. /provider add creates a new profile interactively (in the TUI, a form with provider picker, API key, model, and base URL fields); /provider edit [name] modifies an existing one. Both write to your config file.
Give a profile a fallback list (or pass --fallback <profile>, repeatable); if a turn needs another configured profile, hi announces the handoff and retries there:
default_profile = "cloud"
[profiles.cloud]
provider = "pipenetwork"
api_key = "..."
fallback = ["local"] # → falls back to the `local` profile
[profiles.local]
provider = "ollama"
model = "qwen2.5-coder"OpenAI-compatible endpoints vary in how much of Chat Completions they implement. The default --compat auto retries common simpler shapes, such as retrying without streamed usage metadata when a provider rejects stream_options. Tool calling is not silently downgraded: if a request advertises tools and the provider rejects them, the turn fails fast instead of continuing chat-only. Use --compat strict to send only the initial request shape. Tool availability is controlled separately with --tool-mode auto|required|chat-only|read-only.
| Env | Controls | Default |
|---|---|---|
HI_TUI_WATCHDOG_SECS |
Soft TUI "still waiting" notice (does not mark the model degraded) | 180s |
HI_DEBUG_STREAM |
1 dumps raw provider bytes for diagnosing one that returns nothing |
off |
HI_GLOBAL_PROCESS_CONCURRENCY |
Shared cross-process cap per setup/model/verifier resource class | adaptive, 2–4 |
HI_GLOBAL_DELEGATE_CONCURRENCY |
Delegate-specific global cap | 4 |
HI_PARALLEL_DELEGATES |
Maximum delegates admitted in one agent tool wave | 4, max 16 |
HI_DELEGATE_SESSION_LIMIT |
Delegate budget for one agent session | 4, max 16 |
HI_BESTOF_VERIFY_CONCURRENCY |
Parallel best-of parent verification jobs | adaptive |
HI_DELEGATE_QUEUE_TIMEOUT_SECS |
Maximum wait for delegate capacity | 600s |
HI_DELEGATE_TIMEOUT_SECS |
Delegate child execution timeout | 600s |
HI_VERIFIER_QUEUE_TIMEOUT_SECS |
Maximum wait for shared verifier capacity | 120s |
HI_SCHEDULER_PRESET |
conservative, balanced, or throughput orchestration policy |
balanced |
HI_ADAPTIVE_SCHEDULER |
Set 0 to disable adaptive admission |
on |
HI_WARM_WORKERS |
Set 0 to disable warm worker reuse |
on |
hi-local serves GGUF and MLX models through the same OpenAI-compatible /v1/chat/completions, /v1/models, and /health API that hi --provider openai can use.
# CUDA GGUF backend on NVIDIA/Linux
cargo run -p hi-local -- serve /models/tinyllama/model.gguf \
--backend cuda --host 127.0.0.1 --port 8080 --model-id local/tinyllama
HI_API_KEY=local HI_BASE_URL=http://127.0.0.1:8080/v1 \
hi --provider openai -m local/tinyllama "write a short haiku"
# MLX backend on Apple Silicon macOS
cargo run -p hi-local -- serve ~/.hi/models/mlx-community_Qwen3-0.6B-4bit \
--backend mlx --port 8081 --model-id mlx-community/Qwen3-0.6B-4bitThe CUDA backend supports GGUF inspection/loading, CPU-reference parity paths, paged KV cache serving, continuous batching, multimodal Qwen2.5-VL projector smoke coverage, and GGUF quantized tensor dequantization including the specialized Q4_0_* and IQ4_NL_* variants. Real CUDA fixture files stay outside git; populate a fixture directory with:
HI_CUDA_FIXTURES_DIR=/models/hi-cuda docs/fetch-cuda-fixtures.shUse HI_CUDA_FIXTURE_MANIFEST=<path> for private/local fixture manifests, or set explicit smoke paths such as HI_CUDA_SMOKE_TEXT_GGUF. See docs/cuda-gpu-llm-fixtures.md for the full matrix.
The MLX backend is Apple-Silicon-only and rejects models whose shard size exceeds the configured safe unified-memory budget before starting Metal work. Override deliberately with HI_MLX_ALLOW_OVERSIZE_MODEL=1; tune the guard with HI_MLX_MEMORY_LIMIT_BYTES or HI_MLX_MEMORY_LIMIT_FRACTION. The acceptance matrix skips oversize repos by default:
scripts/hi_mlx_acceptance_matrix.sh --no-downloadOn a very new Metal Toolchain (Metal 4 / macOS 26) the from-source MLX build hits
a bfloat16_t runtime-JIT error for every model (not just new ones); link a
prebuilt MLX instead with
HI_MLX_SYSTEM_MLX_PREFIX=<mlx-install-dir> cargo build --release -p hi-mlx.
On older macOS this isn't needed. Separately, hi-mlx supports Hy3 / Hunyuan-3
(hy_v3). See docs/hy_v3-and-prebuilt-mlx.md
— its "Which of this do you actually need?" table spells out that the Metal-4
fix and the Hy3 support are independent — plus an honest write-up of the MoE
decode-speed investigation.
The headline feature. After the model stops, hi automatically detects and runs a staged check pipeline. If a check fails, the output is fed back and the model repairs the work. The default is an initial check plus at most two repair/check cycles (--max-verify-repairs 2).
hi --verify "cargo test" "make the failing test pass"
hi "..." # auto-detects cargo check+test, go build+test,
# tsc+npm test, ruff+pytest, or make testAutomatic verification builds a multi-stage pipeline per project: cargo check then cargo test, go build then go test, tsc then npm test (when a tsconfig is present), ruff check then pytest (when ruff is configured), or make test. Repeat --verify CMD to replace detection with exact ordered stages. --no-verify produces an explicitly unverified outcome; a mutating one-shot still exits nonzero unless --allow-unverified is also given.
There is no per-turn step limit by default: runaway tool loops are ended by
the repeat/no-progress stall budgets, so long productive turns are never cut
off mid-flight. --max-steps N (or /config steps <n>) sets an optional hard
cap; a capped turn gets one final tool-free round to report where it left the
work before stopping. Each turn prints [N in · N out · N total · k/k ctx].
--max-tool-calls N is a separate hard execution budget. Parallel batches
reserve the remaining budget before dispatch and return typed denials for the
model-ordered suffix, so concurrency cannot overspend it.
Run several attempts and keep the one that actually passes — the test suite is the judge.
hi --best-of 3 "implement the spec in README"It runs N candidates (varied temperature) in isolated git worktrees, each with its own verify-loop, stops at the first that passes verification, and applies that candidate's diff back to your working tree. It requires a resolved automatic or explicit verifier and a git repo; run from a clean tree (candidates branch from HEAD).
/goal <objective> is for the tasks you'd normally break into a week of tickets — "port this
service from Python to Rust," "get coverage above 80% in this crate." A goal isn't a prompt,
it's a contract: every top-level provider gets a durable structured goal; when a planner model is
configured (glm-5.2 by default on Pipenetwork), it decomposes the objective into sub-goals,
otherwise the executor grows an initial single milestone as it discovers work. Explicitly
referenced workspace documents are read before decomposition, so this is supported directly:
/goal review the plan.md document and fully build this
The agent keeps pulling toward the goal turn after turn on its own — through compactions, test
failures, session resume, and refactors-within-refactors — while you monitor and steer. Checklist
progress is provisional until the settled workspace revision passes deterministic verification and
review. Type at any time to redirect; Esc pauses; /goal resume continues; the plan grows as work
is discovered, with no default cap (/goal limit N sets one). A pinned checklist + goal d/t
badge track progress in the TUI.
Skeptic gate (/goal team, experimental). By default a single agent plans, implements, and
verifies each turn. Point a reviewer model at it (HI_SKEPTIC_MODEL=<model>, or a profile
skeptic_model) and turn on /goal team, and before a turn may mark a sub-goal done a second
model reviews the turn's diff — plus the sub-goal and verify result — and can send it back to retry
with concrete objections, which become notes the next turn must address. It's off by default (an
extra model call per advance), fail-open (a reviewer error or timeout never blocks progress), and
scoped to where orchestration has a real shot: a long-horizon goal, not a single bounded turn.
/goal team alone reports the state and how many advances the skeptic has blocked. Headless runs
(one-shot --goal, the daemon, fleet rows) enable it with HI_GOAL_TEAM=1. The review covers both
ways a turn claims a sub-goal done — the heuristic advance and an explicit update_plan — and an
objection reverts the turn's goal progress (the edits stay on disk for the next turn to fix).
/dashboard scales that to a fleet: the dispatch box at the bottom always spawns a new
session — type a prompt, hit Enter, and you've launched another agent without leaving the
screen. Each row works in its own git worktree; verified, non-overlapping diffs
auto-merge back (collisions hold visibly, m forces). Select a row for a peek panel with
a live reply input — answer an idle agent with a single keystroke (1–9) or queue a
follow-up; Ctrl+S dispatches and attaches. Prefix a dispatch with /goal and the row
drives a whole objective autonomously. Every row is its own resumable session. Details:
docs/fleet-dashboard.md.
/loop 30m check whether CI on main is green — the same prompt, on a cadence. Intervals run
from 60 seconds to days (90s, 30m, 2h, 1d); loops auto-expire after 7 days and are
cancellable by id (/loop list, /loop cancel 3). The shape is built for watching things:
CI logs, a canary deploy, a live service, a flaky test you're trying to catch in the act.
Each firing is a full agent turn, not a dumb cron job: it resumes the loop's own session, so it
remembers previous checks, compares instead of re-describing, and replies NOTHING NEW when
nothing changed — quiet firings land as a dim one-liner, real changes land loud (with a terminal
ping when you're unfocused). Loops persist per project and re-arm when hi restarts (they fire
while hi is running).
/watch opens a full-screen dashboard of every active loop: a live table with per-loop
countdowns to the next firing, a spinner while one is checking, each loop's last result
(dim · nothing new or a loud one-line change), and its running token spend. Select a loop
to peek its recent firing history; f fires the selected loop immediately, p pauses/resumes it,
c cancels it, and n arms a new one from the same <interval> <prompt> box — all without
leaving the screen. The loops keep firing in the background; Esc returns to the chat.
Cost guard. Each firing is a full agent turn, so a fast loop adds up — a 60s loop is ~10k
turns over its 7-day life. Every loop tracks its cumulative token spend, and you can cap it:
/loop budget 3 500k auto-pauses loop #3 once it has spent 500k tokens (it stays resumable —
raise the budget or /loop resume 3 to continue). Pause and resume any loop by hand with
/loop pause <id> / /loop resume <id> (or p in /watch); a paused loop holds its place and
its cost without firing.
PR review. The mirror image of auto-fix (which opens PRs): /loop review arms a watcher that,
on each firing, lists your repo's open pull requests, reviews any it hasn't seen yet (gh pr diff →
assess correctness, tests, risks), and posts a review comment with gh pr review <n> --comment.
Its session remembers what it's reviewed, so a firing with nothing new is a silent NOTHING NEW.
/loop review 1h sets the cadence (default 30m). Needs gh authenticated; it posts real
review comments (a comment — never approve/request-changes), so it's opt-in by arming it.
Windows & cost. Loops fire 24/7 by default; give one a local-time window so it only fires when
it matters: /loop window 3 9-17 (or 9-17 weekdays, or off to clear) — outside it, the loop
quietly defers to the next interval. And /loop cost shows a token-spend breakdown across loops
(each loop's spend, its budget, and the total) — cheap control for running many watchers.
Triggers — a watcher that acts. Attach a shell command that runs whenever a firing reports a
real change: /loop on 3 notify-send "CI is red". It runs via sh -c only on a loud firing
(never on NOTHING NEW or an error), with the change summary in $HI_LOOP_SUMMARY (plus
$HI_LOOP_ID / $HI_LOOP_NAME), a 60s timeout, and its outcome surfaced in the transcript and the
/watch peek. Compose anything — desktop notifications, a webhook curl, a file touch, even
another hi -p "…" to kick off a fix. /loop on 3 off clears it. (The command is yours and runs
with your shell's privileges — treat it like a git hook.)
Auto-fix — a watcher that repairs. Take the trigger idea to its conclusion: /loop fix 3 on
makes loop #3, on a loud change, dispatch a worktree-isolated agent to fix the problem — and
land the fix only if it passes your verify command (/verify). It's the fleet's
detect→fix→verify→merge cycle, driven by a watcher: "watch CI; when it goes red, an agent fixes it
and the fix lands only if it's green." Guardrails are the point — an unverified change is never
landed (no verify command → the fix is reported but not applied), one fix runs per loop at a time,
and every attempt lands in the transcript and the digest.
Two landing modes: /loop fix 3 on merges the verified fix into your working tree (great for a
scratch repo); /loop fix 3 pr instead commits it to a branch, pushes, and opens a PR (gh)
for review (great for a real one — nothing touches your tree until you merge). No remote or gh?
It degrades gracefully to a local/pushed branch and tells you. /loop fix 3 off disables it.
Digest — what changed while you were away. Loops write every loud event (a change they found, a
budget pause, an expiry) to a per-project activity feed that survives restarts — and so do fleet
rows (verified merges, combined-tree verify failures, goal completions). /digest shows the feed
grouped by source (each loop, each fleet row) — how many changes each produced and the most recent,
with a • on everything new since you last looked. Start hi after leaving work running and you'll
see a one-line ⟳ N loop change(s) since you last looked — /digest to review nudge. It's one pane
for everything autonomous that happened.
Daemon — keep firing when the terminal's closed. Loops only fire while a hi is running. Run
hi --loops-daemon to keep this project's loops firing (and auto-fixing) headless in the background,
logging each change, until you Ctrl-C (or kill) it. A per-project lock guarantees exactly one
firer — the daemon and a TUI never both fire the same loops; whichever starts second reads the shared
feed instead (/digest) and says so. Set your loops up in the TUI, close it, hi --loops-daemon &,
and come back later to /digest what it caught.
Notifications — reach you when you're away. A background daemon logs to a transcript you're not watching, so loud events (a change a firing found, a landed fix, a budget pause) can also be pushed to you, opt-in via the environment:
HI_NOTIFY_DESKTOP=1 hi --loops-daemon # macOS terminal-notifier / Linux notify-send
HI_NOTIFY_WEBHOOK=https://hooks.slack.com/… hi --loops-daemon # JSON {"text":…} POST (Slack-compatible)Both sinks are best-effort — a missing tool or a failed POST never blocks a firing — and work in the TUI too. The daemon prints which sinks are active on startup.
Every session is saved as JSONL under ~/.local/share/hi/sessions/.
hi -c "and now add tests" # --continue the latest session
hi --resume <id> "..." # resume a specific one
hi --list-sessions # list saved sessions
hi --no-save "..." # don't persistSlash commands (TUI or plain REPL):
| command | does |
|---|---|
/help |
list commands |
/model [id] |
set by id, or — with no id — open an interactive picker over the live model list (type to filter, ↑/↓, Enter). |
/provider [name|add|edit] |
use a configured profile (no name lists them), add to create a new profile interactively, edit [name] to modify one. |
/verify [cmd|off] |
show, set, or clear the test command turns iterate against — turn the verify-loop on without restarting |
/diff |
show what files have changed this session (git diff + new files) |
/copy [all] |
copy the last assistant response to the terminal clipboard; all copies the transcript |
/goal [obj|pause|resume|limit N|team on|off|clear] |
set a long-horizon goal: a planner model decomposes it into sub-goals the agent then drives autonomously turn after turn (your input always takes priority; Esc pauses). pause/resume hold and continue; limit N caps plan growth (unbounded by default); team on adds a skeptic reviewer that must approve each advance (needs HI_SKEPTIC_MODEL) |
/loop <interval> <prompt> |
the same prompt, on a cadence (60s–7d: 90s, 30m, 2h, 1d): each firing is a full agent turn that remembers previous checks and reports only what changed. /loop list, /loop cancel <id>, /loop pause|resume <id>, /loop budget <id> <count|off> (token cap → auto-pause), /loop on <id> <cmd|off> (run a shell command on each change, $HI_LOOP_SUMMARY in env), /loop fix <id> <on|pr|off> (verify-gated auto-fix on a loud change — on merges, pr opens a PR), /loop window <id> <9-17 [weekdays]|off> (local-time fire window), /loop cost (token-spend breakdown), /loop review [interval] (a PR-review watcher — reviews open PRs via gh); loops auto-expire after 7 days |
/watch |
full-screen live dashboard of all active loops: per-loop countdowns, firing spinners, last result, token spend, and recent history — with f fire-now, p pause, c cancel, n arm a new loop |
/digest (/activity) |
what your loops have noticed, grouped by loop, with what's new since you last looked (a persisted, cross-restart feed of every loud change) |
/dashboard (/fleet) |
control a fleet, not an agent: dispatch, monitor, and steer multiple concurrent sessions — each in its own git worktree with verified diffs auto-merging back; /fleet status lists this project's resumable fleet sessions (docs) |
/delegate [on|off|risk] |
write-capable delegate subagent: worktree-isolated child; changes land only if they verify. Default risk (multi-file / isolation-shaped tasks); on = every mutation; off = never. Read-only explore is on by default for repo tasks |
/init |
scan the repo and write an HI.md project guide (loaded as context in future sessions) |
/compact [kind] |
reclaim context — hybrid (summarize old turns, keep recent), full (summarize everything), or elide (drop old tool output, no model call) |
/retry |
re-run your last message (drops the previous attempt — pairs with /model) |
/undo |
revert the file changes the last turn made (restores its git checkpoint) |
/commit |
stage all changes and commit them (git add -A && git commit) |
/status |
show provider, model, queue, context, and last turn state |
/log |
write a local debug log for this session (.hi-debug.log) |
/export [path] |
export the conversation to a file (default: transcript.md) |
/tokens |
cumulative token usage |
/version |
show version |
/clear |
start a fresh conversation |
/exit |
quit |
Drop an HI.md or AGENTS.md in your project and its contents are appended to the system prompt — per-project conventions, for free. /init scans the repo and writes an HI.md for you.
Auto-memory. At the end of an interactive session, hi distills durable lessons into .hi/memory.md, loaded as context next session. Disable with --no-memory.
Auto-compact. During long tool loops, hi elides older bulky tool results once the local context estimate passes ~45% full, keeping the newest verbatim. Before a new turn, if the previous request used ~80% of the context window, it summarizes the conversation and resets to that summary. Disable with --no-auto-compact; trigger manually any time with /compact. Tool payloads are also bounded: read returns 240 lines unless paged with offset/limit, and HI_TOOL_RESULT_CHARS controls the per-result character cap.
Undo. Before mutation, hi creates a recoverable checkpoint: a dangling
commit with a throwaway index when Git is usable, otherwise a content-addressed
internal snapshot. /undo restores created, modified, and deleted files plus
modes and symlink targets. It refuses to overwrite a file changed externally
since the turn. If no checkpoint backend is available, normal YOLO mode pins a
warning and continues without prompting. --confirm-edits makes that case
strict; combine it with --allow-no-checkpoint to retain the YOLO fallback.
Checkpoints cannot undo non-file side effects.
No nag-prompts — but a guard for the irreversible. Rather than asking permission for every command (the thing everyone turns off), hi lets the model run freely and relies on /undo for recovery. The one exception is a small denylist of operations a checkpoint can't undo — sudo, rm -rf of home/root/system paths, git push --force, curl … | sh, dd to a disk, mkfs, fork bombs, shutdown — which are refused with a reason the model can act on. It's a seatbelt against accidents, not a security boundary; set HI_ALLOW_DANGEROUS=1 to disable it.
OS sandbox (default on). Shell writes are confined to the project (plus temp) by default (HI_SANDBOX=workspace). Set HI_SANDBOX=off when normal tool caches under $HOME must stay writable. Enforced on macOS today (Seatbelt); Linux Landlock/bwrap is sketched in docs/sandbox.md.
TUI. Interactive sessions open a full-screen TUI by default (ratatui): a bordered, scrollable transcript with a title bar showing live token usage, and an input box that turns into a working spinner (with elapsed seconds) while a turn runs. Keep typing while it works to queue the next command(s) — they're listed under the prompt and run in order as each turn finishes. Ctrl-C interrupts the current turn (and drops the queue), PgUp/PgDn scrolls, Up/Down recalls history, /exit quits. Pass --plain (or pipe input) for the line-based REPL.
Reports. One-shot automation can write schema-v2 JSON with
--report path.json. Reports contain the typed turn outcome, verification
stages, review status, typed tool results, actual provider/model route,
turn/session usage, and exact file changes. Reports are written for failed and
incomplete turns as well as successful ones; legacy report fields are no longer
emitted. In particular, session token totals now live at
usage.session.total_tokens, not the legacy top-level total_tokens field.
RSI candidate channel. In the TUI, /config rsi shows readiness, candidate
attribution, rollout phase, learning-loop health, evidence policy, and training
state. Stable is the default; /config rsi channel beta explicitly joins
deterministic canaries and /config rsi channel stable leaves them.
/config rsi spend-limit 5 sets the per-run ceiling to $5, and /config rsi on
or off enables or disables it. These changes apply
immediately and are saved; the public gateway remains
https://api.pipenetwork.ai. RSI can also be enabled with --rsi,
HI_RSI_ENABLED=true, or [rsi] enabled = true in hi.toml; --no-rsi
overrides configuration. Enabling validates the authenticated Pipe RSI service
and confirms repository plus bounded conversation-context upload, 30-day
operational evidence retention, and training off without separate consent.
Each subsequent turn runs on the managed rsi-hi-worker, reports reconnectable
status, validates the exact result against baseline BLAKE3 hashes, and applies
all changes atomically. It never falls back to local execution. Use /rsi list,
/rsi status RUN, /rsi cancel RUN, /rsi apply RUN, or
/rsi artifacts RUN to recover after a disconnect. Use
/rsi feedback [RUN] good|bad [reason] to add supporting outcome evidence;
feedback alone never authorizes promotion. Internal/test deployments
may still select a test gateway in hi.toml.
The trusted worker still uses the hidden managed evidence contract
(--rsi-managed, an expiring runtime descriptor, a fixed trace directory and
byte limit, and --api-unix-socket). The descriptor binds effective budgets,
tools, isolation, run, candidate, signed manifest, binary, and repository
snapshot to every hash-chained trace. The worker independently verifies that
provenance before upload. Managed evidence remains mandatory and is stored
server-side; the normal client retains only pending IDs, baseline hashes, and
result summaries unless artifacts are explicitly downloaded.
A cargo workspace:
| crate | role |
|---|---|
hi-ai |
provider-neutral types, the Provider trait, OpenAI + Anthropic adapters, retry |
hi-tools |
the tools: read / write / edit / multi_edit / apply_patch / bash / bash_output / bash_kill / list / grep / glob / diff / commit / update_plan / record_decision |
hi-agent |
the agent loop, verify-loop, sessions, the Ui trait |
hi-rsi-runtime |
managed candidate descriptor, workflow, budget, checkpoint, verification, failure, and exact-replay contracts |
hi-trace |
bounded content-addressed RSI artifacts and crash-safe hash-chained event journals |
hi-tui |
full-screen terminal UI (transcript, spinner, queue, slash commands) |
hi-cli |
the hi binary: config, sessions, best-of-N, slash commands |
hi-local-core |
shared OpenAI-compatible local serving API and request/response plumbing |
hi-local |
local sidecar binary for GGUF/CUDA and MLX serving |
hi-gguf |
GGUF metadata, tensor, and quantization decoding |
hi-cuda |
CUDA GGUF inference, scheduler, paged KV, quantized dequantization, multimodal smoke support |
hi-mlx |
Apple Silicon MLX inference sidecar and acceptance matrix support |
hi-eval |
the benchmark runner (see below) |
Richer capabilities come from subprocess CLI tools the model invokes via bash rather than a plugin runtime. New built-in tools must clear the tool admission bar (prefer bash/skills unless structure, safety, or reliability requires a first-class tool).
bench/ measures whether orchestration changes beat a baseline. Task schema v2
declares the prompt, allowed-change globs, optional visible feedback, and an
immutable final-oracle command and optional bundle kept outside the candidate.
hi-eval captures the oracle before launch, runs the candidate using only
fixture/, then injects the captured bytes into a fresh verification copy.
Candidate-side test edits therefore cannot change the final score. Candidate
runs default to 900 seconds and final-oracle checks to 120 seconds; the suite
defaults to three trials.
The default matrix includes baseline, verify, heterogeneous best-of-3,
and goal-team. Artifacts preserve every candidate's temperature/seed, actual
route and outcome, patch, checks, turn/session usage, known cost, and wall time.
summary.json reports candidate pass rate and solve@N separately; standard
pass@k is emitted only for exchangeable samples.
cargo run -p hi-eval -- bench --validate # validate every task/oracle (no model)
# Compare configs against any model (env flows through to hi):
HI_MODEL=anthropic/claude-sonnet-4 HI_API_KEY=$OPENROUTER_API_KEY \
cargo run -p hi-eval -- bench/spec
# The raw-Fusion line to beat (Fusion is selected via env, not a flag):
HI_MODEL=openrouter/fusion HI_API_KEY=$OPENROUTER_API_KEY \
cargo run -p hi-eval -- bench/specLocked metrics live in eval-baseline/core-0.2.json. The first provider-backed
capture has not landed yet — solve_rate / cost_per_solved / failure buckets
remain null until then. After a full matrix run:
# North-star ladder (regression floor → multi-file):
HI_MODEL=… HI_API_KEY=… cargo run -p hi-eval -- \
--configs=baseline,verify --trials=3 \
bench/tasks # then bench/spec, bench/vloop-dense, bench/hidden
# Capture from the run's summary.json:
cargo run -p hi-eval -- --write-baseline=path/to/summary.json
# Compare a later run (exit 2 on regression when flagged):
cargo run -p hi-eval -- --compare-baseline=path/to/summary.json
cargo run -p hi-eval -- --compare-baseline=path/to/summary.json --fail-on-baseline-regressionTracked metrics: solve_rate, false_verified_rate, cost_per_solved,
tokens_per_solved, infrastructure_error_rate, and failure buckets
(no-edits / compile / logic / error). Every full hi-eval run prints a
baseline compare block when the file is present.
Use focused commands while editing. Voice support (cpal and Whisper) is
opt-in so ordinary coding builds avoid the native audio stack:
cargo check -p hi-agent --lib
cargo test -p hi-agent --lib
cargo test -p hi-shell --lib
# One-time setup for parallel test execution:
cargo install cargo-nextest --locked
cargo nextest run -p hi
# Confirm the release feature set before shipping:
cargo check -p hi --features voiceFor repeated clean or dependency-heavy builds, install sccache and let Cargo
reuse compiler output across branches and worktrees:
brew install sccache
export RUSTC_WRAPPER="$(command -v sccache)"
sccache --show-statscargo nextest run parallelizes independent test binaries and is preferred for
local suites. The release checklist below intentionally remains broad and uses
all targets so CI still catches feature, example, and benchmark regressions.
cargo fmt --allcargo clippy -p hi-ai -p hi-tools -p hi-lsp -p hi-agent -p hi-tui -p hi -p hi-eval --all-targets -- -D warningscargo test -p hi-ai -p hi-tools -p hi-lsp -p hi-agent -p hi-tui -p hi -p hi-evalcargo install --path crates/hi-cli --locked- Smoke an OpenAI-compatible endpoint with
--compat autoand--tool-mode auto - Validate eval tasks and immutable oracles with
cargo run -p hi-eval -- bench --validate
The 0.1 GPU/local-inference crates have their own hardware-specific release checks and are not gates for the core 0.2 release.
Early but functional. The multi-provider core, full-screen TUI, sessions, verify-loop, best-of-N, compatibility fallbacks, changed-file reporting, eval harness, and local CUDA/MLX sidecars are built and tested (cargo fmt --all and targeted package/native smoke tests). The TUI's rendering is verified via ratatui's TestBackend; its live key/scroll behavior is best confirmed in a real terminal. Cargo install is the first release target; binary archives and Homebrew can follow later.