Take A Coffee

One more prompt loop

Let the agent work without making sleep optional.

The fix is not more willpower. It is a bounded run: one task slice, hard stop rules, host heartbeat, and a morning receipt.

Slice

One next action

Write the smallest useful task the agent can complete. If it needs broader scope, the correct behavior is to stop and say why.

Caps

Time, diff, retries

Set a wall-clock cap, retry cap, max diff size, and baseline test requirement. Good overnight work fails closed.

Receipt

Morning proof

Require files changed, commands run, failed checks, stop reason, host heartbeat, battery, heat, and restored sleep settings.

Host heartbeat

Make the laptop prove it stayed available.

Run this next to the agent. Missing timestamps mean the host failed, not that the agent made no progress.

while true; do date >> ~/sleep-friendly-agent-host.log; sleep 30; done

Want Codex to handle the local host mode?

Take A Coffee gives Codex temporary awake mode, battery and heat checks, restore step, and a receipt for local macOS and Windows runs.

Run it with Codex