The problem
Coding agents are good at long, boring work: migrating a codebase, fixing a backlog of failing tests, writing docs for every module. The natural time for that is overnight. Three things usually go wrong. The MacBook sleeps when you close the lid and every agent stops. An agent asks a question at 1am and waits until morning. Or the agents burn through the 5-hour window by 2am and sit idle for the rest of the night.
This setup chains five Edith extensions so the Mac stays up safely, the agents keep moving, and you can see in the morning exactly what happened and what it used.
The setup
- 1
Start the agents on one board
Open Agents and press New Agent for each task: pick Claude Code, Codex or another agent, the machine and the space. Give each one its own git worktree so their edits cannot collide. Blocked agents sort to the top of the board.
- 2
Queue tomorrow's follow-up
An agent that finishes at midnight should not sit idle. Pick its pane id from
ed herdr lsand queue its next instruction now. Edith types it in once that agent finishes its current turn, even with the Edith window closed. Queue one message per agent. - 3
Check your limits before you leave
Usage shows the 5-hour and weekly windows for Claude, Codex and Cursor. If the weekly window is already high, start fewer agents. Turn on limit alerts so the notifications are waiting for you in the morning.
- 4
Keep the Mac awake with the lid closed
Lid Awake stops lid-close sleep for a session you choose and pauses itself below a battery floor. Approve its helper in Login Items the first time, before you leave, not at the door.
- 5
Keep the screen on while you are still around
While the lid is still open and you are watching the first few turns, Keep Awake stops the Mac and its display from idling to sleep. Turn it on from its Home card or the notch.
- 6
Bring other machines in
Agents running on a desktop or a Linux box you added in Machines show up on the same board. Ask a remote machine not to sleep, and count its agents in Usage.
The whole thing as one script
Every step above has an ed command, so the evening routine fits in a few lines. Commands that change the Mac preview until they get --yes.
ed usage limits --refresh
ed herdr ls
ed herdr send w1:p2 "now run the full test suite and fix what fails" --when-finished
ed herdr send w1:p3 "write docs for every module you touched" --when-finished
ed lid-awake battery 30
ed lid-awake on --yes
ed machines control caffeinate box on
ed usage machines enable boxAnd in the morning:
ed lid-awake off
ed usage refresh
ed usage summary --range today
ed usage projects
ed herdr hooks lsed usage summary --range today shows tokens and cost per agent, ed usage projects shows which repositories they went to, and ed herdr hooks ls shows which queued messages were sent and which are still waiting.
Pitfalls
- Permission prompts stall agents. An agent that stops to ask whether it may run a command waits all night. Decide before you leave which commands the agent may run without asking, in the agent's own permission settings, and keep the work inside a worktree.
- The battery floor ends the night. When the battery drops below the floor, Lid Awake pauses and the Mac sleeps, which pauses the agents. Plug in for anything longer than a couple of hours.
- Battery saver turns it off. By default, when Edith's battery saver is on, for example in Low Power Mode, and the Mac is on battery, Lid Awake stays off until you plug in or battery saver ends.
- Keep Awake does not cover a closed lid. It handles idle sleep only. Closing the lid still sleeps the Mac unless Lid Awake is on.
- Remote machines need their own Herdr. The board finds agents on SSH machines only where Herdr is installed.
- Heat. Leave the closed MacBook on a desk or a stand, not in a bag.
Go deeper
Each step has its own guide: keeping a MacBook awake with the lid closed, running multiple Claude Code agents, and checking Claude Code usage limits.