-install and -probe-cli¶
These two modes put the agent CLI in place and test it. The other modes and the flags table are under Daemon lifecycle (flags).
An untagged rule on this page matches the reference as measured on build 5fd08069 or an earlier build. A build that a section names in its first lines holds for that section. The other marks are those of the protocol reference.
Common tasks¶
Install from a URL¶
- Run
claustrum -install -cli-version <v> -cli-url <u> -cli-checksum <sha256>. Write the digest in lower case (rules). - Read the facts line.
Install from a blob¶
- Run
claustrum -install -cli-version <v> -cli-zst <p>. Add-cli-checksum <sha256>to verify the blob. - The blob goes once a cache miss put the new CLI in place. A cache hit keeps it (rules).
Keep N versions¶
- Add
-cli-keep <n>to the install run. - Expect a prune on a cache miss and after a good install (rules).
Read the facts line¶
- Find the stdout line that starts with
__INSTALL_RESULT__(fields). If there is none, read the exit code (rules). - Test
cliError, and with the managed launcher gate alsolauncherStatus(rules).
Classify a CLI¶
- Run
claustrum -probe-cli <path>. - Read stdout (results).
Decide a retry¶
- Find the text of
cliErrorin thecliErrorcatalogue and read its row.
-install — ensure the agent CLI¶
The builds ran on Linux, macOS and Windows. A rule that names one system, or that sits under a lead-in that names one, was measured on that system only. REFERENCE-BUILDS.md has the history of most of these rules.
-install makes sure that one CLI version is in the cli-dir. On a cache miss it
downloads or reads the CLI, extracts and verifies it, puts it in place and runs
<cli> --version once. Then it prunes old versions and prints one
__INSTALL_RESULT__<json> facts line (schema in __INSTALL_RESULT__ facts).
-cli-version <v>(default none, needed for any install, not enforced): The version to ensure. It names the CLI file. Without it thecliPathis empty, no CLI runs and no folder is made.-cli-dir <d>(default<home>/.claude/remote/ccd-cli): The folder of the version files. An empty value takes the default too.-cli-url <u>(default none): Download the zstd archive of the CLI from this URL. Send it with-cli-checksum.-cli-checksum <sha256>(default none): The SHA-256 of the archive.-cli-zst <p>(default none): Read the zstd archive from this file, the blob.
-cli-keep, -max-cli-bytes (CT-7), -cli-download-timeout and the deprecated
-cli-probe-timeout and -libc-probe-timeout are in
Flags and config keys. -install reaches the network only
with -cli-url.
-install exits 0 whenever it prints the facts line. It reports a failure inside
the facts as cliError. Four cases print no facts
line. A refused place exits 78. A flag that does not parse exits 2. -cli-version with no -cli-dir and
no home folder exits 2. Any other -install run with no home folder exits 1 (for -serve, see DAEMON.md). With no HOME
the reference prints claude-ssh: cannot resolve home directory: $HOME is not defined
on stderr (Linux). claustrum prints the same line with its own prefix,
claustrum:. On Windows its line names %userprofile%. The exit 1 cases, macOS and a missing USERPROFILE are not
measured.
The cliError catalogue¶
Every error that ensureCLI returns lands in
cliError verbatim, with the wrapping prefix that its phase adds. That is the
form a driver sees:
installed cli at <path> is not runnable: the--versionrun of a new CLI did not start or exited non-zero.<path>is the final pathcli <v> missing and no --cli-url or --cli-zst provided: cache miss with no source flagcli unresponsive: the installed Claude Code binary started but did not answer --version within 30s (120s for a first run) and was stopped; the host is not letting it run (endpoint security software or a stalled network home are the usual causes): a direct--versionrun that its bound stopped. Always-on, parity (see The direct--versionrun)checksum mismatch: expected=<x>, actual=<y>:-cli-checksumverify failed (see Checksum and verify ordering)opening input: <err>:-cli-zstopen errordecompressing: <err>: bad zstd blob or body, for exampleinvalid input: magic number mismatch. A-cli-zstfolder givesread <p>: is a directory(Linux). A full disk giveswrite <cli-dir>/.fetch-<n>: <text>(\on Windows). The text isno space left on device(Linux, macOS) orThere is not enough space on the disk.(Windows)decompressing: decompressed size exceeds configured limit: a single-segment zstd frame declares over 512 MiB (parity).decompressing: window size exceeded: a frame with a 1 GiB window (measured on Linux,-cli-zst)decompressing: decompressed CLI exceeds <n> bytes: CT-7 cap, opt-instaging cli: <err>: no staging file can be made in the cli-dir (claustrum's own, not measured)download failed with status <n>: the server answered a status other than 200. The text has no URL and no reason phrasedownload failed: response exceeds <n> bytes: CT-7 cap on the download body, opt-indownload failed: <transport err>: a transport error before the body, for example a refused connection. The prefixdownload failed:also wraps every other download error that has no bare form in this tabledownload failed: Get "<url>": net/http: timeout awaiting response headers: no response headers for 60 s (always-on, parity)download interrupted after <got>/<total> bytes: <transport err>: a body read with aContent-Lengththat ended with a transport error, for exampleread tcp …: read: connection reset by peer(parity, measured on Linux)download interrupted after <got> bytes: <transport err>: the same for a body with no length. The chunked cut (unexpected EOF) isb3081b51, measured on Linux. A reset there is claustrum's own, not measureddownload failed: context deadline exceeded (Client.Timeout or context cancellation while reading body): CT-8 download deadline, opt-indownload stalled: no data for 60s after <got>/<total> bytes: the read-idle abort below (always-on, parity)mkdir cli dir: <err>: cli-dir uncreatable.cliPathis then empty. A file or a FIFO at the cli-dir path is replaced first (see Staging and cleanup)cli version "…" must be a single path component: D6 hardeningcli path must not be or contain the home directory: "<path>": D2 hardening (see Staging and cleanup)clearing stale dir at <path>: <err>: an occupiedcliPathdirectory that claustrum cannot removerename: <err>: the rename of the new CLI failed, for examplerename: rename <tmp> <cli>: Access is denied.on Windows. The prefix on Linux and macOS is claustrum's ownrename: staging file vanished before install: <err>: a concurrent sweep took the staging filecli unresponsive: the installed Claude Code binary was started through the host's managed launcher <argv0> and the run did not answer --version within 33s (123s for a first run), so it was stopped; the launcher or the host is not letting it finish: a managed launcher run that its bound stopped, withCLAUDE_SSH_MANAGED_LAUNCHER=1(see The managed launcher)
The download forms use different wording on purpose, to match the reference. The
status, stall and interrupted forms are fully worded and go out bare.
staging cli: and decompressing: also go out bare on -cli-url. Every other
download error carries the download failed: prefix. The
status form omits the URL, so a signed URL cannot reach whatever captures the
__INSTALL_RESULT__ line. A bare chmod failure propagates as the raw
Go error.
These strings are not free-form diagnostics: the driver reads them. A change to a row's wording can change what a user sees. No JSON-RPC frame has to move. A new guard whose error pre-empts a row can do the same. CT-7's opt-in cap is the worked example. How the driver classifies them is a third-binary claim. See Driver claims and their provenance.
The managed launcher¶
Measured on Linux, unless a rule names its system:
-installuses the managed launcher only whenCLAUDE_SSH_MANAGED_LAUNCHERis exactly1. Every other value, and an unset variable, adds no field and runs no launcher. Values other thantrueand1(a trailing space) are not measured.- With the gate and a CLI path,
-installresolves the launcher for that path, as launcher.resolve does. The facts line then gains launcher fields aftercliWasPresent,cliErrorandcliUnresponsive, in this order:launcherStatus,launcher,launcherSource,launcherPath,launcherReason,launcherStderr. A field that does not apply is omitted. With-cli-url,fetchcomes aftercliUnresponsiveand beforelauncherStatus(Linux). - An empty
cliPathgains no launcher field. That holds without-cli-version, where the line ends"cliPath":"","cliWasPresent":false}, and for a cli-dir that cannot be made (Linux). - With
-cli-versionand no-cli-dir, the CLI path is in the default CLI folder, and the launcher gets that path (macOS). none: the CLI runs directly under the direct bounds below, with the gate in its env. The facts end"cliWasPresent":true,"launcherStatus":"none"}. A stopped direct run ends"cliUnresponsive":true,"launcherStatus":"none"}. On Windows the resolve always answers none, so-installappends"launcherStatus":"none"last and runs the CLI directly.usable: the CLI runs once, as<launcher argv...> <cli> --version. No direct run happens. The launcher's stdout is not reported, and its stderr does not reach-installstderr. The facts addlauncherandlauncherSource.unusableorunreadable: the CLI does not run at all.cliWasPresentstays true, and there is nocliError. The facts addlauncherSourceorlauncherPath, andlauncherReason.probe_failed: the launcher run exited non-zero or ended on a signal.launcherReasonisexit status <n>orterminated by SIGTERM. The CLI file stays,cliWasPresentstays true, and there is nocliError.launcherStderrholds the launcher's stderr. If that is empty, the field is omitted.launcherStderrkeeps 8192 bytes. More stderr adds\n[… <n> more bytes], with the JSON escape\non the line and…as rawe2 80 a6.<n>is the count of dropped bytes. claustrum's own (not measured): it keeps the first bytes, and it adds the\nalso after a kept part that ends in a newline.- On a cache hit a launcher run that has not ended at 33 s is stopped. The facts
then read
"cliWasPresent":false, the launchercli unresponsive: …text above,"cliUnresponsive":true,"launcherStatus":"unresponsive"and"launcherReason":"did not exit within 33s and was stopped". The CLI file stays, no install follows (with a source flag, claustrum's own), nothing is pruned and the sweep runs (Linux and macOS). With a usable launcher the direct bounds do not apply (Linux and macOS). - The run right after a fresh install has a bound of 123 s (Linux). A stopped run
gives the same facts with
"launcherReason":"did not exit within 123s and was stopped". The CLI stays installed, the blob is consumed and nothing is pruned. - A fresh install puts the CLI at its final path and then runs it once through a
usable launcher, which gets the final path. The facts read
"cliWasPresent":falsewith the usable fields (Linux and macOS). A failed run and an unusable launcher still leave the CLI installed (Linux,-cli-url). claustrum does the same for an unreadable answer and for-cli-zst(claustrum's own). - On a cache hit on Linux the CLI file must be a regular file with an exec bit
that starts with
#!or an ELF header of this machine. Another file does not run, and the install runs over it. The reference does that for a text file and for an ELF of another machine. The test beyond those two files is claustrum's own. - The launcher run gets the daemon env without
CLAUDE_SSH_MANAGED_LAUNCHER(Linux and macOS). claustrum also dropsCLAUDE_CODE_PROCESS_WRAPPERandCLAUDE_SSH_E2E_MANAGED_SETTINGS_DIRthere, as for a spawn with a launcher (claustrum's own). - claustrum's own (not measured): the stop kills the run's whole process group while the run still runs, and then waits up to 2 s for its output. The texts name the launcher's argv[0] only.
-installstill exits0with an empty stderr, and it writes no[LauncherHandler]line.
The direct --version run¶
The run and its bounds are parity. A direct run is a run with
no usable launcher: the gate is unset, or the launcher status is none.
- On a cache hit a run that has not ended after 30 s is stopped. The facts then
read
"cliWasPresent":false, the directcli unresponsive: …text and"cliUnresponsive":true.-installexits0with an empty stderr. - The run of a CLI that this run installed is stopped at 120 s, with the same text. A new CLI that replaced a file at the final path that did not run gets the same bound (Linux).
- The download time is outside the bound (Linux and Windows). claustrum starts the clock right before the process start call.
- On Linux and macOS the CLI runs in a process group of its own, in the session of
-install. A CLI that ignores SIGTERM stops at the same time. claustrum kills the group with SIGKILL (claustrum's own). A child in a new session survives. - On Windows the stop ends the CLI process, and its children stay alive.
- A process that holds the output of the CLI after the CLI exited delays nothing. claustrum gives the CLI the null device as stdin, stdout and stderr (claustrum's own).
- After a stopped cache hit the CLI file stays, nothing is installed or pruned, a
-cli-zstblob stays and the sweep runs. A-cli-urlserver gets no request (Linux and Windows). - After a stopped first run the new CLI stays at its final path, the
-cli-zstblob is consumed and nothing is pruned. With-cli-urlthe facts carryfetchaftercliUnresponsive.
The default CLI folder¶
- With
-cli-versionand no-cli-dir, or an empty-cli-dir, the CLI folder is<home>/.claude/remote/ccd-cli. On Windows<home>isUSERPROFILE, andHOMEis not read. The other steps work there as in an explicit folder. - Each new level of the folder chain gets mode
0700, also with umask000, and a level that exists keeps its mode (Linux and macOS).
The CLI file name on Windows¶
- The CLI file is
<cli-dir>\<version>.exe. ThecliPath, the file on disk, the path of the--versionrun and thenot runnabletext all carry that name. Themissingtext names the version with no suffix. - The suffix is added always, so
-cli-version 9.9.9.exeinstalls9.9.9.exe.exe. A version that ends in.EXEis not measured. - Only
<version>.execounts as present. A file with the bare name counts for nothing and does not run. So a CLI at the bare name answersmissinguntil a source flag installs the.exefile beside it. - A folder at the bare name stays. A folder at the
.exename is replaced by the CLI file.
Download progress and fetch stats¶
On the -cli-url path:
- While downloading,
-installprints__INSTALL_PROGRESS__<json>lines to stdout:{"phase":"download","bytes":<n>[,"total":<m>]}.totalcarries the Content-Length. If the server sends none,totalis dropped. - A leading
bytes:0line comes after the response headers and before any body byte. A server that sends no headers gets no line (Linux and Windows). A finalbytes:<n>line needs a passed checksum (Linux). On Windows it also waits for the CLI rename. A rename onto a directory link, a junction or a dangling link fails withAccess is denied.and prints none (4c111e86, measured on Windows). A denied rename onto a CLI with the same bytes counts as done and prints the line. A failed chmod, the D2 refusal and a folder that cannot be cleared print none on Windows. Both are claustrum's own, not measured. - Between those two lines a tick comes each 1 s. If the byte count of a tick equals
the count of the last printed line, the tick prints nothing. The counts jump irregularly, so a
consumer treats them as progress, not as a byte-exact sequence. If a tick printed
the full count already, no final line follows (
b3081b51, measured on Linux after a held final chunk). Other bodies, such as one with aContent-Length, are claustrum's own, not measured. claustrum starts the tick clock at the first readable body (claustrum's own). - The facts line gains a
fetchobject aftercliErrorandcliUnresponsive,{"bytes":<n>,"ms":<n>,"longestPauseMs":<n>}. Those are bytes read, download duration and the largest gap between reads. A wait for the final chunk of a chunked body counts for neither number. A wait of 2.5 s gavems15 to 33 andlongestPauseMs2 to 3, and the install ended after that chunk (b3081b51, measured on Linux). It is the last field, except with the managed launcher gate (see above). It appears whenever a download was attempted, even a 0-byte 404. A-cli-zstinstall and a cache hit have nofetch. - claustrum does not close its idle connections after the download. Its transport is a copy of the Go default transport, whose idle limit is 90 s.
- The wait for the response headers has an always-on 60 s limit (Linux and
Windows). A server that sends nothing fails the install with
download failed: Get "<url>": net/http: timeout awaiting response headers. No progress line is printed, andfetchreads"bytes":0and"longestPauseMs":0. - A body read that ends with a transport error fails the install with a
download interruptedtext above. The wait from the last byte to the error counts forlongestPauseMs. One progress line is printed, and the cli-dir stays empty. A body that ends early with a clean close answersdownload interrupted after <got>/<total> bytes: unexpected EOF. claustrum words other read errors the same way (claustrum's own). - The body has an always-on 60 s read-idle abort, reset on every byte. It fails
the install with the
download stalled: …text above. It is no total deadline, so a slow download that keeps sending completes. The total deadline is the opt-in CT-8. When armed, it bounds the whole exchange, so an honest download that is too slow fails with its text above.
The other clocks: each -install clock on this page is a clock of the reference and is
always on. The opt-in CT-8 deadline is one exception. The 2 s output wait of a
stopped launcher run and the 0.2 s rename retry are the others (claustrum's own).
Conventions for opt-in entries
has the stdlib transport clocks of -cli-url.
Checksum and verify ordering¶
- claustrum verifies
-cli-checksumon the-cli-urlpath unconditionally. An empty checksum still fails. - The source is decompressed into the staging file first, and the checksum comes
after it. A body that is no zstd archive answers
decompressing: invalid input: magic number mismatchwith a right and with a wrong checksum.fetchthen counts the bytes that the decoder read, and only the leading progress line is printed (Linux). No chmod, clear or rename runs before the checksum passes (claustrum's own). - If a
-cli-checksumis supplied, claustrum also verifies the-cli-zstblob, as the reference does (D1, retired). A mismatch keeps the blob. An absent or empty checksum verifies nothing. - The compare is case-sensitive on both paths. The right digest in upper case
answers
checksum mismatch: expected=<UPPER>, actual=<lower>(Linux). - Every cache miss with a CLI path and a version that D6 accepts, with or without a
source flag, makes the cli-dir first (mode
0700, with its parents). That is before the source check, before the blob opens and before any network access (Linux). So after that step a failed cache miss leaves the cli-dir. A new cli-dir stays empty. - On Linux and macOS that folder step also runs on a cache hit. Windows makes the
cli-dir on a cache miss only. On Linux and macOS the step uses the
-cli-dirtext as given, so-cli-dir <dir>/sub/..makes<dir>/sub(mode0700). On Windows<dir>/subis not made. If the step fails,cliPathis empty andcliErroris the mkdir error, such asmkdir cli dir: mkdir <dir>/sub: not a directory.
-cli-version hardening (D6)¶
The hardening of -cli-version is D6:
- The version must be one path component. Otherwise claustrum answers
cli version "…" must be a single path component(claustrum's own). It answers before the install writes or removes anything at a path built from the version, and the blob stays.2.0.0-beta.1and1.0.86+build.5are accepted too. - A regular file at the joined path is first run with
--version, as the cache-hit check. A run that passes answers"cliWasPresent":truewith that path, as on the reference (Linux and macOS). A stopped run answers the unresponsive text. D6 answers only when that run fails, or when no file is there. - The two sweeps of the cli-dir name only the cli-dir, and they are not behind this rule.
- A version with a sweep name, such as
.fetch-1or1.0.0.zst, installs. The same run keeps it, because the sweep removes only old entries. A later install removes it once it is more than 10 minutes old. On Windows the file is<version>.exe, and the sweep keeps it.
Staging and cleanup¶
- claustrum stages the CLI at
<cli-dir>/.fetch-<random>and renames it to the final path. That is one code path for-cli-urland-cli-zst. A download is decompressed into that file as it arrives, and no other file is made. - An install puts the new CLI at its final path, removes the
-cli-zstblob and runs the 10 minute sweep. Then<final path> --versionruns. A direct run that does not start or exits non-zero removes the new CLI again with one plain remove. A stopped run keeps the new CLI. On Windows claustrum can leave that file when the exited CLI holds it (claustrum's own). - What is at the final path goes before the new CLI runs. A folder there is removed as a tree, with its content. A file there that does not run is replaced by the new CLI (Linux). A new CLI that then exits non-zero leaves nothing at that path (claustrum's own).
- claustrum clears an occupied
cliPathonly when it is a directory, becauserename(2)refuses to replace a directory. A regular file is replaced by the rename. On Windows the cleared name is<version>.exe. The D6 rule runs first, socliPathis a direct child of the cli-dir. - claustrum does not remove a folder at the final path that is the home folder or
contains it (D2). It answers
cli path must not be or contain the home directory: "<path>". The folder stays, the blob stays and no CLI runs. The reference removes that folder as a tree and puts the CLI file there. That is measured with-cli-zston Linux, macOS and Windows, and-cli-urlis not measured. - That guard runs the lexical test of the RPC paths first. Then it compares the folder at the final path with the home folder and with each parent folder of it, by file identity, for the home path as given and for its resolved path.
- On macOS the volume ignores letter case, so a
-cli-versionin another letter case names a folder on disk. Both binaries replace such a folder that does not hold home, and the new file takes the name of the command. For a folder that holds home, claustrum refuses as above. - The
-cli-zstblob goes with one plain remove once the new CLI is in place. No guard runs before that remove. Every earlier failure keeps it: a blob that is no zstd archive, a folder that cannot be cleared and a denied rename. claustrum keeps it after a failed chmod too (claustrum's own). A CLI that then does not run still costs the blob. - On Windows a rename that access denied stops is tried again for 0.2 s. If the target then holds the bytes of the staging file, the install counts as done and the staging file goes. The 0.2 s bound and the pauses are claustrum's own.
- A cli-dir path that names no folder is replaced. The trigger is a regular file, a
symlink to a regular file or a FIFO at the cli-dir path.
-installremoves that entry, and for a symlink it removes the link and keeps the target. It also removes the regular file named exactlyccd-cli-versionin the parent folder of the cli-dir. Then it makes the cli folder with mode0700and goes on. That holds for the default CLI folder too, and with no source flag. - The name
ccd-cli-versionis literal. A file with any other name stays. - A folder, a symlink to a folder and an absent cli-dir trigger nothing, and
ccd-cli-versionstays. A dangling symlink triggers nothing either, and the answer ismkdir cli dir: mkdir <path>: file existswith an emptycliPath. With a parent folder that is not writable nothing is removed, and the answer ismkdir cli dir: mkdir <path>: not a directory. Thosemkdirtexts are the Linux and macOS texts. Windows has no FIFO case and no case with a parent that is not writable. - Both removes are plain removes of one path, never a tree. claustrum's own (not
measured): it removes the version file first, and if that fails, the cli-dir
entry stays. It leaves a socket, a device,
a symlink to a FIFO and a
ccd-cli-versionthat is a folder or a symlink alone.
Sweeps and prune¶
The -cli-keep prune:
- Only a version file counts, and only a version file goes, with one plain
remove, never as a tree. On Linux and macOS that is a regular file whose name
is a version such as
1.0.0, with an exec bit. On Windows it is a regular file<version>.exe. Every other entry stays and takes no keep place. - claustrum counts a name of three runs of digits with dots between them. Other names are not measured.
- The order is the mtime, newest first. Entries with one mtime stay in byte
order of the name, so the later name goes. The new CLI takes its place in the
order and always stays.
-cli-keep 0and a negative value remove every version file but the new CLI, and the result line follows with exit0and an empty stderr. - A failed install, a stopped run and a cache hit take no
-cli-keepprune. A fresh install takes it after the launcher statesunusable,unreadableandprobe_failed(from the code).
The prune of a cache miss¶
A cache miss prunes before the fetch, with the same rules (be1c1ca5, measured on Linux,
macOS and Windows).
- It keeps the newest
-cli-keepminus 1 version files, and at least one. A failed install prunes too: no source, a refused download and a checksum mismatch. - After a full disk a second prune keeps one version file, whatever
-cli-keepsays.cliRemovedcounts its removes, and a count of 0 omits it. The blob stays. - A user quota counts as a full disk. Linux gives
disk quota exceeded. Windows gives the text of a full disk. macOS is not measured. - claustrum reads a full disk from the error number:
ENOSPCon Linux and macOS, alsoEDQUOTon Linux,ERROR_DISK_FULLon Windows. Only the texts are measured. - A file of the named version in the cli-dir stays and takes no keep place (Linux). After a full disk that is claustrum's own, not measured.
- Both prunes skip the
-cli-zstblob, also under a version name (claustrum's own).
Two sweeps remove old regular files of the cli-dir with one plain remove each,
never as a tree. A folder and a link stay (from the code for a link). A
<version> is a version name as in the prune:
- The 10 minute sweep takes
.fetch-<digits>and<version>.zst. - The 7 day sweep takes
<version>.zst.part. - The 7 day sweep runs once before any CLI runs, also on a cache hit. On a good cache hit only that sweep runs. The 10 minute sweep runs before the run of a new CLI, after a failed attempt and after a D6 refusal. On a cache hit it runs only after a run that its bound stopped.
- Neither sweep removes the
-cli-zstblob, even a blob named<version>.zstin the cli-dir. - The names match the letter case (claustrum's own). A future mtime is not old (Linux).
- A concurrent install can take a staging file only once it is more than 10
minutes old. claustrum then retries a
-cli-zststaging step once.
The sweeps and the prune skip an entry of the cli-dir that is the home folder or holds it (D2, claustrum's own). The reference removes no folder there, so a home folder stays there too (derived from its measured runs, none with a home folder).
The libc probe fills the libc fact¶
- Each probe runs
/usr/bin/lddwith the environmentLC_ALL=CandPATH=/usr/bin:/binalone. If/usr/bin/lddis missing, the probe runs/bin/lddthe same way. If/usr/bin/lddexists but cannot run, the probe does not try/bin/ldd(b3081b51, measured on Linux). Anlddon the PATH of the operator does not run (b3081b51, measured on Linux). The probe runs in/(be1c1ca5andb3081b51, measured on Linux). Its output decides. A "musl" banner reportsmusl, and any other output reportsglibc. The/lib/ld-musl-*.so.*marker is read only whenlddproduced no output. - The probe bounds ldd itself at 5 s, as the reference does (Linux).
lddruns in its own process group, and if it still runs at 5 s the whole group is killed. Output written before that kill is dropped, so the marker decides. No log line is written, and the facts line keeps its shape. The bound applies on a fresh install and on a cache hit. - If
lddexits before 5 s while a child still holds its output pipe, the probe waits up to 2 s more. Then it uses the output it has, even past 5 s, and the child is not killed (Linux).
__INSTALL_RESULT__ facts¶
{
"serverVersion": "<daemon id>",
"os": "linux", // GOOS
"arch": "amd64", // GOARCH
"libc": "glibc", // or "musl", "" off linux (no probe). The driver uses this
// field to pick which CLI build to download, a third-binary
// claim (Driver claims in ARCHITECTURE.md).
"cliPath": "<cli-dir>/<cli-version>", // <cli-version>.exe on Windows. "" when the cli-dir
// cannot be made, and without -cli-version
"cliWasPresent": false, // true only if it existed AND answered --version within 30 s,
// without CLAUDE_SSH_MANAGED_LAUNCHER=1 (see the managed launcher)
"cliError": "…", // omitted on success
"cliRemoved": 2, // the removes of the prune after a full disk. Omitted at 0.
// Its place before cliUnresponsive is not measured
"cliUnresponsive": true, // a --version run that its bound stopped. Omitted when it
// does not apply.
// The launcher* fields appear only with CLAUDE_SSH_MANAGED_LAUNCHER=1,
// each omitted when it does not apply.
"fetch": { // present whenever a -cli-url download was attempted
"bytes": 0,
"ms": 0,
"longestPauseMs": 0 // ~60000 on a read-idle stall abort
}, // the last field without the gate
"launcherStatus": "usable", // none / usable / unusable / unreadable / probe_failed / unresponsive
"launcher": ["<argv>"], // the launcher argv, when one was resolved
"launcherSource": "<file>", // the settings file that gave the value
"launcherPath": "<file>", // the unreadable file or folder
"launcherReason": "…", // why it was refused, failed or stopped
"launcherStderr": "…" // the failed run's stderr, 8192 bytes kept
}
-probe-cli — classify a CLI binary¶
-probe-cli <path> runs the bounded <path> --version runnability probe and exits
0. It is how Claude Desktop classifies a CLI binary out of band, without a full
-install. Its stdout is:
- If the CLI runs and exits 0 within the bound, stdout stays empty.
- If the deadline had to kill it, stdout is
__CLI_HUNG__\n. - If the binary is missing or does not run, stdout is
__CLI_BAD__\n. Not running means it either fails to start or exits non-zero. - With a refused
CLAUDE_SSH_RUN_FROMplace, stdout is__CLI_BAD__\nafter the refusal line on stderr (13047a51, measured on Linux and Windows). - On Windows, a path with no file at exactly that name gives
__CLI_BAD__\n, and nothing starts. The probe never adds.exe. claustrum tests only that the path exists. The exact test of the reference, a folder, a relative path and a path with another extension are not measured.
With CLAUDE_SSH_MANAGED_LAUNCHER=1 the probe uses the
managed launcher (measured on Linux, unless a rule names its system). Every
-probe-cli row exits 0, and each stderr text below ends in one newline:
- A usable launcher runs
<launcher argv...> <path> --version. If the run exits 0, stdout and stderr stay empty. - An unusable launcher prints
__CLI_LAUNCHER__\n, and the CLI does not run. stderr isclaude-ssh: <path> was not run: managed launcher unusable: <reason>. - Unreadable settings print
__CLI_LAUNCHER__\n, and the CLI does not run. stderr isclaude-ssh: <path> was not run: managed settings unreadable: <file>: <reason>. - A failed launcher run prints
__CLI_LAUNCHER__\n, not__CLI_BAD__. stderr holds four lines. The launcher outputL5: to stderr\nis followed by one more newline:
claude-ssh: the managed launcher's run printed:
L5: to stderr
claude-ssh: <path> --version through the managed launcher <argv0> did not succeed: exit status 3
- A launcher run that has not ended at 33 s is stopped. stdout is
__CLI_HUNG__\n, and stderr isclaude-ssh:and thecli unresponsive: …text of-install. - Without the gate the probe runs directly. On Windows the gate changes nothing.
- claustrum's choices (not measured) follow. A none answer runs the probe
directly. An empty launcher stderr leaves out the
printed:block. The stderr cap of-installapplies. A signal readsterminated by SIG<name>.
The -help text of -probe-cli names this mode. With the managed launcher, the
reference changed this one -help line from f6010b97 and no other (measured
on Linux, macOS and Windows).
The direct bound is a fixed 30 s, always applied. The mode unsets
CLAUDE_RPC_TOKEN so the probed child never inherits it. The probed CLI runs in
its own process group, so a terminal Ctrl-C does not reach it. On Unix the
fixed deadline group-kills the whole subtree. On Windows the direct child is killed and WaitDelay bounds
the mode, so a stray descendant is left to exit on its own. The mode installs no SIGINT
handler. A Ctrl-C therefore terminates the claustrum process itself, with exit 130 and
empty stdout. The mode ignores
SIGPIPE, as -install does, so a stdout pipe the caller closes mid-write fails the
write with EPIPE instead of terminating the process.