Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

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" -> cancelled

Serve 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.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 6 MOREREVIEW+ 6 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

8/24/2026, 8:36:51 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack728/24/2026, 7:42:09 PM
Editable. Press Enter to edit.

stack72 commented 8/24/2026, 8:37:48 PM

Thanks @psftw for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.