How do agents share the two macOS VM slots, and where do VM tests run?
Decided 2026-10-04: C. By hand for now, with VM builders run one at a time. The decision and its reasons are in the I50I50 (closed): Test infrastructure for work that needs a running macOS guestMost v1 work needs a running macOS guest to test: spikes X02-warm-start to X08-data-disk and X17-image-build to X20-shared-homebrew, the conformance suite, and the benchmarks (S11-verification-and-spikes). comment that starts Decision (2026-10-04):. Source: I50I50 (closed): Test infrastructure for work that needs a running macOS guestMost v1 work needs a running macOS guest to test: spikes X02-warm-start to X08-data-disk and X17-image-build to X20-shared-homebrew, the conformance suite, and the benchmarks (S11-verification-and-spikes).. Affects S02-toolchainS02-toolchain: ToolchainStandardize how this repository manages runtime versions, repo tasks, and CI., S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…, docs/agents/orchestration.md and .github/labels.yml. Related: I43I43 (closed): S06-vm-lifecycle: VM slot admission for image builds, updates and GUI work (NFR05-two-macos-vms)NFR05-two-macos-vms allows two running macOS guests per host, and S06-vm-lifecycle uses both: the work VM and the isolated VM. (the same limit in wb-hostd).
The problem
Section titled “The problem”Figure 1. On a development Mac, builder agents whose issue needs a VM take a slot lock before they start one. A second such builder waits (red) instead of failing at start. The maintainer’s own Wraith Box VMs hold a slot without the lock, and the Virtualization framework enforces the limit for everyone. The conformance suite and benchmarks run on a separate self-hosted Mac, for main only. GitHub’s hosted runners keep running mise run ci, which doesn’t start a VM.
Options
Section titled “Options”Impact
Section titled “Impact”Evidence
Section titled “Evidence”- verified Tests that need guest VMs can’t run on hosted runners and aren’t part of
ciuntil self-hosted runners exist (S02-06-prose-secrets-vm-testsS02-06-prose-secrets-vm-tests: Prose, Secrets and VM TestsHow prose is checked, how secrets are kept out of the tree, and where the tests that run guest VMs run. and S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…, “CI”). - verified V1-M3-network-floorV1-M3-network-floor: The network floorwb-netd and wb-proxyd in inspect mode with a static policy, the audit log, and the conformance cases for egress. includes “the conformance cases for egress” (V1-initialV1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there.).
- verified The VM spikes are X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment., X03-network-pathX03-network-path: Network pathA macOS guest boots on the file-handle attachment with the gVisor stack: gets a DHCP lease, resolves only allowlisted names, reaches only the proxy., X05-fs-benchmarkX05-fs-benchmark: Filesystem benchmarkData disk with default versus relaxed write-through settings, against the host, on the NFR02-fs-speed workloads. to X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., X17-image-buildX17-image-build: Unattended image buildCan a macOS guest installed from an Apple restore image get past Setup Assistant, with wb-guestd running as a root LaunchDaemon, without SSH, scripted clicks, or MDM?, X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest? and X20-shared-homebrewX20-shared-homebrew: Homebrew with more than one project userCan each project user in one guest get its declared Brewfile without a Homebrew prefix that another project user can write to (SEC08-proj-isolation)?, and only one or two run at once per machine (
docs/implementation-plan.md, “Critical path”). - verified
/waveorders spikes first and fills up to six issues, default four (.claude/skills/wave/SKILL.md). Noneeds-vmlabel exists in.github/labels.yml, andplanning.mdsays to add such a label when the first issue needs it. - verified
lockf“acquires an exclusive lock on a file” and runs a command while holding it (man lockf, macOS 27.0.1). - verified Starting a VM past the limit fails with
VZErrorVirtualMachineLimitExceeded(VZError.h, macOS 27 SDK). - verified EC2 Mac instances are “bare metal instances on Dedicated Hosts, with a minimum allocation period of 24 hours”, including M4 and M4 Pro Mac minis (AWS EC2 Mac documentation).
- verified The repository
wraithbox/wraithboxis private (gh repo view). - assumed That a restore image is around 15 GB, as the issue says. The catalog lookup failed from this machine. X17-image-buildX17-image-build: Unattended image buildCan a macOS guest installed from an Apple restore image get past Setup Assistant, with wb-guestd running as a root LaunchDaemon, without SSH, scripted clicks, or MDM? (I28I28 (closed): X17-image-build: Unattended image buildX17-image-build (added to S11-verification-and-spikes in #14)) records the real size.
- assumed That a bare-metal EC2 Mac runs two macOS guests like a local Mac. Nobody has tried it for this project.
What this unblocks
Section titled “What this unblocks”- Running the VM spikes of V1-M1-spikes-closedV1-M1-spikes-closed: Spikes answered and spec gaps closedX01-model-credential to X09-keychain-unsigned and X17-image-build to X28-git-alloc-limit written up in docs/spikes/, the spec issues of the first implementation plan decided, and specs updated. in parallel with other work (
docs/implementation-plan.md, “Next steps”). - The label and the wave rule in
orchestration.mdand the wave skill, then S02-toolchainS02-toolchain: ToolchainStandardize how this repository manages runtime versions, repo tasks, and CI. and S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq… for the runner. - A runner decision before V1-M3-network-floorV1-M3-network-floor: The network floorwb-netd and wb-proxyd in inspect mode with a static policy, the audit log, and the conformance cases for egress..
- I43I43 (closed): S06-vm-lifecycle: VM slot admission for image builds, updates and GUI work (NFR05-two-macos-vms)NFR05-two-macos-vms allows two running macOS guests per host, and S06-vm-lifecycle uses both: the work VM and the isolated VM. keeps the matching rule for
wb-hostd.
Details and glossary
Why one and not two. Two needs-vm issues per wave would take both slots and leave the maintainer none. A lock with two slots lets the maintainer allow two when not using Wraith Box. Some spikes may need both slots at once, for example to test what happens at the limit. Such a spike takes both locks.
Disk space. Each VM bundle grows with use, and each restore image is large. A cache per worktree would copy the image for every builder. One cache directory per Mac, outside worktrees, holds each restore image once.
Glossary
- Slot: one of the two macOS VMs a Mac may run at once.
- Restore image: Apple’s macOS installer file that a VM is installed from.
- Self-hosted runner: a machine you own that runs GitHub Actions jobs for the repository.
- Nested virtualization: running a VM inside a VM. The issue notes that most hosted Mac services don’t offer it for macOS guests.
- Bare metal: a whole physical machine rented to one customer, with no hypervisor of the provider’s underneath.
- Wave: one batch of up to six issues a coordinator runs builders for (
orchestration.md).