Reap an srv that closed its ESTART channel before becoming ready, and say which refusal it was: a
server already holding the data folder exits with DATA_DIR_HELD_EXIT, so the supervisor can show
that plainly instead of a bare failed start.
Body for that dialog: another server (a headless one, or another launch) holds this channel’s data
folder, and this one cannot start beside it. Kept here so Windows and Unix say the same words.
The error for an srv that exited before ESTART: another server holding this data folder has its own
code, so the supervisor can say that plainly; anything else is the generic closed channel.
One of srv’s progress lines (a data-preparation step or a migration, in
the agentmux_common::srv_stderr protocol) as a splash sub-row of stage.
false if line is not one. Shared by srv’s own startup (“backend”) and
migrate --prepare (“prepare”).
Run agentmux-srv migrate --prepare while srv is stopped, as the splash’s
“Updating data” stage: copy the previous version’s data forward,
back up, run the pending migrations, each a sub-row. The upgrade step of
docs/specs/SPEC_FAST_STARTUP_UPGRADE_OWNS_MIGRATIONS_AND_UPDATES_2026_09_15.md
§10, run by spawn_srv when srv reports AGENTMUXSRV-NEEDS-PREPARE.
Show the person why an srv spawn failed, in plain words, for the failures the launcher can explain:
a migration that could not run, or another server already holding this channel’s data folder. Other
errors are the caller’s to log, as before. Kept here so Windows and Unix say the same words.
Spawn cmd (an srv process: the daemon, or migrate --prepare) so it
lives and dies with the launcher, before any of its code runs. Returns the
child and its pid.
Start srv and wait for it to be ready (spawn_srv_once). If srv finds
data that needs preparing (a new version’s first start, pending
migrations), it exits before writing anything; this then runs
migrate --prepare on the splash and starts srv once more. A second
“needs preparing” is a failure, never a loop.