- A tarball archive is cached only when the copy was written in full.
- Claim permission reads use the helper routes' short busy timeout.
- A 404 from the app's permission check falls back to the session
instead of counting as no permission.
- The load rig reads cool-offs per login and the helper's last error.
- A lease that never had a heartbeat is no drop toward the cool-off;
the helper resends a claim's request id after a failure in transit.
- A reply whose lease ended during the submit is answered 410.
- The fast lane is not counted as planner room.
- A follow-up waits on the helper that ran its parent call.
The cached queue order ranks by claimClass when it is built; fast-lane
claims filter the cached order; a lease from the capped claim path drops
the cache; room keeps the stamp cadence and reads the queued calls
through the queued index; one capacity.slots (N plus the fast lane) set
by work; remote_helpers slots and busy defined once.
Heartbeat failures and recoveries are recorded in the heartbeat loop;
status reports retry through withRetry; deleted tokens' statuses go with
pruneRemote; an unaudited harness version holds as harness-missing in a
run as in readiness; a too-old helper names the update command; docs for
update, the status report's slots, busy and last error, and the
remote-starved checks.
The helper refuses Codex versions outside 0.170.x (the lease is released without using an attempt; claim and
doctor say why). Each run is stopped at the first tool item in the --json stream other than an MCP call to the
call's own servers, and after the run the thread's rollout, which records every tool call, may hold only those
MCP tools and view_image; otherwise the call fails and its reply is not submitted.
codex exec runs in the helper's bubblewrap sandbox with its own CODEX_HOME login (harness codex), its shell and
the other tools that reach past the task turned off, and reads through read-only file tools that the helper
serves to the run over localhost MCP, confined to the mounts. One Codex call at a time per helper, so refreshes
of its login never race. Codex has no tier defaults: the config names its models.
The helper keeps a session when the bundle's keepSession says so, submits
usage per model id (explorer included) and the CLI's total cost, and gives a
lease back through the release route when the fault is its own: too old,
wrong platform, missing harness or token, file setup failure, or stopped by
the user. The work loop stops when it can take no call and pauses after a
release. Submit carries costUsd; the server stores it with the call's usage
and records it as the run's cost.
A single-file Node script with only node: imports. It claims calls with the
agent token, keeps each lease secret in a 0600 store keyed by lease id, fetches
the bundle, prepares git (bare-clone cache, trees keyed by repo and commit),
tarball and inline mounts without instruction files, writes the per-lease MCP
config, and runs claude in bubblewrap with the same fixed paths and clean
environment as the server's sandbox. Heartbeats carry the last progress line;
a 410 stops the run. Session stores are kept for three hours so follow-up
turns resume them. Commands: login, harness claude, claim, run [--detach],
wait, work [--parallel N], doctor and a stdio-to-HTTP MCP proxy.
The test checks stream-json parsing, instruction-file removal, the model swap
and that the helper's copy of the wire format matches src/remote/protocol.ts.