Relationships
#2920 workflow cancel cannot cancel a suspended run whose workflow file was deleted, and cancel --all silently skips it
Opened by hammz · 10/1/2026· Shipped 10/5/2026
Description
If a workflow's YAML file is deleted while one of its runs is suspended, that run cannot be cancelled from the local CLI:
swamp workflow cancel <wf>fails with "Workflow not found";swamp workflow cancel <wf> --run <id>fails the same way;swamp workflow cancel --allsilently skips the run.
The run stays suspended indefinitely. The only way to cancel it is through swamp serve, which settles it correctly. Either POST /api/v1/cancel/workflow-run/<id> or swamp workflow cancel --run <id> --server <url> works.
Steps to reproduce
swamp workflow run gated --input env=x --json. The run suspends at a manual_approval gate; call its id$R.rm workflows/workflow-<gated id>.yaml.swamp workflow cancel gated --jsonexits 1 withWorkflow not found: gated.swamp workflow cancel gated --run $R --jsonexits 1 withWorkflow not found: gated.swamp workflow cancel --all --jsonexits 0 with{"cancelled":[],"finished":[],"deleted":[],"skipped":[]}.$Ris stillsuspended.
Expected
workflow cancel --run <id>cancels a suspended run by its id, even when the definition has been removed. The run's own evaluated snapshot is still at.swamp/workflows-evaluated/runs/<id>/evaluated-workflow.yaml. Since swamp-club#2895, settlement can use that snapshot, or the run's records alone when there is no snapshot. Serve already cancels it this way.--allincludes such runs, or at least reports them underskippedwith the reason.
Notes
This is the local-CLI counterpart of the "A suspended run whose workflow file was deleted cannot be cancelled" gap listed in the nested approval gates UAT plan. Reproduced with release 20261001.190402.0-sha.543aad7e and with the swamp-club#2895 branch (8ae02e19).
Environment: Linux x86_64, filesystem datastore.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.