Skip to content

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).

development Mac: host, trustedbuilder 1needs-vm, has the lockbuilder 2needs-vm, waitsbuilder 3no VM: parsers, fuzzingmaintainerown Wraith Box VMsslot lockone file per slotimage cacheone per Macguests: untrustedVM slot 1spike VMVM slot 2maintainerseparate machinesself-hosted runnerdedicated Macconformance, benchmarksGitHubhosted runners:CI checks, no VMsmain only

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.

A. Label, wave limit, lock, and a dedicated runner

Section titled “A. Label, wave limit, lock, and a dedicated runner”

The issue’s option 1, with a lock added. A needs-vm label in .github/labels.yml. /wave starts at most one needs-vm issue per wave. Spike code takes a slot lock with lockf before it starts a VM, so a second VM user waits with a message. Restore images go in one cache directory per Mac, outside worktrees. A dedicated Apple Silicon Mac runs the conformance suite and benchmarks as a self-hosted runner, for main and manual runs only.

Instead of a Mac of your own, rent a bare-metal Apple Silicon Mac by the day, such as Amazon EC2 Mac. It runs the Virtualization framework directly, so no nested virtualization is needed. The label, wave limit and lock from A still apply on development Macs.

ConcernA. Own runnerB. Rented MacC. By hand
NFR05-two-macos-vmsNFR05-two-macos-vms: Platform limitmacOS permits at most two concurrently running macOS guests per host. at most two macOS VMs per Maclock, one free slotlock, one free slotmaintainer decides
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… conformance suite as a release gateon every main pushon schedulemanual
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.one per machineone per machinemaintainer only
Same checks locally and in CI (AGENTS.md)separate VM jobseparate VM jobno VM jobs
Costone Macrent, 24-hour minimummaintainer time
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).