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

Relationships

#4741 workflow resume ignores globalArgs of direct type execution steps; auto-definition created with empty globalArguments

Opened by thebetternewt · 11/14/2026· Shipped 11/14/2026

Summary

A step using direct type execution (behaviorType + behaviorName + globalArgs) gets its globalArgs on a fresh swamp workflow run, but not when the run is continued with swamp workflow resume --run <id> [--from <step>]. On resume, an auto-definition that does not exist yet is created with globalArguments: {}, and one that exists keeps the globalArgs of its last fresh run. Nothing warns, so the step silently uses the type's defaults.

Impact

With @swamp/git, repoPath falls back to . — the swamp repo — so a resumed workflow committed and pushed in the wrong checkout (and in another run, into a worktree from an earlier, unrelated run).

Reproduce (swamp 20261113.201711.0)

  1. Workflow with input dir and three steps:
    • second: type: behavior, behaviorType: "@swamp/git", behaviorName: probe-from-step, methodName: status, globalArgs: { repoPath: ${{ inputs.dir }} }
    • boom: type: assert, expr: inputs.dir == "never" (fails on purpose), depends on second
  2. swamp workflow run probe --input dir=<some other git checkout> → fails at boom. swamp behavior get probe-from-step --json shows globalArguments: {"repoPath": "<dir>"} — correct.
  3. swamp behavior delete probe-from-step --force --yes
  4. swamp workflow resume probe --run <id> --from second
  5. swamp behavior get probe-from-step --json → globalArguments: {}. The step ran with repoPath: ".".

The method-summary report of the resumed step also lists globalArgs: [].

Expected

Resume evaluates globalArgs the same way a fresh run does (from the run's inputs and step outputs), or refuses to resume such a step with an error.

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

Shipped

11/14/2026, 3:24:40 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
zack assigned zack11/14/2026, 2:39:57 PM
Editable. Press Enter to edit.

zack commented 11/14/2026, 3:24:41 PM

Thanks @thebetternewt for reporting this! We shipped: workflow resume builds its own direct-type resolver that drops the step's globalArgs (it passes undefined to resolveOrCreateDefinition), so a resumed direct-execution step creates its auto-definition with empty globalArguments or keeps the last fresh run's values. Extract the resolver workflow run already uses into a shared createDirectTypeResolver factory in src/cli and use it from both run and resume, so resume evaluates and persists globalArgs exactly as a fresh run does, and the two copies can no longer drift.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.