coleam00/Archon · error · Error

Cannot generate dry-run stub for node '${node.id}': asynchro

Error message

Cannot generate dry-run stub for node '${node.id}': asynchronous output_format schemas are unsupported

What it means

Dry-run mode fabricates stub outputs from each node's output_format so downstream nodes have plausible inputs. Asynchronous output_format ($async: true) describes a value that materializes later, so no synchronous stub can be generated; generatedStubFor throws for such nodes.

Source

Thrown at packages/workflows/src/dry-run.ts:165

      return null;
    case 'string': {
      const minLength =
        typeof schema.minLength === 'number' && Number.isInteger(schema.minLength)
          ? Math.max(0, schema.minLength)
          : 0;
      return minLength > 4 ? 'T'.repeat(minLength) : 'TODO';
    }
    default:
      return 'TODO';
  }
}

function generatedStubFor(node: DagNode): DryRunStubValue {
  if (node.output_format === undefined) {
    return isLoopNode(node) && node.loop.until !== undefined ? node.loop.until : 'TODO';
  }
  if (node.output_format.$async === true) {
    throw new Error(
      `Cannot generate dry-run stub for node '${node.id}': asynchronous output_format schemas are unsupported`
    );
  }

  const value = schemaPlaceholder(node.output_format);
  if (isLoopNode(node) && node.loop.until_field !== undefined) {
    if (!isRecord(value)) {
      throw new Error(
        `Cannot generate dry-run stub for node '${node.id}': loop.until_field requires an object-typed output_format`
      );
    }
    value[node.loop.until_field] = true;
  }

  let compileError: string | undefined;
  const validation = validateStructuredOutput(value, node.output_format, message => {
    compileError = message;
  });

View on GitHub (pinned to 0773b97458)

Solutions

  1. Remove $async: true from the node's output_format if the node is not actually asynchronous
  2. Exclude or replace that node for dry-run purposes with a synchronous schema stub
  3. Run the workflow without dry-run if async output semantics are required
  4. Restructure: split the async node so the dry-run-validated part has a synchronous output_format

Example fix

// before
output_format:
  $async: true
  type: object
  properties:
    result: { type: string }
// after (for dry-run validation)
output_format:
  type: object
  properties:
    result: { type: string }
Defensive patterns

Strategy: validation

Validate before calling

if (node.output_format?.$async === true) throw new Error(`node ${node.id} uses $async output; dry-run unsupported`);

Type guard

function isSyncSchema(schema: OutputFormat | undefined): boolean {
  return schema !== undefined && schema.$async !== true;
}

Try / catch

try {
  await engine.dryRun(workflow);
} catch (err) {
  if (err instanceof Error && err.message.includes('asynchronous output_format schemas are unsupported')) {
    // strip $async for the dry-run copy of the workflow or run for real
  } else throw err;
}

Prevention

When it happens

Trigger: Running a workflow dry-run where a node's output_format contains $async: true — e.g. long-running AI nodes whose schema is marked asynchronous to signal deferred completion — and the stub generator encounters that flag.

Common situations: Authoring a node with an async output schema (polling/durable-wait pattern) then trying to validate the workflow with dry-run; copying an output_format from a durable-wait node into a normal dry-run-validated workflow.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/349f73a9a7cb35cd. Report an issue: GitHub.