๐ Claude Code
Keep Claude Code running through an overnight refactor
Agentic refactors take hours, and they mostly happen while you are asleep or away from the keyboard. AwakeMate keeps your Mac awake so Claude Code can work through the whole job.
Free 14-day trial ยท one-time $39.99 ยท no telemetry ยท macOS 13+
The workflow
You point Claude Code at a repo and ask it to rename an API, update every call site, fix the tests and tidy the imports. It works in a long loop - reading files, proposing edits, running checks - pausing to wait on the model and on your approvals. You leave it running overnight and check the diff in the morning.
What happens when the Mac sleeps
When macOS goes to idle sleep, Claude Code is frozen mid-run. The process does not auto-resume when the Mac wakes, so a long refactor is cut off partway through. API tokens and sessions can expire while frozen, and the repo can be left half-edited - some files rewritten, others not - which is exactly the inconsistent state you were trying to avoid.
How AwakeMate keeps it alive
AwakeMate detects Claude Code by process name. Installed via npm it often shows up as just node, so leave Deep CLI detection on (the default) - it reads the real script name and recognises Claude Code properly. Because the agent spends most of its time waiting on the model and on you, keep Sleep when tools go idle OFF, otherwise a long think or an unanswered approval prompt looks idle and the Mac sleeps mid-run.
- Open AwakeMate and add Claude Code (or node) to your watched tools.
- Confirm Deep CLI detection is on so the real script name is recognised.
- Leave Sleep when tools go idle OFF, start the refactor and check the diff in the morning.
Tip: Add node to your watched tools and confirm Deep CLI detection is on, so an npm-installed Claude Code is recognised rather than ignored.
Tools in this workflow
Frequently asked
Why does Claude Code show up as node?
CLIs installed through npm often run under the node binary, so the raw process name is just node. Deep CLI detection reads the underlying script name so AwakeMate recognises it as Claude Code.
Should I turn on Sleep when tools go idle?
No. Claude Code spends long stretches waiting on the model and on your approvals, which reads as idle. Leave it OFF so the session is not cut mid-wait.
Does AwakeMate change my energy settings?
No. It holds the same IOKit power assertion as caffeinate, preventing idle sleep only. Your saved energy settings are never touched and nothing leaves your Mac.
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.