๐ Coding agent
Keep your Mac awake for an autonomous test-and-fix loop
You hand a coding agent a failing suite and let it grind: run tests, read failures, patch, repeat. AwakeMate keeps the Mac awake while the loop runs, even when the agent is waiting on the model.
Free 14-day trial ยท one-time $39.99 ยท no telemetry ยท macOS 13+
The workflow
You set a coding agent - Claude Code, Codex or similar - running in a loop: run the test suite, read what failed, edit the code, run again, for an hour or more until it goes green. It alternates between bursts of local work and longer waits on the model's responses.
What happens when the Mac sleeps
While the agent waits on the model, your Mac sees little local activity and drifts into idle sleep, freezing the loop mid-iteration. It does not auto-resume, so the run stalls and you come back to a half-finished session. A patch applied just before sleep can leave the working tree in an inconsistent state, and a long session's tokens can expire while frozen.
How AwakeMate keeps it alive
AwakeMate keeps the Mac awake while the agent and its test runner are active. The agent CLI and the tools it spawns - node, python, your test command - are detected by process name, with Deep CLI detection (on by default) resolving the real script behind a generic node or python. Keep Sleep when tools go idle OFF: the agent spends real time waiting on the model, and that wait would look idle even though the loop is very much alive.
- In AwakeMate's Apps pane, add your agent CLI (and the test command it runs) or let auto mode detect them.
- Keep Deep CLI detection on so
nodeorpythonprocesses resolve to the real agent and test scripts. - Leave Sleep when tools go idle OFF, start the loop, and check the menu-bar item shows keep-awake is active.
Tip: Add both the agent CLI and your test runner to the watched list, so the Mac stays awake whether the agent is thinking or the tests are running.
Tools in this workflow
Frequently asked
The agent spends ages waiting on the model - won't that trip idle-sleep?
It would, which is why you leave "sleep when tools go idle" off here. The wait on the model reads as idle even though the loop is still going. Keep idle-sleep off so the Mac stays awake through every wait.
My agent runs as "node" - can AwakeMate target it specifically?
Yes. CLIs installed via npm often appear as node; with Deep CLI detection on, AwakeMate reads the real script name so you can match the agent precisely.
Will keeping the Mac awake interfere with the agent or my settings?
No. AwakeMate only holds the same power assertion caffeinate uses to prevent idle sleep. It changes nothing about the agent's behaviour or your saved energy settings, and collects no telemetry.
Will this keep running with the lid closed, even on battery?
Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate keeps the Mac awake with the lid shut while the run is active, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm), and on battery too - though a long run drains faster, so keep it on power. See it in action.