Repository navigation
Remove multi-host execution; rename experiment to bb connect - #536
Merged
SawyerHood merged 1 commit intoJul 8, 2026
Merged
Conversation
SawyerHood
deleted the
bb/remove-multi-host-execution-gpt-5-5-impl-thr_wh6ffvmzeg
branch
July 8, 2026 05:52
SawyerHood
added a commit
that referenced
this pull request
Jul 12, 2026
## Summary bb becomes honestly multi-machine: the server orchestrates daemons on any number of computers, gated behind a new **Multi-machine** experiment (independent of bb connect). Product plan + mockups + status: `plans/multi-machine-v1.html`. - **Pick where work happens**: the composer's environment picker groups options by machine (status dots, "this machine" badge, offline w/ last-seen); projectless threads get a machine chip too. Sticky last-used per project. - **Machine-independent projects**: a project anchors to its git remote; each machine holds a source (checkout). Guided setup clones onto a new machine in one dialog (or points at an existing folder); non-git projects link manually. - **Machines management**: Settings → Machines (rename, remove w/ revocation, live status) + Add-a-machine dialog minting a 15-min join code with a copyable one-liner. - **One-command install**: `curl -fsSL <server>/install.sh | sh -s -- --join-code … --host-id … --server …` — installs bb-app, joins, registers launchd/systemd service. Works over LAN or through bb connect (daemon `x-bb-connect-machine` credential wiring, gate `/api/v1` machine access, defense-in-depth preserved). - **Server-distributed updates**: the server serves its own bb-app tarball (`/install/bb-app.tgz`); installs prefer it over npm (unpublished versions work by construction) and daemons self-update on protocol mismatch (newer-server-only, rate-limited, downgrade-refusing) with a "Needs update" state in the UI. - **Remote-correct execution**: injected skills sync via content-addressed pull (byte-identical staging verified); workspace `AGENTS.md` + project skills read via daemon RPC — fixes the silent instruction/skill loss that sank the earlier multi-host attempt (#510/#536). - **CLI**: `bb machine list`, `--machine` on `thread spawn` / `project source add` (+ clone variant), guide/skill/docs updated. Also fixes two pre-existing bugs found along the way: enroll keys lived ~10.4 days instead of 15 minutes (better-auth `defaultExpiresIn` is seconds), and join-code minting left phantom "pending" host rows. ## Verification Every step was live-verified on a two-daemon rig (second daemon with fresh identity/data dir) including browser QA of the picker, guided setup (success + `target_not_empty` error paths), Machines pane, add-machine dialog, and a projectless thread on the second machine. Capstone: one CLI command provisioned a managed worktree on the second machine and the agent answered from planted workspace instructions. Full repo typecheck green; all package suites green. The bb connect machine path is covered by a full workerd auth-matrix (cross-tenant 403s, header stripping, revocation) — a real staging tunnel run remains (needs staging gate/web deploys). Migrations are consolidated into a single generated `0064` (dev data dirs that applied interim migrations need a reset). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #510 shipped two separable things: multi-host thread execution and bb connect. Multi-host isn't ready for prime time yet — this removes it from main while keeping every bb connect feature, and renames the gating experiment from "Multi-machine" to "bb connect" so it gates only the connect surfaces.
Multi-host execution removed (host targeting back to pre-#510, primary-only)
assertPrimaryHostId(non-primary → 400unsupported_host); deletedassertUsableHostId, themulti_machine_disablederror, and its experiment dependency. Reverted all call sites:routes/files.ts,routes/hosts.ts,routes/projects.ts,services/system/host-lookup.ts,services/threads/thread-request-eligibility.ts(restores theStableThreadRequestProjectDatamachinery),services/terminals/terminal-session-lifecycle.ts(gate +configdep, incl. the integration-harness change).bb host listandbb thread spawn --host(commands, registration, tests, guide/skill/docs mentions).docs/m4-multimachine-evolution-overview.html.Experiment renamed:
multiMachine→bbConnect("bb connect")0057_useful_manta.sql(RENAME COLUMN multi_machine → bb_connect— existing opt-ins carry over).server.tsisConnectEnabled, plugin-service gate + user-facing strings,routes/system.tsreconcile, CLI plugin-proxy fallback (string contract kept in sync), Settings UI, builtin skills, guide templates (regenerated),docs/configuration.md.Untouched
plugins/connect,apps/connect,apps/web,packages/tunnel-contract,packages/connect-db, deploy workflows — verified byte-for-byte identical. The live plugin load/unload on experiment toggle from #533 keeps working under the new name.Validation
plans/and historical migration artifacts🤖 Generated with Claude Code