CANCEL A STUCK RUN
This guide shows you how to stop a workflow or model method run that is stuck, no longer needed, or was started by mistake.
Prerequisites
- Swamp installed and on your
PATH - An initialised repo (
swamp repo init) - A workflow or model method run currently in progress
1. Identify the stuck run
If you started the run interactively and the terminal is still open, skip to step 2 — you can cancel directly from the terminal.
If the run is executing in the background or on a swamp serve instance, find
its name or run ID. For workflows:
swamp workflow listFor model method runs:
swamp model list2. Cancel the run
For a workflow:
swamp workflow cancel my-workflowFor a model method run:
swamp model cancel my-serverIf you started the run interactively with swamp workflow run or
swamp model method run and the terminal is still open, press Ctrl+C instead.
The CLI intercepts the signal and cancels the run cleanly.
To record why you cancelled (useful for audit trails):
swamp workflow cancel my-workflow --reason 'Deploying a hotfix instead'3. Verify the cancellation
The run's status transitions to cancelled. Steps that were running at the time
of cancellation also show cancelled; steps that had already completed keep
their original status.
Next steps
- Execution Cancellation —
full flag reference for
swamp workflow cancel - Execution Cancellation
— full flag reference for
swamp model cancel - REST API — cancel runs on a
swamp serveinstance via HTTP