spawn/sh
Ahmed Abushagur 338ae57f71
fix: replace @clack/prompts multiselect with /dev/tty picker for SSH keys (#1907)
* fix: run bun in foreground in DigitalOcean scripts to unfreeze interactive prompts

The _run_with_restart function backgrounded bun with `& + wait` so a SIGTERM
trap could forward the signal. But backgrounding removes bun from the terminal's
foreground process group, which prevents @clack/prompts multiselect from entering
raw mode — arrow keys print as raw escape sequences (^[[A^[[B) and the SSH key
selection prompt freezes.

Fix: run bun in the foreground and detect SIGTERM from exit code 143 (128+15)
instead of using a trap flag + PID tracking. This preserves the restart-on-signal
behavior while giving bun full terminal access for interactive prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: replace @clack/prompts multiselect with /dev/tty picker for SSH keys

When the CLI (parent bun) spawns bash → child bun for cloud scripts,
the parent's event loop keeps fd 0 registered and races with the child's
@clack/prompts for terminal input. This causes the SSH key multiselect
to render but freeze — arrow keys print as raw escape sequences.

Fix: add multiPickToTTY() in picker.ts that opens /dev/tty directly,
bypassing process.stdin entirely. Replace the @clack/prompts multiselect
in ssh-keys.ts with this new function. Also add process.stdin.unref()
to prepareStdinForHandoff() so the parent stops polling fd 0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* perf: disable SSH compression for interactive sessions

Compression=yes adds per-keystroke CPU overhead that causes
noticeable input lag on normal connections. Only beneficial
on slow/high-latency links.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 23:54:54 -08:00
..
aws feat: Bun workspace monorepo — packages/cli + packages/shared (#1853) 2026-02-23 22:07:05 -08:00
cli fix: export PATH after bun install to fix current-shell availability (#1877) 2026-02-24 04:51:00 -05:00
daytona feat: Bun workspace monorepo — packages/cli + packages/shared (#1853) 2026-02-23 22:07:05 -08:00
digitalocean fix: replace @clack/prompts multiselect with /dev/tty picker for SSH keys (#1907) 2026-02-24 23:54:54 -08:00
e2e feat: add live input/output E2E verification for agents (#1886) 2026-02-24 15:16:30 -05:00
fly fix: use npm install for OpenClaw to fix Node module resolution (#1878) 2026-02-24 04:51:09 -05:00
gcp fix(gcp): add network/subnet flags to fix custom VPC subnet mode (#1883) 2026-02-24 14:27:46 -05:00
hetzner fix: add error handling to _ensure_bun() in all Hetzner scripts (#1855) 2026-02-24 01:51:44 -05:00
local feat: Bun workspace monorepo — packages/cli + packages/shared (#1853) 2026-02-23 22:07:05 -08:00
shared refactor: move all shell scripts to /sh directory (#1843) 2026-02-23 21:14:54 -08:00
sprite feat: Bun workspace monorepo — packages/cli + packages/shared (#1853) 2026-02-23 22:07:05 -08:00
test fix: use npm install for OpenClaw to fix Node module resolution (#1878) 2026-02-24 04:51:09 -05:00