Repository navigation
Description
The workflow
I want to run BB threads on a remote sandbox I already have SSH access to (Daytona, E2B, a VM, or similar), without SSHing in myself, downloading BB, and running the machine installer by hand.
Today the path is: create the vendor sandbox, SSH in, copy the Manual machine setup command, run it, wait for the daemon. That is the whole bootstrap, and every new sandbox vendor repeats it.
What happens today
Settings → Machines offers this laptop plus Manual machine setup. Manual setup prints an install.sh command that you must run on the target.
Modal is a first-class plugin that allocates compute and bootstraps over Modal exec. There is no shared SSH transport, so Daytona/E2B/other SSH boxes cannot enroll the same way. Each vendor plugin would have to reinvent bootstrap even though core already has experimental_machines.bootstrap({ executor }).
What you would expect
- Install an official plugin.
- Pass an SSH destination (
user@host, SSH config alias, optional port). - BB SSHs in, checks node/npm/curl, and core-installs the daemon.
- The host shows up as a machine; new threads can use a composed project checkout on it.
CLI shape:
bb ssh-sandbox probe --destination [email protected] --json
bb machine create --provider ssh-sandbox --inputs '{"destination":"[email protected]"}' --json
bb thread spawn --project <id> --environment-provider ssh-sandbox --machine-inputs '{"destination":"[email protected]"}' --prompt "..."Keys stay in ssh-agent or an optional server-local identityFile setting. Machine inputs stay non-secret.
Context and alternatives
- Workaround: Manual machine setup on every sandbox.
- Modal already proves the bootstrap-over-executor pattern; this is the SSH equivalent for user-owned hosts.
- Vendor-specific Daytona/E2B plugins can come later and reuse the same core bootstrap; they are not required for the first path.
- I searched open and closed issues for SSH/Daytona/E2B machine enrollment and did not find a duplicate.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 14, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type: Feature, Priority: Medium, Effort: High, and labels:
host,plugins. No existing classifications were present; all values were verified after writing.Manual enrollment provides a workaround. Adding SSH provisioning introduces a new integration and credential-handling design. No reproduction report or pull request: this is new functionality, so the rule’s bug-only steps do not apply.
lanjak commentedon Nov 25, 2026
Hi, I'd like to build this and have a plan, so here is the shape before I prototype it. #3667 was closed by the contributor gate, not on its merits, so I've reused its executor approach on top of core's
experimental_machines.bootstrap({ executor }).The main difference from #3667 is where
sshruns. #3667 runs it on the bb server, with an optional server-localidentityFile. I'd run the systemsshon an enrolled machine the user picks ("Connect from"), normally their desktop, so the user's own keys, agent,ssh_configand ProxyJump work as they are. No key leaves that machine, and the server stores none. SSH is only the setup channel. After setup, the daemon connects through the normal server access route.Shape:
machine-sshplugin with ansshmachine provider, on the existing machine-provider contract. No daemon protocol change.~/.ssh/configor typeuser@host.~/.ssh/known_hosts.bb ssh hosts,bb ssh probe <host>andbb ssh add <host> --host-key SHA256:...bb machine create --provider sshTwo changes to the shared installer, because they also affect manual installs over SSH:
BB_INSTALL_NO_LINGER=1opt-out. Without it, a user unit installed from an SSH session stops when the last session ends.Out of scope for v1: password and MFA hosts, and a bb-managed Node on targets that lack Node 22.19+.
Two questions:
sshon a chosen machine rather than the server: does that fit how you want machine providers to work?I'll link a prototype from my fork here. Checked against main at 562cbc3972.
lanjak commentedon Nov 25, 2026
Prototype: main...lanjak:bb:machine-ssh (13 commits on fb045a0466, each passes typecheck and lint, and the app builds). It follows the shape in my comment above, with the deviations listed below. No PR until we agree on it.
What is in it:
Plugin: built-in
bb--machine-ssh, with ansshmachine provider. No daemon protocol change.Add machine, then Over SSH:
~/.ssh/configor typeuser@hostCheckHostIP noso nothing is copied into~/.ssh/known_hostsLater: Reconnect and "Update over SSH" re-run the installer. Remove uninstalls over SSH. If the host is unreachable, it says what was left behind.
CLI and SDK:
bb ssh hosts|probe|addandbb machine create --provider ssh, with the same calls in the SDK.Core changes:
validateis told which agent thread askedInstaller:
BB_INSTALL_NO_LINGER=1opts out)The last three fix bugs that are also on main.
Deviations from my earlier comment:
bb ssh addhas no interactive confirm. A new key needs--host-key SHA256:....Checked on fresh libvirt VMs (Fedora 45 and Debian 13):
Not run yet: macOS, bb Connect or HTTPS routes, the desktop app, musl or non-systemd targets, tcsh, and Windows.
Found while testing, on main too: the server does not start while a machine setup is pending. The startup recovery sweep waits for the machine lifecycle sweep, and a machine in setup makes it wait 60 s, which equals the launcher's 60 s health timeout. Happy to file it as its own issue.
lanjak commentedon Dec 2, 2026
Update: I rebased the prototype onto 4d7a9af609. Same link: main...lanjak:bb:machine-ssh (head
4eab2ceebd, still no daemon protocol change).