Relationships
#327 Nested workflow task fails with 'Bad resource ID' when workflowIdOrName uses @collective/ prefix
Opened by webframp · 5/12/2026
Description
When a workflow step uses type: workflow with a workflowIdOrName that contains an @collective/ prefix (e.g., @webframp/morning-pulse), execution fails with "Bad resource ID". Using the workflow's UUID instead works correctly.
Steps to Reproduce
# Parent workflow with nested workflow call
jobs:
- name: pulse
steps:
- name: morning-pulse
task:
type: workflow
workflowIdOrName: "@webframp/morning-pulse" # FAILS
inputs:
regions: ${{ inputs.regions }}swamp workflow run daily-ops --input 'regions:json=["us-east-1"]'
# Error: Bad resource IDExpected Behavior
The nested workflow should resolve by name, matching the name: field in the target workflow file:
# Target workflow file
name: "@webframp/morning-pulse"Workaround
Referencing the workflow by UUID works:
workflowIdOrName: "460c619c-c59a-44bd-a2ad-27c8b819e8f6" # WORKSAdditional Context
- Workflows without the
@prefix in their name (e.g.,security-cost-check) resolve correctly by name in nested workflow tasks. - The target workflow validates and runs fine when invoked directly:
swamp workflow run "@webframp/morning-pulse"succeeds. - The issue is specific to the nested
type: workflowtask resolution path.
Environment
- swamp version: 20260508.132904.0-sha.0e46f9ac
- OS: Linux
Closed
No activity in this phase yet.
stack72 commented 5/12/2026, 2:44:28 PM
@webframp Thanks for the report. I've been trying to reproduce this but can't trigger the "Bad resource ID" error on macOS (Darwin 25.3.0) with current main.
What I tried:
I pulled @webframp/aws-ops and created a parent workflow that nests @webframp/morning-pulse with type: workflow — matching your reproduction steps exactly:
jobs:
- name: pulse
steps:
- name: morning-pulse
task:
type: workflow
workflowIdOrName: "@webframp/morning-pulse"
inputs:
regions: ${{ inputs.regions }}
costDays: 7
repo: "webframp/swamp-extensions"Running swamp workflow run daily-ops --input 'regions:json=["us-east-1"]' resolved the nested workflow correctly — the child executed all four jobs (alarms, alarm-triage, costs, github). Individual steps failed on missing model definitions (expected in a scratch repo), but the workflow name resolution itself worked fine. Also tested with @john/k8s extension workflows and local @-prefixed workflows — all resolved correctly.
The string "Bad resource ID" doesn't exist anywhere in the swamp codebase — it's a Deno runtime error (Deno.errors.BadResource), which makes it hard to trace without a live reproduction.
Could you provide:
- The full error output including any stack trace (run with
--verboseif possible) - Your Deno version (
deno --version) - Is the failure consistent (every time) or intermittent?
- Are you on the latest swamp version? (yours was
20260508.132904.0-sha.0e46f9ac, current is20260512)
webframp commented 5/13/2026, 4:06:34 AM
I think this may actually be fixed in latest swamp version as I'm unable to recreate as well with latest versions so I can't get error output again.
deno --version
deno 2.7.12 (stable, release, x86_64-unknown-linux-gnu)
v8 14.7.173.7-rusty
typescript 5.9.2The failure did occur several times, though admittedly I was not paying super close attention to the agent to see how consistent it was.
swamp version
04:04:40.935 info version swamp "20260512.181928.0-sha.85567660"Feel free to close
Sign in to post a ripple.