Command referenceBeta
ed crew background
Keeps the agents Edith starts running after Edith quits. Every agent runs inside the agents engine, and with background sessions on Edith hands each engine session to launchd, so the engine is not a child of Edith and survives Edith quitting, updating or crashing. The Background section of the Agents settings page edits the same setting.
ed crew background [status] [--json]ed crew background on [--json]ed crew background off [--json]ed crew background start [--session <name>] [--json]ed crew background runs ed crew background status.
Subcommands
| Subcommand | What it does |
|---|---|
status |
Whether background sessions are on, and which sessions have a launchd job |
on |
Turn background sessions on. The next session Edith starts runs under launchd |
off |
Turn them off and remove the session jobs. Running sessions keep going until you stop them or log out |
start |
Start one session under launchd now and wait for its server |
start options
| Name | Type / values | Default | What it does |
|---|---|---|---|
--session <name> |
an agents session name | the default session | The session to start. default is the default session |
--json |
flag | off | Emit JSON on stdout |
start leaves a session that is already running alone. Its JSON then reports
managed: false when that engine was started outside launchd, for example by
edith-agents server --detach. It keeps running either way; stop it with
edith-agents --session <name> server stop and run start again to move it
under launchd.
How a session runs
Each session gets its own login item. ed crew background status lists the
sessions running in the background, and ed crew background off removes them.
Each one:
- runs
~/.edith/agents/bin/edith-agents [--session <name>] server, so the engine is the job's own process and its parent is launchd, not Edith - starts again at login, and after a crash, but stays stopped after
edith-agents server stop - exits at once without doing anything when that session's engine is already running
- carries only
PATH,SHELL,LANGand the engine's home folder. Pane shells are login shells, so agents see your full environment - shows under Edith in System Settings > General > Login Items
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 (claude --resume <id>, codex resume <id>).
Running processes themselves cannot survive a reboot.
On other machines there is no launchd job: the engine starts detached from the
SSH session the first time an agent starts there. To start it at login on a
Linux machine, run edith-agents service install there, which writes a systemd
user unit (--linger also asks logind to keep it running while you are logged
out).
Background sessions are on by default.
If macOS refuses the job, usually because Edith is switched off in Login
Items, status reports the error and Edith falls back to starting the engine
detached. That engine also keeps running after Edith quits, but it does not start
again at login.
--json shape
{ "available": true, "enabled": true, "error": null, "message": "Running in the background: default, work. Agents keep working after Edith quits and start again when you log in.", "sessions": ["default", "work"]}start --json adds session, running and managed.
Exit codes
| Code | When |
|---|---|
| 0 | The status printed, the setting changed, or the session is running |
| 4 | The Agents extension is not running, background sessions are off, the engine is missing, or macOS refused the job |
Examples:
ed crew backgrounded crew background oned crew background start --session work --jsoned crew background offWhere to go next
ed crew ls, the sessions that are live nowed crew, the rest of this group- All
edcommands