Build offloading for coding agentsv2.1.36
Move agent builds off your machine.
RCH is a hook for Claude Code. When an agent runs cargo test, gcc, make or go build, RCH runs it on one of your Linux servers over SSH, streams the output back as it happens, copies the build outputs into your project and exits with the server’s exit code. To the agent it looks like a local build. If no server frees up in time, it runs locally as usual.
Where builds run
– local CPU demand
0 building here0 on the fleet0 waiting
An illustration, not a benchmark: 16 local cores, six 24-core workers, builds that each want 8 cores for 14 to 26 seconds of work, and 3 seconds added to every round trip. The figures come from this model.
- 24kinds of buildCargo, rustc, gcc, clang, make, cmake, ninja, meson, go, bun, tsc and nix commands.
- 7signals per pickSpeed, free slots, failures, cache warmth, latency, priority and free disk.
- 101stays 101A failing cargo test exits 101 on the worker and 101 here. rch’s own failures use 102 and 103.
- 32credential patternsKeys, .env files and registry tokens are left out of every upload by default.
- 103error codesEach with a category and steps to fix it, in text or JSON.
01The problem
Many agents, one set of cores.
Ten agents in ten worktrees start ten compiler process trees on the same cores. Each build gets a slice, takes longer, overlaps more, and your editor slows down with it.
On record
One repository, 127 compilers.
A .cargo/config.toml with jobs = -1 met a 128-thread host. It’s written up in the source of rch shim, which now caps parallelism on every local fallback.
- rustc processes at once
- 127
- hardware threads
- 128
- per linker process
- ~1 GB
- of linkers in memory
- 202 GB
- disk busy, for hours
- 100%
128 threads · 127 compiling
Memory
Exhausted. The machine stayed wedged at 100% disk utilization for hours.
What goes where
Builds leave. Everything else stays.
Every chip below was checked against the real classifier when this page was built.
What agents type
cargo test --workspace: sent to a workergit status: stays localgcc -O2 -c main.c: sent to a workerbun install: stays localgo test ./...: sent to a workercargo fmt: stays localtsc --noEmit: sent to a workerbun dev: stays localmake -j32: sent to a workercargo add serde: stays localCompile and link
cargo buildrustc main.rsgcc -c main.cclang++ -c app.cppmake -j32cmake --build buildninjameson compilego buildTest and bench
cargo testcargo nextest runcargo benchgo testbun testCheck
cargo checkcargo clippycargo docgo vettsc --noEmitbun typecheckNix
nix buildnix flake checkLocal state
cargo installcargo addcargo fmtbun installgo mod tidyServers and watchers
bun devbun rungo runcargo watchbun test --watchEverything else
gitlsnpm testyour editorcargo run goes to the worker: it builds there and runs the program there, output streamed back. Good for tools that print and exit, not for a server you want on localhost.
02The hook
It sees each command before the shell does.
Claude Code asks rch about every Bash command first. Anything that isn’t a build gets its answer before rch parses arguments or starts logging; a build is rewritten to rch exec -- <command>.
Type a command an agent might run, or pick one.
Runs the real classifierInteractiveSent to a worker
cargo_testconfidence 0.95 ≥ 0.85
- 0Empty commandcommand presentpassed
- 1Shell structureno pipes/redirects/backgroundingpassed
- 2Build keywordkeyword presentpassed
- 3Never-intercept listno never-intercept matchpassed
- 4Full classificationcargo testpassed
Claude Code runs
rch exec -- cargo test --workspaceBuilds
Stay local
classify_command from rch-common/src/patterns.rs (commit 52ff5555, 2026-11-12), compiled to WebAssembly. Nothing you type leaves the page. After this check the hook applies your config, such as force_local and the execution allowlist.Five tiers
Most commands are out by the second check.
Each tier is cheaper than the next, so the common case, a command that isn’t a build, costs almost nothing. Across 336 per-command timings in the project’s Criterion runs, one classification took 0.12 to 2.8 µs.
Nothing to run, nothing to decide.
Splits safe chains, keeps harmless pipes and a trailing
&on your side, and declines;, subshells and a second command after&.cargo check; cargo teststops: chained command (;)The first word must be one of 21 tools: cargo, cargo-zigbuild, cargo-xwin, rustc, gcc, g++, clang, clang++ and the rest.
git statusstops: no compilation keyword60 patterns for installs, formatters, dev servers, watchers and version checks.
cargo install ripgrepstops: matches never-intercept: cargo installOne of 24 build kinds, with a confidence. At 0.85 or above it goes to a worker.
cargo test --workspace→ cargo_test · 0.95
Chains and pipes
Only the build leaves the machine.
rch wraps the build and leaves the rest of the line to your shell. These rewrites come from the real classifier.
| The agent runs | Claude Code runs | Why |
|---|---|---|
cd crates/api && cargo clippy -- -D warnings | cd crates/api && rch exec -- cargo clippy -- -D warnings | to a workercompound command with compilation suffix |
cargo build 2>&1 | tail -20 | rch exec -- cargo build 2>&1 | tail -20 | to a workercompilation command with benign trailing redirect/pipe/background |
bash -c "cargo check" | rch exec -- cargo check | to a workershell -c wrapper with compilation command |
RUST_BACKTRACE=1 cargo t | rch exec -- RUST_BACKTRACE=1 cargo t | to a workercargo test |
cargo build --release && ./target/release/app | cargo build --release && ./target/release/app | runs locallychained command (&&) |
cargo check; cargo test | cargo check; cargo test | runs locallychained command (;) |
03The fleet
A score for every worker, on every build.
rchd, the daemon on your machine, tracks each worker’s free slots, failures, latency, free disk and recent builds, and scores every worker for every build.
Change the fleet and watch which worker gets the build.
InteractiveWorked example- speed
- free slots × load
- health
- cache warmth
- latency
- priority
- free disk
- penalty
- atlas8 of 64 slots busy · 45 msbuilt here never · 1200 GB free1.84
- bolt4 of 32 slots busy · 14 msbuilt here 18 min ago · 400 GB free1.99picked
- cinder2% errors36 of 48 slots busy · 22 msbuilt here 3 h ago · 600 GB free1.71
- driftdisk allows 5 of 16 slots8% errorsno AVX2 ×0.50 of 5 slots busy · 160 msbuilt here never · 60 GB free0.95
bolt gets the build with 1.99.
0.5·speed + 0.4·free·load + 0.3·health + 0.2·cache + 0.1·latency + 0.5·priority
× 0.5 if the circuit is half-open, × 0.5 on x86 without AVX2, × (1 − pressure and reliability penalties)
+ 0.2·free disk
rch-common/src/types.rs when this site is built. The four workers are made up and share one priority, so that term adds the same 0.5 to each.When the fleet is busy
Four rules that keep it honest under load.
Cache warmth
Recent builds win ties
- a build, hours since this worker last built the project
- a test run on a worker that built but never tested it, ×0.6
A worker that built this project in the last hour keeps a warm target directory, so cargo reuses what it compiled.
Circuit breaker
Flaky workers sit out
Health checks feed it; a worker that keeps failing is skipped, then tested with one probe build.
Queue
Wait up to 5 minutes
- A slot frees up: runs on that worker
- 300 s: runs here, or refused (103) in Strict
With every slot taken, the build waits in rchd’s queue instead of landing on your cores.
Disk
Slots shrink as disks fill
10 GB floor10 GB per build
min(16, ⌊(60 − 10) ÷ 10⌋) = 5 usable slots
An example worker. A worker with critically low disk takes nothing new.
04The round trip
Output streams back. Binaries land in target/.
Source goes up with rsync and zstd, the command runs over SSH, output streams as it prints, build outputs come home, and rch exits with the build’s own status.
Step through one cargo test, from the agent’s call to its exit code.
Worked example1 · Your machine
The agent runs a test
Claude Code is about to run a Bash command and asks the PreToolUse hook first. rch classifies it as cargo_test with confidence 0.95, at or above the 0.85 threshold, and answers with a rewritten command.
{"tool_name":"Bash","tool_input":{"command":"cargo test -p api"}}
{"hookSpecificOutput":{"hookEventName":"PreToolUse",
"permissionDecision":"allow",
"updatedInput":{"command":"rch exec -- cargo test -p api"}}}2 · Your machine
rchd picks a worker
rch exec writes a job lease, then asks the local daemon over a Unix socket for a worker with 4 free slots. The daemon reserves them on bolt, which built this project twenty minutes ago.
GET /select-worker?project=acme-api&cores=4
→ worker: bolt reason: success slots: 4 of 32 reserved3 · Over SSH
The source goes up
rsync sends only what changed since the last build, compressed with zstd. By default target/, .git/, node_modules/ and 32 credential-file patterns stay behind. The mirror lands at the same path on the worker.
rsync -az --partial-dir=.rch-partial --compress-choice=zstd \
--exclude target/ --exclude .git/ --exclude .env … \
/data/projects/acme-api/ bolt:/data/projects/acme-api/4 · The worker
The worker builds and tests
The command runs in a pooled target directory that persists between builds of this project, toolchain and profile, so cargo reuses what it compiled last time. Output streams back line by line as it is printed.
Compiling api v0.3.0 (/data/projects/acme-api/api)
Finished `test` profile [unoptimized + debuginfo] target(s) in 9.84s
Running unittests src/lib.rs (target/debug/deps/api-3f1c9a)
running 42 tests
test routes::tests::rejects_expired_token ... FAILED
test result: FAILED. 41 passed; 1 failed; 0 ignored5 · Over SSH
Results come back
For a test run the result is the output, which already streamed, and the exit status. The test binaries stay in the worker’s warm target for next time; rch doesn’t copy them home. A cargo build is different: its outputs come back into your local target/, without the incremental and fingerprint caches.
cargo test -p api the output and the exit status
cargo build --release target/release/, without the caches
cargo build --bin api only the api binary6 · Your machine
Exit 101, as cargo would
rch exec exits with the worker’s status. cargo test exits 101 when a test fails, so the agent sees 101, reads the failure and fixes the token check, as it would after a local run.
failures:
routes::tests::rejects_expired_token
error: test failed, to rerun pass `-p api --lib`
exit status 101What leaves your machine
Keys and .env files stay home.
By default the upload skips build output, dependency folders and 32 credential-file patterns at any depth.
Pick a file in this project.
Interactive.env
Never sent
Matches .env, one of the credential and key patterns rch never uploads. A name without a slash matches at any depth.
default_excludes() in rch-common/src/types.rs, read when this site is built. A .rchignore file adds patterns; an explicit exclude_patterns list replaces the defaults.Dropped connections
A lost link never compiles twice.
The job lease is written before a worker is asked, so a build that may have run is collected later instead of rerun.
- Lease writtenbefore any worker is asked
- Worker pickedslots reserved
- Source syncedrsync, zstd
- Build runningoutput streaming
- Connection lostcompletion unconfirmed
- No local rerunit may already have run
rch jobs recovercollects the outputs- Status reportednever compiled twice
05Fail-open
When rch can’t place a build, it runs here.
If a build can’t get onto a worker, it runs locally. If it may already have run remotely, rch never runs it twice. A crashed hook exits 0 and Claude Code runs the original command.
Pick a failure, then switch to Strict.
Worked exampleStrict is RCH_REQUIRE_REMOTE=1
It isn’t a build
Default
Runs locally
The hook answers on its fast path, before argument parsing or logging start, and Claude Code runs the command unchanged.
Exit status: the command’s own
Strict: RCH_REQUIRE_REMOTE=1
Runs locally
Strict mode governs builds only. The hook leaves other commands alone in either mode.
Exit status: the command’s own
rchd isn’t running
Default
Runs locally
[RCH] local (daemon unavailable)rch records incident RCH-I010, starts the daemon and asks once more. If the daemon answers, the build goes remote as usual. If it doesn’t, the build runs here.
Exit status: the build’s own
Strict: RCH_REQUIRE_REMOTE=1
Refused
[RCH] remote required; refusing local fallback (daemon unavailable) — retryableSame restart attempt, but if it fails nothing runs. Exit 103 marks the refusal as worth retrying.
Exit status: 103
Every worker is busy
Default
Runs locally
[RCH] local (selection error: queue_timeout)The build waits in the daemon’s queue for up to 5 minutes. If a slot frees up, it runs there. Only when the wait runs out does it run here.
Exit status: the build’s own
Strict: RCH_REQUIRE_REMOTE=1
Refused
[RCH] remote required; refusing local fallback (selection error: queue_timeout) — retryableSame queue and wait. When the wait runs out, rch refuses instead of using your cores.
Exit status: 103
The worker lacks the toolchain
Default
Runs locally
[RCH] local (toolchain missing on bolt; remote retries exhausted)A missing toolchain is the worker’s fault, not the build’s, so rch tries other workers first, up to 3 attempts in all. Only when they all fail does the build run here. (A missing system library or an out-of-memory kill gets the same retries, but then exits with the worker’s status and a remediation line instead of running locally.)
Exit status: the build’s own
Strict: RCH_REQUIRE_REMOTE=1
Refused
[RCH] remote required; refusing local fallback (toolchain missing on bolt; remote retries exhausted) — retryableThe same retries on other workers. If they all fail, rch refuses instead of running locally. Run in the project, rch workers sync-toolchain --all installs its Rust toolchain on every worker.
Exit status: 103
The connection drops mid-build
Default
Kept for recovery
[RCH] remote bolt completion unconfirmed; ownership retained for recovery (no local fallback)Once a build may have started, running it again here could do the work twice. rch keeps the job’s lease, and rch jobs recover <id> collects its outputs later without compiling again.
Exit status: 1
Strict: RCH_REQUIRE_REMOTE=1
Kept for recovery
[RCH] remote bolt completion unconfirmed; ownership retained for recovery (no local fallback)Identical in both modes. Recovery never reruns the command.
Exit status: 1
The hook crashes
Default
Runs locally
[rch] hook panicked; falling open. (set RUST_BACKTRACE=1 to see)In hook mode a panic handler writes that line to stderr and exits 0 with nothing on stdout. Claude Code reads that as no objection and runs the original command.
Exit status: the build’s own
Strict: RCH_REQUIRE_REMOTE=1
Runs locally
[rch] hook panicked; falling open. (set RUST_BACKTRACE=1 to see)The hook’s crash path doesn’t consult strict mode, so the command runs as typed.
Exit status: the build’s own
[RCH] local (…) lines need RCH_VISIBILITY=summary; by default the hook prints none of them. Refusals and failure lines always print.At a glance
Strict mode trades fallback for proof.
Set RCH_REQUIRE_REMOTE=1, or pass --require-remote, when a local run would be wrong: a laptop on battery, or a gate that must show the build ran remotely. Exit 103 means try again later.
| When | Default | Strict RCH_REQUIRE_REMOTE=1 |
|---|---|---|
| It isn’t a build | Runs locally | Runs locally |
| rchd isn’t running | Runs locally | Refused exit 103 |
| Every worker is busy | Runs locally | Refused exit 103 |
| The worker lacks the toolchain | Runs locally | Refused exit 103 |
| The connection drops mid-build | Kept for recovery exit 1 | Kept for recovery exit 1 |
| The hook crashes | Runs locally | Runs locally |
06For agents
Output an agent can act on.
Agents end up debugging their builds, so rch answers in JSON with one envelope, names every error with a code and a fix, and explains any decision before it happens.
Real output from rch 2.1.37, captured for this page.
Worked examplerch --json diagnose "cargo test --workspace"
Why a build would or wouldn’t go remote, before it runs. This one was captured while the fleet was full, and every worker says why it declined.
{
"api_version": "1.0",
"command": "diagnose",
"success": true,
"data": {
"classification": {
"is_compilation": true, "confidence": 0.95, "kind": "cargo_test", "reason": "cargo test"
},
"decision": {
"would_intercept": true,
"reason": "Compilation command with confidence 0.95 >= threshold 0.85"
},
"worker_selection": {
"estimated_cores": 4,
"worker": null,
"reason": "all_workers_busy",
"inventory": [
{ "worker_id": "atlas", "outcome": "excluded",
"reason": "build disk headroom requires 50 GiB including active reservations and the reserve floor; worker reported 25 GiB free",
"reason_codes": ["disk_headroom_insufficient"] },
{ "worker_id": "bolt", "outcome": "excluded",
"reason": "available slots 2 < 4", "reason_codes": ["slots.insufficient"] },
{ "worker_id": "cinder", "outcome": "excluded",
"reason": "worker status is Unreachable", "reason_codes": ["worker.status_not_assignable"] },
{ "worker_id": "win1", "outcome": "excluded",
"reason": "worker declares os=windows, so it takes only commands targeting that OS",
"reason_codes": ["os.declared_mismatch"] },
…
]
},
"placement": { "strict_remote_policy": "off", "queue_policy": "queue_when_busy", "target_dir_policy": "pooled" }
}
}rch error explain RCH-E100
Every error code has a category, a description and steps to try. rch error list prints all of them.
RCH-E100 SshConnectionFailed
Category: network Namespace: error (RCH-Ennn)
Description:
SSH connection to worker failed
Remediation:
- Verify the worker host is reachable: ping <host>
- Check that SSH service is running on the worker
- Verify firewall allows SSH (port 22)
- Try connecting manually: ssh <user>@<host>rch capabilities --json
One call tells an agent the commands, environment variables, output formats and what each exit code means for its next step. These codes are for rch’s own commands; a build run through rch exec exits with the build’s status.
{
"data": {
"exit_codes": [
{ "code": 0, "meaning": "success",
"agent_action": "Continue; stdout contains the requested data in machine mode." },
{ "code": 1, "meaning": "general error or degraded health",
"agent_action": "Read stderr or the JSON error/remediation fields; do not retry blindly." },
{ "code": 100, "meaning": "network or SSH failure",
"agent_action": "Run `rch workers probe --all --json` and inspect RCH-E1xx errors." },
{ "code": 101, "meaning": "worker error",
"agent_action": "Inspect `rch workers list --json` and worker capability mismatches." },
…
],
"commands": […], "env_vars": […], "output_formats": […], "recommended_commands": […]
}
}Three ways in
Claude Code, and everyone else.
The hook covers Claude Code. Codex, scripts and CI reach the same pipeline through the cargo shim or rch exec.
Rewrites a build to rch exec -- <command> before the shell runs it.
rch shim install writes a cargo wrapper and prints the PATH line that puts it first. Build and test subcommands go through rch exec.
rch exec -- make -j32 for one build, rch exec --job for work that isn’t a build.
rch exec→rchd picks a worker→the fleetWhat agents ask
Six commands that answer questions.
rch workers list --jsonOne envelope
Every command speaks JSON
--jsonwraps results inapi_version,success,dataanderror.--format toongives the same data as TOON.rch error explain RCH-E100103 error codes
Errors that say what to do
Each
RCH-Ennncode has a category and remediation steps, in text or JSON.rch diagnose "cargo test"Before it runs
Ask why, ahead of time
rch diagnoseshows the classification, the placement plan and every worker’s reason for taking or declining.rch admit "cargo build --release"Read-only preflight
Will this offload?
rch admitanswers offload, local, queue or defer without syncing or reserving anything.rch exec --job --result-dir crashes -- ./fuzz.shNot just builds
Fuzzers, shards, benchmarks
rch exec --jobruns any workload on the fleet; declared result folders come back whatever the exit code.rch exec --job --require-tool clang -- ./fuzz.shVerified tools
Only workers that have it
--require-tool clangadmits only workers whose configured probe for it passed;--require-toolchain bun@1.3.2filters by the exact version a worker reports.
07The numbers
What a round trip costs.
A round trip adds a few seconds of sync and SSH and takes the build’s CPU, memory and linker off your machine. Whether one build finishes sooner depends on your hardware.
Wall time for one build, run on the server itself and sent through rch to the fleet.
Measured1.2–1.3× faster for cold builds and checks 4.1× slower for a 1.4 s incremental check, where the round trip costs more than the build
hetzner2 with rustc 1.99.0-nightly (09ee43b2d 2026-07-27). The file doesn’t record which worker ran each build. Source: benchmarks/baselines/hetzner2-nightly-09ee43b2d.ndjson.The speed gate
The point is concurrency.
With slots reserved per worker, the fifth agent’s build doesn’t take cores from the first four, or from you. When your desk machine is faster than the fleet, the speed gate keeps small builds home.
M5 Ultra Mac Studio · cold cargo check -p rch-common --lib
Recorded in the source of the speed gate, rch/src/hook/speed_gate.rs, as the reason it exists. The gate decides from timings it records on this machine, per project and command kind.
- Gate on?
compilation.local_slots > 0. Off by default. - Measure both sidesOnce per project and command kind, again after 7 days.
- Local median under 2 s?→ run here
- Workers less than 1.2× faster?→ run here
- Otherwise→ the fleet
- Local runs are cappedat
local_slotsat once, and need 25% free memory.
Alternatives
Next to sccache, distcc and Bazel.
For agents, the difference is that RCH moves the whole command, tests included, and leaves the build files alone.
| What runs elsewhere | Your build files | Shared cache | Languages | |
|---|---|---|---|---|
| RCH | The whole command: compile, link, run tests | Unchanged: cargo, make, go, bun | Warm targets per project on each worker; RABS, below, adds an experimental rustc cache | Rust, C, C++, Go, Bun tests, TypeScript checks, Nix |
| sccache | Individual compiler calls, cached and optionally distributed; tests run locally | Unchanged; set as a compiler wrapper | Yes: local disk, S3, Redis and others | Rust, C, C++, CUDA |
| distcc, icecream | C and C++ compile steps; linking stays local | Unchanged; set as CC | No | C, C++ |
| Bazel, Buck2 remote execution | Any action, tests included | Rewritten as BUILD or BUCK rules | Yes | Anything with rules |
08RABS · experimental
A build cache that has to earn trust.
RABS, the Asupersync-native Accelerated Build Sidecar, caches single rustc calls. Each call is keyed on everything that can change its output, a cached result is served only after independent runs have matched it exactly, and one mismatch stops serving for its whole class. It is opt-in and still being qualified: correct in real builds so far, not yet faster.
Pick what RABS already knows about one rustc call.
Worked example- CargoPlans the build and starts each rustc through
RUSTC_WRAPPER.starts rustcstarts rustcstarts rustcstarts rustcnot reached - rabs-wrapAsks the daemon, with a p95 budget of 10 ms, or steps aside.asksaskswaits for the installruns rustc itselfnot reached
- rabsdBuilds the action key and looks it up.nothing yetcommitted, not trustedtrustednot reached
- rustcThe real compiler.compilescompiles againcompilesskipped
- StoreResults kept by content digest.stores and commitscompares the bytesinstalls the outputsnot reached
Nothing under this key yet
The wrapper asks rabsd, which has no result for the key, so the real rustc runs. Its outputs and messages are digested, stored by content and committed under the key. Nothing is served yet.
rustc ran · result committed
Committed, not yet trusted
The next two times the key comes up, rustc still runs as an independent attempt, and the digests of its outputs and messages are compared with the committed result. Both must match. One mismatch quarantines the whole class, every dependency compile, not just this key.
rustc ran · bytes compared
Trusted: served
With two independent matches, the call can be served. rustc doesn’t run: the stored outputs are installed where Cargo expects them, and the wrapper replays rustc’s own messages. Each new comparison allows at most 16 replays before another is needed.
rustc skipped · same files, same messages
The daemon isn’t there
If rabsd doesn’t answer in time, or the wrapper’s breaker is open, the wrapper runs the real rustc in its own place: same exit code, signals and output. Before a hit is accepted, every RABS problem ends this way. After acceptance, an uncertain delivery fails instead of guessing.
rustc ran · as if RABS weren’t installed
rabsd holds the edge and coordinator roles in one daemon. Through RCH, each worker keeps its own cache; the separate shared-coordinator route, cargo rabs --rabs-canonical-remote, shares eligible dependency compiles between clients.Earning trust
Two matching runs before the first hit.
A result is served only after two independent runs have matched it. This is the ladder each registry dependency climbed through RCH on November 5, 2026, every round in a fresh target directory.
- Round 1Execute and commitrustc runs
The result is stored by content and committed under its key.
- Round 2Verify 1rustc runs
An independent run. Its output digests must match the committed result.
- Round 3Verify 2rustc runs
An independent run. Its output digests must match the committed result.
- Round 4Serverustc skipped
The stored outputs are installed and rustc’s messages replayed.
Optional · RABS_SPRT_SAMPLING=1
Verify less as clean evidence grows
Each window of 69,762 clean comparisons, each counted once, lowers the share of hits that are run again. Until the first window completes, nothing is replayed at all. One mismatch at any step stops the class.
- from 0100%no replays
- from 69,76225%3 replays
- from 139,5245%19 replays
- from 209,2861%99 replays
- Share of hits run again and compared
- n replaysallowed per fresh comparison
The steps are boundaries of a Bernoulli model with p0 = 10−6, p1 = 10−4 and α = β = 0.001, not a measured error rate. With the option off, each new comparison allows 16 replays.
The key
Everything that can change the output.
An action key is a SHA-256 digest over every input that can change what this rustc call produces. A new key epoch starts an empty namespace instead of reinterpreting old entries, and rch why miss compares two keys input by input.
- 01The compiler callrustc’s arguments, with every wrapper in the chain decoded
- 02What it reads, and looks forthe files this one call depends on, including paths it probed and didn’t find
- 03The environment it is givenbuilt explicitly and hashed as presented, not guessed from what rustc read
- 04Dependency artifactsthe exact bytes of every crate artifact passed to rustc
- 05Toolchain and targetthe compiler’s identity and the platform it builds for
- 06Sandbox and path policyhow paths are presented to the compiler
Kept out of the key
- The worker’s kernel, free memory, disk and CPU slots
- Who wants it: a person, an agent or CI
- The rest of the checkout, beyond what this call reads
These steer the scheduler or go in the receipts, never the key, so a busier worker or a different caller can’t cause a miss.
Who commits
Workers offer. The coordinator commits.
One daemon runs the edge and coordinator today, but their authority, state and protocol are kept separate, so they can become two programs without a redesign.
Answers the wrapper inside its 10 ms budget. Before a hit is accepted, any doubt sends the call to the real rustc.
Runs a key once when several builds ask for it at the same moment, holds the leases, and is the only role that commits a result.
Compiles in a sandbox and offers a prepared result. The protocol has no message a worker could use to commit one.
Checks the digest, then writes once. The same digest with different bytes is an incident, never a tie-break.
four state machines, kept apartbuild operationpublication slotattemptsubscriber delivery
Where it stands
Correct so far. Not yet faster.
On November 5, 2026, cargo check --locked -j1 -p rabs-key through RCH served every eligible dependency correctly and took longer than plain RCH. Speed is still being qualified.
Warm cache vs. ordinary RCH1.2× slower
Filling it first: execute and commit 96.80 s, then verify 121.28 s and 105.63 s.
- Eight of eight registry dependencies served, with metadata byte-identical to stock Cargo’s
- Every compiler unit really ran in every round, each in a fresh target directory
- Four native Linux scenarios with real compilers: a check with replay, a build whose delivered binary works, a persistent worker across a coordinator restart, and a prewarmed SDK
What RABS does not claim
It claims one trusted fleet, where the same administrator runs every coordinator, worker and client. Inside that fleet, it does not claim:
- Isolation between teams that don’t trust each other on one fleet
- Isolation between users beyond ordinary OS accounts
- Containing a deliberately malicious build script or proc macro
- Correct results from a worker that lies about what it ran
- That a worker’s identity gives it the right to commit a result
- That a matching cached build proves your program is correct
- Telling a real worker from a copy of its software identity
Each of these is a code the receipts carry, such as NO_CLAIM_MULTI_TENANT_ISOLATION.
# Each Linux worker needs rabs-wrap and rabsd beside rch-wkr or on its PATH.
RCH_RABS_WORKER_CACHE=1 rch exec -- cargo check # one command, through RCH
cargo rabs --rabs-remote check # the same route, started from Cargo
rch why miss --prior-key A --current-key B --cas-root DIR # which inputs changed
rch rabs gc plan # what a cleanup would reclaim09Install
One line to install.
Installs rch and rchd in ~/.local/bin, registers the Claude Code hook, and adds the rch skill for Claude Code and Codex. macOS and Linux, x86_64 and arm64.
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/remote_compilation_helper/main/install.sh?$(date +%s)" | bash -s -- --easy-modeThen
Run rch init.
Eight steps, then an optional test compilation. It asks before adding workers or deploying to them; rch init --yes takes the defaults.
- 1Initialize configurationconfig files in
~/.config/rch - 2Discover potential workershosts from
~/.ssh/config - 3Add discovered workersyou pick which join
- 4Probe worker connectivitySSH and what each has
- 5Deploy worker binary
rch-wkron each worker - 6Synchronize Rust toolchainthis project’s toolchain
- 7Start daemon
rchdtracks the fleet - 8Install Claude Code hookthe PreToolUse entry
rch doctor # health check; --fix repairs what it can
rch status --workers --jobs # the fleet right now
rch diagnose "cargo build --release" # what would happen, and whyWhat you need
One Linux box is enough to start.
- Linux, reachable over SSH with a key
rsyncandzstd- The toolchains your projects use
- 8+ cores and NVMe help; rented servers are fine
- macOS or Linux, x86_64 or arm64
- Claude Code; other agents through the cargo shim or
rch exec - rsync 3.2+ for full speed:
brew install rsync rch doctorsays which rsync it found
- Under one root, mirrored at the same path on workers
/data/projectsby default- Or set
[path_topology] canonical_root - Builds outside the root run locally
Rust · MIT with an OpenAI/Anthropic rider
Start with one server.
One Linux box you can reach over SSH is enough to try it. Add workers as your agent count grows; rch spreads the builds across them, and your own machine stays responsive.