Set a process priority on Windows, and make it stick.
Task Manager's Details tab lets you set a priority, and it lasts exactly as long as that one process. Close the program, or let a build start its next compiler, and Windows starts the new process at Normal again. Here are four ways to make it stick, from one command to a registry key, and what each one costs.
Lower the work you can wait for. Don't raise the rest.
A priority only matters when there is more work than CPUs: then Windows runs the higher class first. Lowering a build to Below normal or Low costs it nothing while the PC is idle and lets everything else go ahead when it isn't. Raising a program to High or Realtime does the opposite of what you want on a loaded PC: it can take the CPU from the mouse, the audio and Windows itself.
One thing works in your favour: a process started at Low or Below normal starts its own children at that class too, so lowering a build's first process lowers the compilers it starts. A process at Normal or higher starts its children at Normal.
1. Start it low.
In cmd, start takes the class:
In PowerShell, lower the shell itself, and everything you run from that window starts below normal:
What it costs: you, or your agent, have to remember it every time, and a program started some other way, from the editor or a script, starts at Normal.
2. Lower what is running now.
Or in Task Manager: Details, right-click the process, Set priority. On Windows 11 the Processes tab also has Efficiency mode, which lowers the priority and asks the CPU to run the process slowly to save power.
What it costs: it only touches processes that exist right now. A build starts new compilers every few seconds, and each one starts at Normal.
3. The registry key that makes it permanent.
Windows reads a priority for a program's file name from Image File Execution Options,
every time that program starts, whoever starts it. In an administrator PowerShell, this
starts every cargo.exe at Below normal:
CpuPriorityClass takes 1 for Low, 5 for Below normal, 2 for
Normal, 6 for Above normal and 3 for High. A program already running keeps its class
until it starts again. To undo it, delete the cargo.exe key.
What it costs: it goes by file name only. It lowers your own build exactly as much as an
agent's, and it can't tell node.exe running a test suite from
node.exe running your editor or dev server, so don't set it for
node, python or anything else that does more than one job.
And it holds when the PC is idle too, where it does no harm, but no good either.
4. A tool that applies rules as processes start.
A program that runs in the background can watch for new processes and set their class by a rule, so it doesn't need the registry and can be changed without admin rights. Process Lasso is the well-known one, with rules by name and by CPU use. Keel is one too, for one case: the work AI coding agents start.
Keel lowers by who started it, not by name.
When Claude Code, Codex, Cursor's agent or Copilot runs your tests and builds, the file names don't tell you whose work it is. Keel reads the process tree and the marks agents put in the shells they run commands in, and gives each process a lane:
- Tests, builds and compilers an agent started wait for your apps, further back the busier the PC is.
- Servers an agent started stay at Normal: something is waiting on them.
- A build you start yourself goes ahead of the agents' work.
- Anything no agent started is left alone, and so are the agents themselves.
It puts children back too: a process started at Below normal starts its children there, so a test's own server would sit at Low with it. Keel finds those and gives them their real class back. Quit Keel and every priority is put back as it was. How it decides
Keel is free for two agents. Every install starts with 14 days of Pro. No account.
Or from a terminal:
When a priority won't help.
- The PC is out of memory and the disk is busy. That is swapping, and no CPU priority fixes it: close something, or add RAM.
- Antimalware Service Executable is near the top. Defender is reading every file the build writes. On Windows 11, a Dev Drive is Microsoft's answer to that.
- You want the build to finish sooner. A lower priority makes it slower whenever anything else wants the CPU. It trades its time for yours.
Agents running on the PC? Claude Code · Codex · Cursor · several at once