kew stop¶
Emergency stop for the whole fleet. Kills every in-flight agent run and
latches dispatch — nothing new starts until you run kew resume.
What it does¶
- Engages the fleet-stop latch first, so no new dispatches start while the kill proceeds.
- For every in-flight run: verifies the recorded process group still
belongs to a kew-launched agent (guards against PID reuse), marks the
run
killedin the run store, then sendsSIGTERMto the process group, waits up to 10 seconds, andSIGKILLs survivors. - Resets affected issues from
in-progressback toready. - Preserves worktrees — killed work is recoverable.
- Records a
fleet_stopevent in the audit trail (kew audit tail).
Killed runs appear in kew status with status killed (not failure),
so operator stops are distinguishable from failures in history and
analytics.
Options¶
| Option | Description |
|---|---|
--reason TEXT |
Recorded on the latch, shown by kew status and refusal messages |
Notes¶
- Running
kew stopwith nothing in flight still engages the latch — that is the point of a circuit breaker. - Running it twice is harmless; the second invocation reports the fleet is already stopped.
- There is no
--forcebypass on dispatch commands.kew resumeis the only way back.