RCH

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

Agents building

– 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.

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.

Read it in shim.rs

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 local
Sent to a worker

Compile and link

cargo buildrustc main.rsgcc -c main.cclang++ -c app.cppmake -j32cmake --build buildninjameson compilego build

Test and bench

cargo testcargo nextest runcargo benchgo testbun test

Check

cargo checkcargo clippycargo docgo vettsc --noEmitbun typecheck

Nix

nix buildnix flake check
Stays on your machine

Local state

cargo installcargo addcargo fmtbun installgo mod tidy

Servers and watchers

bun devbun rungo runcargo watchbun test --watch

Everything else

gitlsnpm testyour editor

cargo 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 classifierInteractive

Sent to a worker

cargo_testconfidence 0.95 ≥ 0.85

  1. 0Empty commandcommand presentpassed
  2. 1Shell structureno pipes/redirects/backgroundingpassed
  3. 2Build keywordkeyword presentpassed
  4. 3Never-intercept listno never-intercept matchpassed
  5. 4Full classificationcargo testpassed

Claude Code runs

rch exec -- cargo test --workspace

Builds

Stay local

This box runs 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.

The benchmark file
  1. 0Empty command

    Nothing to run, nothing to decide.

  2. 1Shell structure

    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 (;)

  3. 2Build keyword

    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 keyword

  4. 3Never-intercept list

    60 patterns for installs, formatters, dev servers, watchers and version checks.

    cargo install ripgrepstops: matches never-intercept: cargo install

  5. 4Full classification

    One 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 runsClaude Code runsWhy
cd crates/api && cargo clippy -- -D warningscd crates/api && rch exec -- cargo clippy -- -D warningsto a workercompound command with compilation suffix
cargo build 2>&1 | tail -20rch exec -- cargo build 2>&1 | tail -20to a workercompilation command with benign trailing redirect/pipe/background
bash -c "cargo check"rch exec -- cargo checkto a workershell -c wrapper with compilation command
RUST_BACKTRACE=1 cargo trch exec -- RUST_BACKTRACE=1 cargo tto a workercargo test
cargo build --release && ./target/release/appcargo build --release && ./target/release/appruns locallychained command (&&)
cargo check; cargo testcargo check; cargo testruns 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
bolt last built here
bolt’s busy slots
  • speed
  • free slots × load
  • health
  • cache warmth
  • latency
  • priority
  • free disk
  • penalty
  1. atlas8 of 64 slots busy · 45 msbuilt here never · 1200 GB free
    1.84
  2. bolt4 of 32 slots busy · 14 msbuilt here 18 min ago · 400 GB free
    1.99picked
  3. cinder2% errors36 of 48 slots busy · 22 msbuilt here 3 h ago · 600 GB free
    1.71
  4. driftdisk allows 5 of 16 slots8% errorsno AVX2 ×0.50 of 5 slots busy · 160 msbuilt here never · 60 GB free
    0.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

Weights and curves are read from rchd/src/selection.rs and 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

00.20.510612243648 h
  • 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

Closed Open Half-open 3 fails in a rowor 2 hung commandsor ≥ half of last 10 wait30→480s 2 OKin a row probefails 1 probe build at a time

Health checks feed it; a worker that keeps failing is skipped, then tested with one probe build.

Queue

Wait up to 5 minutes

With every slot taken, the build waits in rchd’s queue instead of landing on your cores.

Disk

Slots shrink as disks fill

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 example

1 · 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.

Hook input → hook output, abridged
{"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.

Unix socket, abridged
GET /select-worker?project=acme-api&cores=4
→ worker: bolt   reason: success   slots: 4 of 32 reserved

3 · 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, abridged
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.

Streamed to the agent’s terminal
   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 ignored

5 · 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.

What comes back
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 binary

6 · 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.

What the agent sees
failures:
    routes::tests::rejects_expired_token

error: test failed, to rerun pass `-p api --lib`
exit status 101
1 of 6
A worked example: the project, worker name and test output are made up. The hook exchange is abridged from what rch sends.

What 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.

Patterns are the defaults from 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.

  1. Lease writtenbefore any worker is asked
  2. Worker pickedslots reserved
  3. Build runningoutput streaming
  4. Connection lostcompletion unconfirmed
  5. No local rerunit may already have run
  6. 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 example

Strict 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) — retryable

Same 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) — retryable

Same 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) — retryable

The 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.

WhenDefaultStrict RCH_REQUIRE_REMOTE=1
It isn’t a buildRuns locallyRuns locally
rchd isn’t runningRuns locallyRefused exit 103
Every worker is busyRuns locallyRefused exit 103
The worker lacks the toolchainRuns locallyRefused exit 103
The connection drops mid-buildKept for recovery exit 1Kept for recovery exit 1
The hook crashesRuns locallyRuns 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 example

rch --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": […]
  }
}
Worker names are changed and long lists are cut at “…”.

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.

Claude Code
PreToolUse hook

Rewrites a build to rch exec -- <command> before the shell runs it.

Codex, scripts, Makefiles, CI
cargo shim

rch shim install writes a cargo wrapper and prints the PATH line that puts it first. Build and test subcommands go through rch exec.

You, by hand
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 fleet

What agents ask

Six commands that answer questions.

  • rch workers list --json

    One envelope

    Every command speaks JSON

    --json wraps results in api_version, success, data and error. --format toon gives the same data as TOON.

  • rch error explain RCH-E100

    103 error codes

    Errors that say what to do

    Each RCH-Ennn code has a category and remediation steps, in text or JSON.

  • rch diagnose "cargo test"

    Before it runs

    Ask why, ahead of time

    rch diagnose shows 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 admit answers offload, local, queue or defer without syncing or reserving anything.

  • rch exec --job --result-dir crashes -- ./fuzz.sh

    Not just builds

    Fuzzers, shards, benchmarks

    rch exec --job runs any workload on the fleet; declared result folders come back whatever the exit code.

  • rch exec --job --require-tool clang -- ./fuzz.sh

    Verified tools

    Only workers that have it

    --require-tool clang admits only workers whose configured probe for it passed; --require-toolchain bun@1.3.2 filters 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.

Measured

1.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

The rch workspace

  • cold check1.27× faster

    On the server151 sThrough rch exec118 s
  • cold build1.31× faster

    On the server242 sThrough rch exec185 s
  • incremental check mean of 24.1× slower

    On the server1.4 sThrough rch exec6.0 s

asupersync

  • cold check1.21× faster

    On the server96 sThrough rch exec79 s
  • cold build1.27× faster

    On the server163 sThrough rch exec128 s
  • incremental check mean of 21.28× faster

    On the server82 sThrough rch exec64 s
One run per scenario (two for incremental checks, averaged), started on 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

Locally12.4 s
On a worker143.1 s

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.

  1. Gate on?compilation.local_slots > 0. Off by default.
  2. Measure both sidesOnce per project and command kind, again after 7 days.
  3. Local median under 2 s?→ run here
  4. Workers less than 1.2× faster?→ run here
  5. Otherwise→ the fleet
  6. Local runs are cappedat local_slots at 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 elsewhereYour build filesShared cacheLanguages
RCHThe whole command: compile, link, run testsUnchanged: cargo, make, go, bunWarm targets per project on each worker; RABS, below, adds an experimental rustc cacheRust, C, C++, Go, Bun tests, TypeScript checks, Nix
sccacheIndividual compiler calls, cached and optionally distributed; tests run locallyUnchanged; set as a compiler wrapperYes: local disk, S3, Redis and othersRust, C, C++, CUDA
distcc, icecreamC and C++ compile steps; linking stays localUnchanged; set as CCNoC, C++
Bazel, Buck2 remote executionAny action, tests includedRewritten as BUILD or BUCK rulesYesAnything 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
  1. CargoPlans the build and starts each rustc through RUSTC_WRAPPER.starts rustcstarts rustcstarts rustcstarts rustcnot reached
  2. rabs-wrapAsks the daemon, with a p95 budget of 10 ms, or steps aside.asksaskswaits for the installruns rustc itselfnot reached
  3. rabsdBuilds the action key and looks it up.nothing yetcommitted, not trustedtrustednot reached
  4. rustcThe real compiler.compilescompiles againcompilesskipped
  5. 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.

  1. Round 1Execute and commitrustc runs

    The result is stored by content and committed under its key.

  2. Round 2Verify 1rustc runs

    An independent run. Its output digests must match the committed result.

  3. Round 3Verify 2rustc runs

    An independent run. Its output digests must match the committed result.

  4. 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.

  • 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.

  1. 01The compiler callrustc’s arguments, with every wrapper in the chain decoded
  2. 02What it reads, and looks forthe files this one call depends on, including paths it probed and didn’t find
  3. 03The environment it is givenbuilt explicitly and hashed as presented, not guessed from what rustc read
  4. 04Dependency artifactsthe exact bytes of every crate artifact passed to rustc
  5. 05Toolchain and targetthe compiler’s identity and the platform it builds for
  6. 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.

Edgerabs-wrap and rabsd, beside Cargo

Answers the wrapper inside its 10 ms budget. Before a hit is accepted, any doubt sends the call to the real rustc.

Coordinatorone for the fleet

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.

Workerrabs-wkr

Compiles in a sandbox and offers a prepared result. The protocol has no message a worker could use to commit one.

Storecontent-addressed

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.

The RABS docs

Warm cache vs. ordinary RCH1.2× slower

RCH, run 122.75 sRCH, run 222.80 sRABS, warm27.98 s

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.

Try it on one command
# 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 reclaim

09Install

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.

macOS or Linux · x86_64 or arm64
curl -fsSL "https://raw.githubusercontent.com/Dicklesworthstone/remote_compilation_helper/main/install.sh?$(date +%s)" | bash -s -- --easy-mode

Then

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.

  1. 1Initialize configurationconfig files in ~/.config/rch
  2. 2Discover potential workershosts from ~/.ssh/config
  3. 3Add discovered workersyou pick which join
  4. 4Probe worker connectivitySSH and what each has
  5. 5Deploy worker binaryrch-wkr on each worker
  6. 6Synchronize Rust toolchainthis project’s toolchain
  7. 7Start daemonrchd tracks the fleet
  8. 8Install Claude Code hookthe PreToolUse entry
Check it
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 why

What you need

One Linux box is enough to start.

Workers
  • Linux, reachable over SSH with a key
  • rsync and zstd
  • The toolchains your projects use
  • 8+ cores and NVMe help; rented servers are fine
Your machine
  • 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 doctor says which rsync it found
Your projects
  • Under one root, mirrored at the same path on workers
  • /data/projects by 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.