Skip to content
Edith

Agent docs

TutorialBeta· About 15 minutes

Keep coding agents running overnight with Crew

By the end of this tutorial you will have coding agents that keep working after you close Edith, follow-up messages that go out when each agent finishes, and a morning routine to open each agent from the Crew board, or from any terminal, and see what changed. You need Crew running on a Mac in the Edith beta, and at least one agent CLI such as Claude Code or Codex. See Get Crew.

Check that background sessions are on

Every Crew agent runs inside the agents engine. With background sessions on, the engine keeps running after Edith quits, updates or crashes, and starts again when you log in. They are on by default, and you do not need to change anything.

Edith must be allowed to run at login. Check that Edith is turned on in System Settings > General > Login Items.

From the terminal

Background sessions have no switch in Crew's settings. Check them, or turn them back on, from a terminal:

Terminal
ed crew backgrounded crew background on

If you updated Edith recently, the running engine may be an older build. repair fixes a session that is out of date or stopped:

Terminal
ed crew background repair

Give agents the environment they need

Pane shells are login shells, so agents read your shell startup files. To give every agent a variable that is not set there, such as a proxy URL, put it in the engine's environment. This is a terminal step:

Terminal
ed crew background env set OPENAI_BASE_URL=https://proxy.example.tested crew background env

New shells and agents see a change at once. Ones already running keep the value they started with.

Start the agents for the night

Start each agent in its own folder, or on its own branch so two agents never edit the same files. See One git worktree per agent.

  1. On the Crew page, press New agent (⌘N).
  2. Pick the agent, the machine and the space.
  3. Set Permissions with care. An agent set to Supervised asks before commands and file changes, so it will sit in Blocked until you answer. Auto-accept edits approves edits and still asks before other actions. Choose what you are comfortable leaving unattended.

From the terminal

Terminal
ed crew open ~/code/app --agent codexed crew thread launch . --worktree main --branch fix-login -- fix the failing login test

--permissions on ed crew thread launch sets the permissions.

Queue follow-up messages

Tell each agent what to do once its current turn ends:

  1. On the board, right-click the agent's card and choose Send message….
  2. Write the message, such as "run the full test suite and fix what fails".
  3. Under When to send, choose When done, or At time to send at a clock time such as tomorrow at 9:00.
  4. Press Send when it finishes.

Waiting messages are kept by Edith's background agent, so they go out while the Edith window is closed. A new message for the same agent replaces the one waiting, so queue one per agent. To drop one, right-click the agent and choose Cancel waiting message. The engine skips a Blocked agent rather than answering its question.

For threads, write the follow-up in the thread's composer while the agent works and press Queue. It waits in the thread's queue and goes out when the turn ends. If the button says Steer, press ⌘↩ to queue instead.

From the terminal

Find pane ids with ed crew ls, queue the message, and list what is waiting:

Terminal
ed crew lsed crew send w3:p1N "run the full test suite and fix what fails" --when-finisheded crew hooksed crew thread send th_01 --mode queue -- then update the docs

--at "tomorrow 9:00am" sends at a clock time instead.

Turn on the notifications you want

  1. Open Crew's settings with the gear button and find Notifications.
  2. Notify when an agent needs you, Notify when an agent finishes and Notify when an agent hits an error are on by default.
  3. For overnight runs, also turn on Notify when an agent looks stuck and set Treat as stuck after, from 2 to 120 minutes.

Notifications need Edith's Notifications permission in macOS, and Edith has to be running to post them. Closing the window is enough; remote machines are checked every 2 minutes while no Edith window is open.

From the terminal

Terminal
ed config set crewAgentNotifyWhenStuck trueed config set crewAgentStuckMinutes 30

Close Edith

Close the Edith window, or quit Edith. The agents keep working either way, because the engine, not Edith, holds their terminals. Keep Edith running if you want notifications and queued messages.

If the Mac restarts overnight, the engine starts again at login, reopens every workspace, tab and pane in the same folders, and resumes the agents it knows a conversation id for. Running processes themselves cannot survive a reboot.

Pick up in the morning

Open Crew. The board puts Blocked agents first, so start there. Click a card to open that agent and answer it. In Threads, threads waiting for you are listed under Needs you in the sidebar.

Attach from any terminal

You do not need Edith to reach an agent. Open any terminal and run the engine with no arguments:

Terminal
~/.edith/agents/bin/edith-agents

It shows a list of agents. Pick one to attach. Press ctrl+] to detach; the agent keeps running. Press ctrl+] twice to send the key to the agent instead.

To go straight to one agent, right-click its card and choose Copy open command, then paste the line into a terminal. ed crew attach w3:p1N runs that line in the current terminal, and ed crew command w3:p1N prints it.

Check what changed

For a thread, press Diff (⌘D) in the thread toolbar to see its changes turn by turn.

For any agent in a git repository, the engine records a checkpoint before and after every agent turn, so you can see exactly what each turn did. Checkpoints for terminal agents are read from a terminal:

Terminal
ed crew checkpoints ls --cwd ~/code/apped crew checkpoints diff cp_01 --stated crew checkpoints diff cp_01 --to worktree --stat

For agents on their own branch, status shows how far the branch moved and which files changed:

Terminal
ed crew worktrees status --cwd ~/code/app-fix