Why your Mac sleeps while Copilot CLI is still going
GitHub Copilot CLI runs as a process in your terminal, and it spends most of a
task waiting on model responses — which barely uses any CPU. macOS only looks at CPU and user
input to decide whether to sleep, so an agent that's "thinking" hard but computing little
looks idle to the OS. After your screen-sleep or system-sleep timer runs out, macOS suspends
the Mac, and the copilot process is frozen along with everything else until you
wake it back up.
This bites hardest on the runs Copilot CLI is best at: you put it in autopilot mode so it can carry a refactor or a failing test suite forward without step-by-step approvals, you walk off to get coffee, and you come back to a Mac that slept ten minutes in. The session isn't lost — it resumes where it froze — but nothing happened while you were gone.
The fix is to stop macOS from sleeping for as long as the agent is actually running a task — then let it sleep normally again shortly after the work goes quiet — within your grace window, 90 seconds by default. You can do that for free in two minutes, or with a tool that watches for real activity so you don't have to babysit it.