Local vs server agents
Run it locally only when the machine is part of the task.
Servers are better for pure repo work. The notebook is worth keeping awake only when the agent needs local files, browser state, apps, devices, or logged-in desktop context.
Use for portable repo work
If the task can run from a clean checkout with env vars and tests, use a server, VM, worktree runner, or cloud agent. It avoids lid, battery, heat, and Wi-Fi risk.
Use when state cannot move
Choose the notebook when the run needs local apps, browser cookies, device access, private files, Xcode simulator state, or a desktop workflow.
Split the workflow
Let the server do repo-safe work, then keep the notebook awake only for the short local-only slice and restore normal sleep afterward.
Host heartbeat
If local wins, prove the host stayed alive.
Use this beside the local-only slice so you can separate agent failure from notebook sleep or network failure.
while true; do date >> ~/local-vs-server-agent-host.log; sleep 30; done
Ask the agent to choose the right host.
Paste this before leaving an AI agent to run without you.
Decide whether this task should run on a server/VM or this local notebook. Use a server if a clean repo checkout plus env vars is enough. Use local only if the task needs local files, browser profile, desktop apps, device state, simulator state, or a logged-in context. If local is required, make awake mode temporary, record battery/heat/network state, write a heartbeat outside the agent, and restore normal sleep settings at the end.
Minimum local-only receipt.
- Why local was required instead of a server.
- What would move cleanly to a server, VM, Mac mini, or cloud agent next time.
- What state the agent used: files, browser, apps, devices, or local services.
- Whether the local slice can be shortened after one successful run.
- Heartbeat, battery, heat, and reachability evidence.
- Restore status and the next human decision.
After the local run, shrink the local dependency.
Use this after a successful local-only slice so the next run can move off the laptop when possible.
After this local agent run finishes, write a migration note. List which parts truly required this notebook, which parts could move to a server/VM/Mac mini/cloud agent, what secrets or browser state blocked migration, and the smallest next change that would shorten or remove the local-awake window. Include the host receipt: heartbeat, battery, heat, network, changed files, tests, restore status, and next human decision.
Want Codex to handle the local host mode?
Take A Coffee gives Codex a temporary awake mode, host checks, restore step, and receipt for local notebook runs on macOS and Windows.