Do not wake blindly
Record the last real Claude Code interaction and skip the wake if the window was already used. The goal is useful continuity, not a timer for its own sake.
Claude Code 5-hour wake
A 5-hour wake script can keep a usage window useful. For local work, the Mac still needs host proof: awake state, battery, heat, network, and restore.
Record the last real Claude Code interaction and skip the wake if the window was already used. The goal is useful continuity, not a timer for its own sake.
Use a small task with an acceptance test, time cap, and stop rule so the wake produces a receipt instead of another open terminal.
If the task needs local files, browser state, Xcode, or desktop tools, log battery, heat, network, sleep/wake, and a heartbeat outside Claude.
If your weekly allowance is tight or the window is already active, skip the wake. A no-op ping can waste the same capacity it was meant to preserve.
Log the last real interaction, the reason for waking, and whether the scheduled task produced a useful diff, test result, or receipt.
End the pty, restore sleep behavior, and leave a short note when the scheduled window does not need this notebook anymore.
Host heartbeat
This tells you whether the notebook kept running through the scheduled window, not merely whether Claude Code had a session later.
while true; do date >> ~/claude-code-5hr-host.log; sleep 30; done
Paste this before relying on a 5-hour wake loop for local work.
Audit this 5-hour Claude Code wake schedule before I trust it. Check whether the usage window was already active and skip if the weekly cap is tight; do not use a no-op ping. Pick one bounded useful task, set a time cap and stop rule, write host heartbeat timestamps outside Claude, record battery/heat/network state, and restore normal sleep settings when done. Stop if the task needs login, payment, broad product judgment, destructive actions, or unsafe battery/heat state.
Take A Coffee gives Codex a temporary awake mode, host checks, restore step, and receipt for local scheduled runs on macOS and Windows.