Training and evaluating models that generate Apple Metal kernels has a scheduling problem, not a modeling one. A single agent session alternates between model requests, development commands, and GPU execution — so the GPU sits idle for most of the rollout, and running several sessions at once on one Mac just makes them fight over the same accelerator. Metal Sandbox, from Shanghai Jiao Tong University, the Beijing Zhongguancun Academy and StepFun, attacks the idle time directly: native macOS toolchains, per-instance filesystem isolation, and a command-level scheduler that spreads work across interconnected Macs.
The execution model is deliberately concrete. Each agent instance owns a workspace and a private development environment on its owner node; the node actually running a given command is its execution node. Parallel commands run concurrently, serial commands share one execution slot per node, and eligible waiting commands migrate to a free Mac — with the source node holding the command and the target returning the result to the original agent. The integration with Harbor gives task execution, automatic verification, and rollout collection in one workflow, and supports Claude Code, Codex, and mini-SWE-agent.
The measured gains are meaningful on modest hardware. Four Mac mini M4 nodes delivered 1.68×–2.05× command throughput gains under concentrated demand. Replaying sixteen measured agent traces under dynamic scheduling put the sustained-throughput gain at 2.14× for four sessions per node versus one, cut mean tool waiting by 18.8%, and shortened batch elapsed time by 22.3%.
The authors are careful about the caveat that matters. The sustained-throughput figure assumes continuously replenished sessions and unchanged mean phase durations; replayed traces cannot capture how different tool feedback changes agent behavior or kernel quality. And the per-trajectory distribution is symmetric — eight trajectories accumulated less tool waiting and eight more — so the headline averages hide that spread. This is scheduling infrastructure for a workload (local Metal kernel search) that is currently a corner of the field; the interesting part is that the same pattern — command-level migration across heterogeneous nodes — is exactly what GPU-cluster agent frameworks need.
The infrastructure and its Harbor integration are open source on GitHub.
Paper: arXiv:2611.17294