cloud: one-command dev loop on a kept Cloud machine (build, patch-push, restart, journey in about a minute)
A machine-side change (cmux-tui, cmux-host or acpmux) can now be checked end to end on a real Cloud machine in about a minute, with no image bake or nightly: bun scripts/cmux-next/cloud-devloop.ts --credentials FILE.
Leo, 2026-11-05: "Just running commands and then we're seeing, Oh, okay, we gotta fix this. Then we gotta fix that ... we hill climb within, like, you know, several minutes, we have multiple iterations within that instead of, like, one iteration every couple minutes."
What changes
scripts/cmux-next/cloud-devloop.ts: one kept Cloud machine (cloud-devloop, created on first use) is the dev box. One command:
- rsyncs the worktree's changed files to a warm checkout on a Linux build host (
--build-hostorCLOUD_DEVLOOP_BUILD_HOST); - builds
cmux-tui, the guest's one multi-call binary (dev profile, stripped, the guest's Ubuntu release, baseline zig CPU for libghostty-vt); - pushes a
zstd --patch-fromdelta of what the machine already runs (0.3 MB after a one-line acpmux edit) in 512 KiBfs/writepieces, SHA-256-checked; - flips
/opt/cmux/currentto a dev profile and restarts cmux-host and acpmux.service;--restoreundoes it; - runs the Cloud journey on that machine and prints the first red step with the journal lines since the run began.
cloud-journey.ts:
--machine IDruns on an existing machine, keeps it, and resets an earlier run's model stub.--keyed-startchecks that the app's keyed acpmux start still holds after acpmux.service's restart delay, which is the take-over race of cmux-platform#845.
Measured (production, agent test account)
| iteration | build | push | install and restart | journey | total |
|---|---|---|---|---|---|
| one-line acpmux edit | 20.7 s | 5.9 s | 14.6 s | 22.4 s | 66.8 s |
| no change | 0.9 s | none | none | 20.9 s | 27.2 s |
--keyed-start was red on production before #845 deployed and green after, 36 s each run.
Tests
cloud-devloop.test.ts and cloud-journey.test.ts: 21 pass and 0 fail on the fleet.
Changelog
none
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Machine-side changes (cmux-tui, cmux-host, acpmux) can now be checked end to end on a kept Cloud machine in about a minute, with no image bake or nightly. bun scripts/cmux-next/cloud-devloop.ts --credentials FILE rsyncs the worktree's changed files to a warm fleet Linux build host, builds the multi-call cmux-tui binary there, pushes a zstd --patch-from delta in 512 KiB pieces, flips /opt/cmux/current to a dev profile, restarts the host and acpmux units, and runs the Cloud journey on that same machine, printing the first failing step with the machine's journal lines.
- One-line acpmux edit: build 20.7 s, push 5.9 s, install+restart 14.6 s, journey 22.4 s, about 67 s total; a no-change rerun is about 27 s.
--restoreputs the image's binary back;--snapshotcreates the dev machine as the next base image.cloud-journey.tsgains--machine ID(run on an existing machine and keep it, resetting an earlier run's model stub) and--keyed-start, which verifies the keyed acpmux start still holds after acpmux.service's restart delay — the take-over race of cmux-platform#845.- 21 tests pass, 0 fail on the fleet.