Expand description
amont slot run and amont slots (ADR-0014): the host slots for any
command, and who holds them.
amont slot run [--weight N] [--max-wait S | --now] -- <cmd…> waits for a
slot, runs the command with GREENHARNESS_HOST_SLOT=held, passes its exit
status through and frees the slot when the command exits. The wrapper
alone holds the slot: its descriptors are close-on-exec, so a daemon the
command leaves behind never keeps it. A wait ends, with exit 75 and nothing
run, when the line makes no progress for 300 s or --max-wait runs out
(default 90 s, under Claude Code’s 120 s Bash timeout) (ADR-0022). --now
skips the queue up front: the command runs at once, unqueued, journalled
now.
Constants§
- BUSY_
EXIT - Exit status for “the host stayed busy; nothing ran” (EX_TEMPFAIL).
- DEFAULT_
MAX_ WAIT - The default
--max-wait: under Claude Code’s 120 s Bash timeout, so a wrapped command is never killed while it is still queued. - QUEUE_
FAILED_ EXIT - Exit status for “the slot queue failed after it was joined; nothing ran” (EX_IOERR): unlike a busy host, retrying the same command fails the same way.
Functions§
- cores_
phrase amont slots [--json].6 cores, 12 threads: the threads only where they differ from the cores (SMT), and a short tag when the count did not come from plain detection, so theslotsheader stays inside 80 columns.doctornames the key.- doctor_
line - The host sizing lines
doctorprints, one per key so each fits in 80 columns: the core count and the slot count, each with the source that set it. Any warning about either key is printed separately, once, byhost_slots::host_sizing. - slot_
command amont slot <args>.- slots_
command - split_
at_ dashes - The arguments before
--, and the command after it.