# The Crew agents engine: agents that keep running

> How the Crew agents engine sets itself up on each machine, keeps agents running through quits and SSH drops, and lets you attach to them from any terminal.

- Canonical URL: https://getedith.pro/docs/agents/crew/engine
- Updated: 2026-12-03

Every Crew agent runs inside the agents engine, a small program named `edith-agents` that ships with Crew and owns each agent's terminal. Because the engine, not Edith, holds the terminal, agents keep working after Edith quits, after a window closes and after an SSH connection drops.

You do not need to set the engine up. Crew installs it the first time you press **New agent**, and the Crew page shows and opens every agent it runs. This page covers the engine itself, for when you want to reach agents from a terminal or script it.

## Where the engine lives

On this Mac the engine is installed into:

```sh
~/.edith/agents/bin/edith-agents
```

Its settings live in `~/.edith/agents/config.json`. Run `edith-agents --default-config` to see every key with its default, and `edith-agents --help` for the config, log and socket paths.

## Keep agents running after Edith quits

With background sessions on, which is the default, Edith hands each engine session to launchd. The engine then runs on its own, so it survives Edith quitting, updating or crashing, and it starts again at login.

When the engine restarts, for example after a reboot, it reopens every workspace, tab and pane it had in the same folders, and resumes the agents it knows a conversation id for. Running processes themselves cannot survive a reboot.

See [Background sessions](https://getedith.pro/docs/agents/crew/background) for the launchd job, `ed crew background` and environment variables for agents.

## Run the engine on other machines

The first time you start an agent on a macOS or Linux machine you added in Machines, Edith:

1. Checks which platform the machine runs.
2. Copies the matching engine to the same path, `~/.edith/agents/bin/edith-agents`.
3. Checks its SHA-256 digest after copying, and refuses an engine that does not match.
4. Starts it detached from the SSH session, so it keeps running when you disconnect.

Crew carries engines for macOS, Linux on x86_64 and arm64, and Windows on x86_64. An engine that is already current is not copied again.

There is no launchd job on other machines. To start the engine at login on a Linux machine, run this there:

```sh
edith-agents service install --linger
```

That writes a systemd user unit. `--linger` asks logind to keep it running while you are logged out.

### Keep engines up to date

```sh
ed crew update
ed crew update --machine box --restart
```

`ed crew update` copies this version's engine to every enabled machine that has an older one. An engine that can hand its agents over to the new build does so in place. One that cannot keeps the old build until you pass `--restart`, which stops it and starts the new one. Agents resume when it starts.

### Windows machines

The engine has a Windows build and installs at `%USERPROFILE%\.edith\agents\bin\edith-agents.exe`. Some Crew features stop short of Windows:

- `ed crew models` uses the built-in model lists instead of asking the CLIs.
- Session search does not cover Windows machines.

## Run engine commands from Edith

`ed crew engine` passes everything after its options to the engine:

```sh
ed crew engine ls
ed crew engine run claude --cwd ~/code/app --branch fix-login --plan
ed crew engine checkpoint list --cwd ~/code/app
ed crew engine --machine box worktree list --cwd ~/code/app
```

With `--machine`, the command runs on that machine over SSH. The engine is copied there first when it is missing or out of date, and the machine's saved session is used. With no arguments, `ed crew engine` opens the engine's picker.

The full engine command list is in [`ed crew engine`](https://getedith.pro/docs/agents/crew/cli/engine).

## Attach from any terminal

You do not need Edith to reach an agent. On this Mac, or on any machine where Edith started an agent, run:

```sh
~/.edith/agents/bin/edith-agents
```

With no arguments it shows a list of agents to pick from. Inside an agent, press `ctrl+]` to detach. The agent keeps running. Press `ctrl+]` twice to send the key to the agent instead.

### Get the attach line for one agent

On the Crew page, right-click an agent and choose **Copy open command**, or open **Show details** (⌥⌘B), where **Attach** shows the line and **Copy command** (**Copy SSH** for a remote agent) copies it. **Show in terminal** in the agent's menu focuses it in the engine's own terminal view.

From the terminal:

```sh
ed crew ls
ed crew command w3:p1N
ed crew attach w3:p1N --machine box
```

`ed crew ls` lists live agent panes with their machine, kind, status and pane id. `ed crew command` prints the line that attaches to one pane. On this Mac it looks like this:

```terminal
$ ed crew command w3:p1N
"$HOME/.edith/agents/bin/edith-agents" --session default agent attach w3:p1N --takeover
```

For a remote pane it is wrapped in `ssh -tt <target> -- '...'`. `ed crew attach` runs that line in the current terminal, and `ed crew attach --json` prints it without attaching. Use `--machine` or `--session` when the same pane id exists in more than one place.

## Check the engine

```sh
edith-agents status
edith-agents doctor
```

`status` prints client and server versions, the socket, and whether a restart is needed because the engine binary changed. `doctor` shows how much space thread history uses and how much it can reclaim.

## Where to go next

- [Background sessions](https://getedith.pro/docs/agents/crew/background)
- [Remote machines](https://getedith.pro/docs/agents/crew/remote-machines)
- [`ed crew attach`](https://getedith.pro/docs/agents/crew/cli/attach) and [`ed crew command`](https://getedith.pro/docs/agents/crew/cli/command)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
