Several agents on one PC? Each one thinks the CPUs are its own.
A worktree for each agent keeps their files apart. Nothing keeps their builds apart. Each
agent runs cargo test or npm test
as if it were alone, and each of those starts one job per core. Four agents on a
16-thread PC ask for 64 threads' worth of work, and your editor is the 65th in line.
Keel is free for two agents. Every install starts with 14 days of Pro. No account.
Or from a terminal:
Do the sum.
Two numbers decide how many agents a PC takes, and neither is how many windows fit on the screen.
- CPU: agents × jobs each. Cargo, Go, Jest and Vitest start about as many jobs as the PC has logical CPUs unless told otherwise. Two agents building at once is already twice the CPUs you have. The agents themselves cost nearly nothing: they wait for answers.
- Memory: agents × the biggest build. Every worktree has its own build folder, so nothing is shared: four agents link four copies. When memory runs out the PC swaps, and no priority fixes that. Look at memory before CPU.
- Disk. Four builds write four sets of files, and on Windows Defender reads each one. If
Antimalware Service Executableis near the top of Task Manager, a Dev Drive is Microsoft's answer.
To see it rather than work it out: open Task Manager, Activity Monitor or
top while it lags, and sort by CPU. A screen of
rustc, node or go is this page. One agent's own
process at a full core with nothing under it is a fault in that agent: restart it.
The free fixes.
Give each agent a share. Divide the logical CPUs by the agents you run, leave two for
yourself, and put the line where every session reads it
(CLAUDE.md, AGENTS.md,
.cursor/rules). Sixteen CPUs and four agents:
Share what the builds have in common, so four worktrees don't compile the same thing four times:
What it costs: a cap holds when the other agents are idle too, so one agent alone builds on three CPUs of sixteen. The share is right for the number of agents you planned, and wrong the moment you start one more or stop two. And one shared build folder is not a fix: Cargo locks it, so the agents wait on each other.
The share is worked out while they run.
Keel is a small app in the tray. It knows which processes each agent started, from the process tree and from the marks agents put in the shells they run commands in, and it gives each one a lane:
- Tests, builds and compilers wait for your apps. The busier the PC, the further back they go.
- Servers an agent started, a dev server or a database, stay quick: something is waiting on them.
- The agents themselves are never lowered. They're what you talk to.
- A build you start yourself goes ahead of the agents' work.
- CPUs kept for you (Pro): when the PC is strained, the agents' work is kept off a few of them.
No cap is written anywhere. One agent alone gets the whole PC, at full speed: a lower priority only matters when something else wants the CPU. Start three more and they share what is left after your own apps. Work that waits three seconds without running gets its priority back for five, so nothing starves. How it decides
110 ms to start a command, not 1,335.
On one machine (i7-11700K, 16 threads, Windows 10), with more spinning tests than CPUs on top of the agents already running, a new command took 110 ms to start with Keel steering and 1,335 ms without. A thread that asked to wake was 3.6 ms late at worst instead of 21.7 (99th percentile).
The cost is the other side of the same trade: the steered work got 21% to 56% less done while the PC was overloaded. It yields, and that is the point. Your own CPU work got no faster. The receipt, and how to run it yourself
When Keel won't help.
- The PC is out of memory. That is the usual limit on how many agents fit, and it comes before the CPU does. Run fewer, or share the cache.
- You want all four to finish sooner. There is one PC's worth of CPU. Keel decides who waits, and it is the agents. It doesn't make more.
- You never sit at the PC while they run. Then nobody is waiting on the mouse, and the agents may as well have everything.
- You're on macOS and want every lever. macOS has one, background mode, so work is either left alone or put in the background. What each system can do
Free for two agents.
Keel steers the work of your two oldest agents for free, for good. Pro steers every agent's work and keeps CPUs for you: $39 once, no subscription. Every install starts with 14 days of Pro, so the first two weeks show what it does with all of them.
One agent's page: Claude Code · Codex · Cursor