Relationships
#1769 workflow cancel --all on the serve host shuts down the serve process
Opened by psftw · 8/21/2026· Shipped 8/24/2026
Running swamp workflow cancel --all from the CLI on the host where
swamp serve is executing a run shuts down the serve process itself, not just
the run. Expected: cancelling runs terminates the runs; the daemon stays up.
Repro (swamp 20260820.072114.0, fresh repo, one command/shell model with a
workflow whose single step is run: sleep 45):
$ swamp serve --auth-mode none --host 127.0.0.1 --port 4747 &
$ swamp workflow run probe-flow --server ws://127.0.0.1:4747 &
# wait for the run to show "running", then, on the same host:
$ swamp workflow cancel --all
workflow·cancel: Cancelled 1 workflow run(s)
workflow·cancel: "probe-flow" ("e98488c1-…"): "running" -> cancelledServe log at that moment — the graceful shutdown path, then process exit:
system │ Shutting down...
system │ Scheduled execution service stopped
system │ Draining 1 active run(s)...The run's client sees Connection dropped, reconnecting (1/5)... and then
fails with Could not connect to ws://127.0.0.1:4747/.
With zero active runs, cancel --all is a no-op and serve stays up — the
shutdown triggers specifically when the cancelled set includes a run whose
executor is the serve process.
Also worth noting: the local CLI flipped the serve-owned run's record to
cancelled directly, while serve was still draining it — the CLI acts on
records without going through the serve that owns the run.
Ask: cancel the run inside serve (or reject the local cancel and point at --server); never terminate the serve process.
Shipped
Click a lifecycle step above to view its details.