Claude Code auto-wake
Wake schedules are useful. They are not a host proof.
If a Mac wakes at 5am, starts Claude Code, then sleeps again, verify the separate laptop layer before trusting the run.
Prove it woke
Write a timestamp before launching the agent and again after the first real tool call. A scheduled wake is not proof that work started.
Cap the session
Use a narrow prompt, a stop time, and a receipt path. Morning runs should leave evidence, not just an open terminal.
Restore defaults
After the run, return the Mac to normal sleep behavior unless another local task explicitly needs awake mode.
Receipt command
Give the run a tiny heartbeat file.
Use this alongside any Claude Code auto-wake script so you can tell whether the host actually stayed alive during the window.
while true; do date >> ~/claude-code-host-awake.log; sleep 30; done
Copy an auto-wake safety prompt.
Paste this into Claude Code before relying on a morning wake script.
Audit this Claude Code auto-wake setup before I trust it. Separate scheduled wake, agent start, host heartbeat, work receipt, and restored sleep. Verify the task is atomic, has a stop time, has no expected approval/login prompts, writes a timestamp outside the agent, records battery/heat/network state, and restores normal sleep settings. If any check is missing, stop and list the missing check instead of running overnight.
The minimum host checklist.
- Power state: awake mode is temporary and has an off step.
- Battery and heat: closed-lid battery runs can drain and warm up fast.
- Network: remote control and notifications need reachable transport.
- Receipt: files changed, commands run, failures, and restore status. For scheduled usage-window runs, use the Claude Code usage-window checklist.
- caffeinate vs closed-lid MacBook checklist
Want Codex to run the host mode?
Take A Coffee gives Codex a temporary awake mode for local macOS and Windows agent work, then restores normal sleep.