Eighteen ports per Mac
The most surprising scaling limit in Swarmfile is not storage, bandwidth or the hub. It is a fixed range of loopback ports on macOS: 52100-52117.
FUSE-T's helper is a userspace NFS server. Each mounted filesystem needs one
helper process and one port from that eighteen-slot range. The range is
shared by every Swarmfile mount on the machine, and by anything else using
FUSE-T. Eighteen mounts per Mac, full stop. A nineteenth mount fails with
fuse_t_helper_ports_exhausted; if the bind probe cannot run, it fails with
fuse_t_helper_port_probe_failed. swarmfile doctor names the holders across
the range.
This is not an artificial cap we chose. It is the shape of the macOS userspace-FUSE design, and it matters most for the use case the product is built around: many agents, one machine.
Why a mount needs a port at all#
On Linux, FUSE is a kernel filesystem driver. On macOS there is no
kernel-extension route we were willing to ship. FUSE-T implements the FUSE
protocol in userspace and then negotiates a real NFS mount with the kernel;
macOS's mount reports it as fuse-t:/… on … (nfs, nodev, nosuid). A helper
process serves that NFS connection on one of the fixed ports. One helper, one
port, one mount.
That gives us a kext-free install and a real kernel-visible drive. It also gives us a machine-wide budget of eighteen.
The failure modes are worse than the cap#
The cap itself is easy to explain. The debris around it is what cost real time:
- An orphaned helper holds its port. If the engine is killed without running teardown, the helper can survive with PPID 1. A later mount sees the port as used. Killing the engine is not the same as unmounting.
- A stuck
mount(2)is worse than a dead helper. FUSE-T's helper spawns/sbin/mount→/sbin/mount_nfs; a half-finishedmount(2)can sit in an uninterruptible wait and retry a dead export for hours. The kernel NFS client parks on the port it was given - the lowest free helper port, 52100. Every later helper that binds 52100 inherits the dead client and dies in exactly the shape of a crash. Ports read free, no exhaustion check fires, and mounts on 52100 crash-loop behind the tray's "drive keeps disconnecting" gate. Only a reboot clears the kernel side. - The error was not typed. A port collision used to surface as a generic mount failure. The harness and the tray could not tell "this Mac has eighteen mounts" from "FUSE-T is broken."
The engine now reaps wedged mount attempts before every mount
(reap_wedged_mount_attempts), counts a stuck mount separately from an
ordinary helper death, and fails with a typed reason when the kernel will not
release the mount. swarmfile doctor reports helper processes N/18 in 52100-52117, the tray names the mount that holds a slot, and mounts retry
reaps leaked helpers and retries a boot mount that never attached. A drive
that attached once still needs a restart; a runtime mount is re-opened.
The cleanup script (scripts/fuse-t-orphan-cleanup.sh) exists because a
killed test can leave the same debris. It never touches a live server/mount
pair, and the real-mount test runner reaps its own .tmp* mounts before each
run. A failing real-mount test can leave its own mounts (and sometimes stuck
mount(2) attempts) behind; nextest's retry does not re-reap, so the retry
inherits the poisoned ports and fails the same way. That is a test-infra
lesson, not a product one, but it is the same physics.
What this means for a fleet of agents#
A single Mac can hold eighteen FUSE-T mounts, not hundreds. A tray boot mount consumes one. A repository cap is separate: the default is 50 active agent workspaces per repository, but the local mount budget is the tighter one on one machine. If you want a hundred agents on one repo, you need more than one machine (or a different mount strategy on the hosts that are not macOS).
That is not a hidden limit invented for the benchmark. It is the reason the fleet shape is one engine per machine, one mount per agent, and branch-per-agent fleets across machines. The hub has no per-machine mount cap; the Mac does.
When the range is full, the answer is to close a mount, quit the app holding
the slot, or stop the orphaned helper doctor names. Do not start a nineteenth
and hope. The failure is typed now, and mounts retry is the recovery for a
boot mount that never attached; a drive that was previously attached needs a
restart, because the kernel-side session is the thing that must be rebuilt.
Why we kept it#
A kext-free macOS install was a product requirement, and FUSE-T gives us that without asking users to disable SIP or approve a system extension. The cost is a fixed helper-port range and a userspace NFS hop. We think that is the right trade for a drive that installs in a minute - as long as the limits are visible, typed, and cleaned up.
The mount surface and the cleanup rules are in the mount guide and the CLI reference. If you run agents on more than one Mac, the coding-agents guide is the per-machine layout that keeps the eighteen slots honest.