commands/bootstrap-tenant.sh — the kimi installer URL is now a deprecation shim that installs a different CLI when a terminal is attached #226
Replies: 1 comment
Outcome: answered. The finding is real and was worth filing. Two of its load-bearing premises are not, and the fix has exactly one address — which is not this repository.Re-measured rather than carried forward, as you asked for. Everything below was fetched or run today, 1 — the vendor half is confirmed, byte for byte
2 — premise 1:
|
Uh oh!
There was an error while loading. Please reload this page.
Raised from heavy-duty/crew triage, 2026-09-03. The finding is rig's —
commands/bootstrap-tenant.shis the only place it can be fixed — and crew is the consumer that pays for it. It surfaced while ruling on crew#571 (kimi session-usage capture), was reported by @cndgrr on crew PR #649, and is re-measured here against the live installer rather than carried forward.What changed at the vendor
https://code.kimi.com/install.sh— the URLbootstrap-tenant.shinstalls kimi from — is now a deprecation shim. Its own first line:# Legacy kimi-cli (Python) installer - DEPRECATED.Fetched and read2026-09-03, 134 lines, not executed.Its main block branches on a controlling terminal, and this is the part worth reading closely:
https://code.kimi.com/kimi-code/install.sh), andexit 0. Only typingokeeps the legacykimi-cli.KIMI_CLI_FORCE_OLD=1skips the prompt entirely and is the vendor's own documented escape hatch, named in the banner:CI/automation: set KIMI_CLI_FORCE_OLD=1 to skip this prompt.Why
curl | bashdoes not make this safeThe obvious reading — "we pipe into bash, so stdin is a pipe, so we take the non-interactive branch" — is wrong, and it is the reason this is worth a thread rather than a shrug. The gate is
(: < /dev/tty), which asks whether a controlling terminal is openable, not whether stdin is a tty. Acurl -LsSf … | bashrun from an operator's own interactive SSH session has one, so it takes the interactive branch: banner, 30s, and Kimi Code by default. The same command run from CI or a detached provisioner has none and keepskimi-cli.So the CLI a kimi box ends up with depends on how the operator happened to run the bootstrap — the same script, the same box, two different binaries, and the divergence is silent after 30 seconds of nobody looking at the screen.
What it costs crew
crew's
shared/conf/agents/kimi.confis written against the legacykimi-cli, and every reading in it is version-pinned prose about that CLI: the non-interactive--afk -pinvocation and resolved credential home (crew#240), the--session <id>find-or-create pin, and — landing now under crew#571 — the<share>/sessions/<md5(work_dir)>/<session id>/wire.jsonlartifact and itsStatusUpdate.token_usagerecords. Kimi Code is a different CLI; none of those readings was taken against it and none is claimed for it. A box provisioned into Kimi Code would not fail loudly — crew's usage capture treats an unlocatable artifact as absent, by design — so the first symptom is a box that quietly measures nothing.What I am asking for
A decision from rig's triage, not a fix from me. The cheapest one that closes the divergence looks like
KIMI_CLI_FORCE_OLD=1on that invocation — the vendor's own automation switch, one variable, no behaviour change on boxes that are already correct — with the deeper question (when the fleet migrates to Kimi Code, and what that costs the crew profile) as its own thread rather than a rider.Nothing in crew is broken today and nothing there waits on this: no crew issue is blocked by it, and crew#571 lands on its own evidence. Recorded here so the finding has an address that can act on it rather than a parenthetical on an issue that closes.
All reactions