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

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 --all silently 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

  1. swamp workflow run gated --input env=x --json. The run suspends at a manual_approval gate; call its id $R.
  2. rm workflows/workflow-<gated id>.yaml.
  3. swamp workflow cancel gated --json exits 1 with Workflow not found: gated.
  4. swamp workflow cancel gated --run $R --json exits 1 with Workflow not found: gated.
  5. swamp workflow cancel --all --json exits 0 with {"cancelled":[],"finished":[],"deleted":[],"skipped":[]}. $R is still suspended.

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.
  • --all includes such runs, or at least reports them under skipped with 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.

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

Shipped

10/5/2026, 7:03:53 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz10/5/2026, 3:59:07 PM

Sign in to post a ripple.