Files
Jinwoo Hong c6467bbc53 fix(orchestration): tell the coordinator when a worker is lost (#40983)
* fix(orchestration): tell the coordinator when a worker is lost

A worker that could no longer run its task sent no mail: a failed start,
a person closing its pane, tab or chat, or a terminal gone after a restart.
Each now sends one "Worker lost without reporting" alert through the
turn-stop report, with its cause, last output and any leftover workspace.
An unexpected exit and a lost Codex app-server use the same path. An exit
or loss says the Dispatch is closed as failed and gives the retry command.
Failure text in the alert is redacted like terminal output.

The coordinator's own worker-stop stays silent, locally and on a paired
server. A finished turn is not reported when that turn's worker_done was
rejected; later turns still are. worker-read and worker-show say
"never started" for a start that never got a terminal.

* fix(orchestration): a lost worker's restart command names its Task id and suits its Task's state

- The command named the Task's label, not its id.
- Restart recovery puts the Task back to ready, which --retry-of refuses:
  the command is a plain worker-start then.
- worker-show does not call a paired server's failed worker "never
  started": its record carries no terminal details.

* test(orchestration): import the turn-stop report after main's test cleanup
2026-11-11 14:56:05 -05:00
..