Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublicTeam
AssigneesNone

Relationships

#5005 Nested workflow inputs do not reach the child's step expressions (passed values and defaults evaluate to empty)

Opened by svendowideit · 11/23/2026

Summary

Inputs passed to a nested workflow (task: { type: workflow, inputs: {...} }) do not reach the child's step expressions. Inside the child, ${{ inputs.x }} evaluates to the empty string for both passed values and the declared defaults of the child's own input schema, so every step that depends on an input receives "".

The same workflow body run directly (swamp workflow run <child> --input x=...) works, which isolates the fault to the nested call.

Reproduction

Fleet: one orchestrator (swamp serve) and one enrolled worker (worker-a), release 20261121.085447.0-sha.e52c839b.

A child workflow whose input is a zod enum, and a step that forwards it:

# child
name: child
inputs:
  properties:
    serviceScope:
      type: string
      enum: [auto, system, user]
      default: auto
jobs:
  - name: main
    steps:
      - name: plan
        task:
          type: model_method
          modelType: '<type with an enum arg named serviceScope>'
          modelName: x
          methodName: plan
          inputs:
            serviceScope: ${{ inputs.serviceScope }}   # evaluates to ""
# parent
name: parent
jobs:
  - name: main
    target: worker-a
    affinity: true
    steps:
      - name: run
        task:
          type: workflow
          workflowIdOrName: child
          inputs:
            serviceScope: user        # a literal, not a CEL expression

Observed:

  • Parent run → child's step fails with Method arguments validation failed: Invalid option: expected one of "auto"|"system"|"user" at "serviceScope".
  • The same literal in a top-level run of the identical body (swamp workflow run child --input serviceScope=user) succeeds — plan, sync, resolve, download and stage all complete.
  • The child also behaves as if unset: with default: auto and no value, it takes the auto/system path (and then fails on elevation) rather than the user path the parent passed.

So both the passed literal and the schema default resolve to "" inside the child, while the parent's call validates fine.

Why it matters

Every extension that factors privileged work out through @svendowideit/sudo-run (or any other nested helper) currently gets helpers with empty inputs: operation, args:json, allowedOperations and so on arrive as "" and the helper fails, or worse, does something other than what the parent asked for. A body that is correct when run directly is broken exactly when it is composed — which is the main reason to have nested workflows at all.

Concretely, an install workflow that reaches stage successfully (release downloaded and checksum-verified) dies on the next step, the nested sudo-run placement, because that child received no operation:

done stage in 21.3s · Staged Ollama 0.40.17 at /tmp/ollama-stage-… (32 files)
elevate │ failed run in 473ms · 'sudo' exists but needs a password …
main    │ failed place-binary in 598ms

Expected

  • A literal (or CEL) value in the parent's task.inputs is what the child sees in ${{ inputs.x }}.
  • A child input with a default falls back to that default when the parent does not pass it.
  • Ideally, the nested call validates the values against the child's input schema before dispatch, so a bad handoff fails at the parent step (with the argument name) instead of deep inside the child.

Notes

  • Placement is irrelevant here: it reproduces with affinity: true and with a single worker, and the child does run in the right place — only its inputs are lost.
  • Related: #5004 (an empty placement value queues rather than clearing). Same failure family — an empty string produced by an unset value is silently accepted instead of being treated as "not set".
02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

11/23/2026, 1:00:48 AM

No activity in this phase yet.

03Sludge Pulse
svendowideit moved this from a private collective to public11/25/2026, 1:21:59 AM

Sign in to post a ripple.