Skip to main content
← Back to list
01Issue
BugTriagedSwamp CLI
Assigneesstack72

#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 ID

Expected 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"  # WORKS

Additional 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: workflow task resolution path.

Environment

  • swamp version: 20260508.132904.0-sha.0e46f9ac
  • OS: Linux
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW

Triaged

5/12/2026, 10:03:27 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack725/12/2026, 9:46:18 AM
Editable. Press Enter to edit.

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:

  1. The full error output including any stack trace (run with --verbose if possible)
  2. Your Deno version (deno --version)
  3. Is the failure consistent (every time) or intermittent?
  4. Are you on the latest swamp version? (yours was 20260508.132904.0-sha.0e46f9ac, current is 20260512)

Sign in to post a ripple.