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

Relationships

#2502 workflow resume --input key=value does not coerce the value to the declared input type (workflow run does)

Opened by hammz · 9/24/2026· Shipped 9/25/2026

Problem

swamp workflow resume <wf> --run <id> --input key=value does not coerce the value to the workflow's declared input type, while swamp workflow run --input key=value does. With an array input, the resume passes the raw string '["a"]'. A forEach over that input then fails with forEach.in must evaluate to an array or object, got: string. The failure happens after the run was reset, so the job is left running with its reset iterations pending. A plain retry then refuses the run because steps are pending.

Reproduction

Installed swamp 20260924.181834.0-sha.55571cdb.

  1. Create a workflow shrink that declares an input envs (type: array, items string). It has one job main with the forEach step deploy-${{ self.env }} over ${{ inputs.envs }}, which runs test ${{ self.env }} != b through a command/shell model.
  2. swamp workflow run shrink --input 'envs=["a","b"]'. deploy-b fails, and the run is failed. Here the array input is coerced correctly.
  3. swamp workflow resume shrink --run <id> --input 'envs=["a"]' fails with Error: forEach.in must evaluate to an array or object, got: string.
  4. swamp workflow history get shrink --json shows job main running, with deploy-a and deploy-b pending.

Passing the override as JSON (--input '{"envs":["a"]}') works.

Cause

src/cli/commands/workflow_resume.ts parses --input, --input-file and --stdin with parseInputs and passes them through as they are. src/libswamp/workflows/run.ts applies coerceInputTypes(input.inputs, workflow.inputs) on the run path, but the resume path never does.

Fix approach

Coerce resume override inputs against the workflow's input schema, the same way the run path does, before resume() merges them. That applies to the local and --server paths. Found while verifying swamp-club#2433.

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

Shipped

9/25/2026, 3:45:37 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
hammz assigned hammz9/25/2026, 2:24:08 PM

Sign in to post a ripple.