Skip to content
Edith

Use case

Run Coding Agents Overnight on a Mac With Edith

Leave a task list running when you close the laptop, without coming back to a dead battery, a capped limit or an agent stuck on a question.

Updated by

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. 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. 2

    Queue tomorrow's follow-up

    An agent that finishes at midnight should not sit idle. Choose Send message… from its menu, write the next instruction and set When to send to When done. Edith types it in once that agent finishes its current turn, even with the Edith window closed. Each agent keeps its own waiting message.

  3. 3

    Check your limits before you leave

    Usage shows the 5-hour and weekly windows for Claude, Codex and Cursor as rings on its page and in the menu bar. If the weekly window is already high, start fewer agents. Turn on Enable alerts in Usage's settings so the notifications are waiting for you in the morning.

  4. 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. Set How long and Auto-pause below in its settings, then press Keep awake on its Home card. Approve its helper in Login Items the first time, before you leave, not at the door.

  5. 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. Press Turn on on its Home card, or use its switch in the notch.

  6. 6

    Bring other machines in

    Agents running on a desktop or a Linux box you added in Machines show up on the same board. In Usage's settings, under Collected over SSH, tick a machine to count its agents in your totals. A Linux desktop running the GNOME Caffeine extension can also be asked not to sleep from Edith.

From the terminal: the whole thing as one script

Every step above also has an ed command, so if you prefer, the evening routine fits in a few lines. Commands that change the Mac preview until they get --yes.

Terminal
ed usage limits --refreshed agents lsed agents send w1:p2 "now run the full test suite and fix what fails" --when-finisheded agents send w1:p3 "write docs for every module you touched" --when-finisheded lid-awake battery 30ed lid-awake on --yesed usage machines enable box

And in the morning:

Terminal
ed lid-awake offed usage refreshed usage summary --range todayed usage projectsed agents hooks ls

ed usage summary --range today shows tokens and cost per agent, ed usage projects shows which repositories they went to, and ed agents 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.

One app. Every tool your Mac is missing.

Pay once · No account · 30-day refund · macOS 14+ on Apple silicon