Scheduling
A job starts when its class has a free slot and its expected peak memory fits in free memory, minus a reserve for everything else and whatever running jobs are still expected to grow into. Nothing starts while the machine is swapping unless nothing is running, since free memory means nothing in that state.
Concurrency is not exclusivity
The default limit is three jobs per class, subject to memory admission. Test and browser jobs aren't normally auto-paused, and SourceKit/IDE work can remain unmanaged. Admission doesn't reserve an exclusive performance-test window. Agents should submit supported gated commands and wait, rather than negotiate machine-wide hold/release broadcasts. See agent guidance for diagnosis, functional tests, and benchmark methodology. Explicit machine-exclusive scheduling remains a future product decision.
Learned peaks
A command's expected peak is the highest of its last twenty runs in that project over the past month, with release and debug builds kept apart. It's the high-water mark rather than an average, because a cold compile can be tens of times an incremental one. A command new to a project starts from its median peak in other projects.
Learned run times
Run times are learned too, as the median of the last five successful runs, not counting time paused. Waits say roughly when the job should start, when that's known.
Backfilling
A job waiting for memory holds up the queue behind it, with two exceptions:
- A job that fits and should finish before the blocked one could start goes ahead, going by run times.
- When run times aren't known, only small jobs (up to 5% of RAM, at least 512 MB) that fit can go ahead, and only during the blocked job's first 2 minutes of waiting.
Neither applies while the machine is swapping; then nothing goes ahead of anything.
Priority
Commands you type go ahead of agent commands. See agents and people. turnstile bump <job> moves anything to the front.