DrumsBench

Research notes / 2026-10-25

Desktop isolation on macOS, one login session per environment

What one macOS GUI session owns and what it shares, why sessions and not per-process input, the two-VM cap and the license clauses in plain words, the CGSession finding, and the laptop measurements that are not Studio results.

On a Mac there is no virtual machine route to many environments: Apple's licence and its virtualisation framework stop at two macOS guests per machine. The unit we found that gives an attempt its own clipboard, preferences, privacy state, home folder and input stream is one macOS user logged in to its own graphical session in the background. This note says what that unit gives, what it does not, and which of the numbers here were measured where.

The short answer

Probably workable for a small number of environments; not shown for a large one. macOS has run several live GUI sessions at once since 10.7 (vendor claim, Apple technical notes). Each session runs its own pasteboard server and its own privacy daemon (measured on the laptop). A third party drove a background session with screenshots, clicks, typing, drags and scrolls on macOS 26.3 (author claim). No public API logs a user in without a person, so each account takes one manual login after every boot. It is not a security boundary: all sessions share one kernel, one WindowServer and one root.

Appleone Mac Studio, one macOSconsole sessiondrumsctlverify server :7600metrics samplerenv00envd:7700TextEditcanaryenv01envd:7701LibreOfficeGoogle ChromeWriterChromeenv02envd:7702LibreOfficeGoogle ChromeWriterChromeenvNNenvd:7700+NLibreOfficeGoogle ChromeWriterChromebackground GUI sessions, fast user switchingread onlyHTTP, 127.0.0.1:7700+N, generation on every mutating callshared by every session: kernel, WindowServer, HID, filesystem, networknot shared: pasteboard, cfprefsd, tccd grants, home folder, event streamnot a security boundary: one kernel, one WindowServer, one root.an app in one session is one user account away from the next, not one machine.
Fast user switching. Each environment is a hidden macOS user logged in to its own session, with a small agent (envd) inside the session serving screenshots and input on a local port. The console is parked at the login window. Kernel, WindowServer, root and the network stack are one copy for everybody.

What a session owns and what stays shared

ItemScopeEvidence
Pasteboard (com.apple.pboard)own per sessionruns in the session's launchd domain (measured, laptop)
Preferences daemon (cfprefsd)own per userone agent per user id; changing HOME does not move it (measured, laptop)
Privacy daemon (tccd)own per sessionruns in the session domain (measured, laptop); Screen Recording and Accessibility rows live in the system database (author claim)
Home, keychain, per-user temp folders, Launch Servicesown per userfollow the user id, not HOME (measured, laptop)
Input event streamown per sessiona third party posted input to one session's tap (author claim); leaks across sessions never tested with N at once
Dock, Finder, loginwindow, Notification Centerone copy per sessionmeasured, laptop
Kernel, WindowServersharedone WindowServer serves every session (vendor claim); it is the single point of failure for every environment
root, system privacy databaseshared
Network, DNS, printerssharedone resolver and one set of print queues per host (measured, laptop)
Modifier-key statesystem-wide inside a session (vendor claim); across sessions untested
CPU, GPU, RAMshared

Why sessions and not per-process input

Inside one session there is exactly one general pasteboard, one frontmost app, one key window, one menu bar, one Dock, one input source and one hotkey table, and no public API splits any of them per environment (inference). Per-process input exists but is weak: the public per-pid event call reportedly delivers keys only when the app is in front or owns the menu bar (author claims); the working third-party version uses private window-server calls that still exist on macOS 27.0 (measured, laptop) and can change in any release; keys land in an app's key window, so two agents in one app take turns; drags, hover, canvas apps and modified clicks need the app in front; modifier state is system-wide. N environments in one session become turns on one input stream. The experiment uses this setup only as the positive control, the arrangement that must leak so the detectors can be shown to fire.

Why VMs lose on a Mac

Apple's licence allows up to two macOS virtual machines per Mac, and the virtualisation framework refuses a third with VZError code 6, virtualMachineLimitExceeded (vendor claim and first-hand reports). So VM-per-environment stops at two per Mac. Linux guests reportedly do not count toward the cap (third-party claim, not measured; we treat the Linux cap as unknown). The results table will carry a row "macOS VMs: cap 2 per host, not measured".

The licence, in plain words

Unresolved, and stated as such: whether RL training of computer-use agents is a permitted developer service (closest phrase: "automated testing during software development"); whether many agents driving GUI sessions on a Mac the operator owns is "one user at a time" or in-house "time-sharing" (the text assumes humans and remote desktops); whether the two-guest cap is universal. The experiment's not-claimed list says: "Not a license opinion. Run on a Mac we own; hosting for others is not supported by this result."

CGSession, and which macOS build says what

CGSession is the small helper that parks the console at the login window from a script. The harness used it in make park-console and checks for it at Gate 0.

Related version facts: the per-session daemon layout above was measured on 27.0, not on 15.7.5; the private window-server input symbols still exist on 27.0 (measured, laptop); the older window-capture API is obsoleted at 15.0 in the SDK and reportedly returns gray on 27 betas; the user privacy database moved on macOS 27. One third-party report wrote privacy grants by file on macOS 26.3; an Apple staff forum reply says on 27 grants come only from System Settings or device management, and our 27 machine matched. We plan on manual clicks.

Measured primitives (laptop, not Studio)

PrimitiveMeasurementWhere
APFS clone of a 20,000-file, 78 MB tree2.27 s clone, 4.72 s plain copy, 0.8 s deleteM2 8 GB laptop, macOS 27.0 (measured)
Cloning out of a snapshotsilently made a full copylaptop (measured)
Chrome, fresh profile, one tab580 to 614 MB footprintlaptop (measured)
Two fresh Chromesshared 483 MB of code pages, almost no written memorylaptop (measured)
Safari57 to 89 MBlaptop (measured)
Electron apps332 MB (author claim) to 804 MB (measured)laptop
Finder alone241 MB footprintlaptop (measured)
LibreOfficeno trusted number
Window screenshot89 ms p50, 108 ms p95 on one M-series Macvendor claim

Capacity arithmetic from these numbers (about 50 Chrome-class environments per 48 GB machine before idle-session cost, shrinking to about 10 to 30 under real pages and screenshots) is inference from laptop measurements and is not published as a result. The experiment reads vm_stat and memory pressure rather than summing per-process figures, because summed footprints count compressed pages at full size.

Reset estimate: "1 to 3 s for a real Chrome or LibreOffice profile" is an estimate; no real profile was timed. For scale, the published desktop VM reset bar is 37.2 s p50 and 100.1 s p95 including queueing (MAI-Gym, author-reported).

What is open

UnknownKnown todayWhat settles it (design)
Session capone administrator ran 3 to 5 and guessed about 10 (author claim)log in accounts until the first refusal, up to 32
Memory per idle sessionunknownWindowServer footprint and memory pressure per login
Login without a humanno public API (inference)not needed: one manual login per account per boot
Painting in a background sessionswitched-out processes keep drawing (vendor claim); Chromium and Electron stop painting when they think they are hidden (vendor claim)at least 55 distinct frames of 60 from at least one Chrome configuration
Privacy grants per usertccd per session (measured); device management can deny but not grant Screen Recording (vendor claim); macOS 15 re-asks monthly (author claim)grant for the first account, see whether the second prompts
Leaks between sessionsown pasteboard and event stream per session; never tested with N at oncefour sessions type and copy at once; each document and pasteboard holds only its own tag
Capture at scalecapture streams once stopped silently until replayd restarted (author claim)screenshot p95 under 200 ms at N=1; stalls counted at every N

The decision rule adopted from the internal devil's-advocate note: if macOS cannot clearly beat the same-Mac Linux arm on cost per valid rollout, macOS-first is dropped. Linux has none of the licence limits, which is one reason the Linux arm exists.