Relationships
#493 workflow approve/resume cannot find suspended run when using S3 datastore
Opened by webframp · 5/30/2026· Shipped 5/31/2026
Description
When a workflow containing a manual_approval task type step is run with an S3 datastore configured, the run suspends correctly but cannot be approved or resumed. The approval-related commands (workflow approve, workflow resume, workflow approvals) all report "No suspended runs found" despite workflow run search --status suspended returning the run.
Steps to Reproduce
Initialize a repo with S3 datastore:
swamp datastore setup extension @swamp/s3-datastore \ --config '{"bucket": "my-bucket", "prefix": "my-prefix", "region": "us-east-1"}'Create a workflow with a
manual_approvalstep:jobs: - name: scan steps: - name: do-something task: type: model_method modelIdOrName: my-model methodName: get inputs: { identifier: "..." } - name: approve steps: - name: review-gate task: type: manual_approval prompt: "Review before proceeding" dependsOn: - job: scan condition: { type: succeeded }
Run the workflow:
swamp workflow run my-workflow --jsonOutput shows
"status": "suspended"with a run ID.Attempt to approve:
swamp workflow approve my-workflow review-gateFails: "No suspended runs found for workflow"
Try with explicit --run ID:
swamp workflow approve my-workflow review-gate --run <run-id>Fails: "Workflow run not found: "
Observed Behavior
swamp workflow run search --status suspended→ finds the run correctlyswamp workflow history get <name>→ shows run with"runId": nullswamp workflow approvals→ returns empty{"approvals": []}swamp workflow approve→ "No suspended runs found"swamp workflow resume→ "No suspended runs found"- Local
.swamp/workflow-runs/<id>/contains only a.logfile, no state file
The approve command logs show it syncing from the S3 datastore before lookup:
INF datastore·lock Acquiring lock for "__global__"
INF datastore·sync Syncing from "@swamp/s3-datastore"...
INF datastore·sync "@swamp/s3-datastore" sync complete, already up to dateExpected Behavior
swamp workflow approve should find and approve the suspended run.
Hypothesis
The workflow run state is not being persisted to the S3 datastore (or is persisted in a location the approve/resume commands don't check). The run is indexed for search purposes but the full state needed by the approval machinery is missing.
Environment
Shipped
Click a lifecycle step above to view its details.