{"record":{"id":"349f73a9a7cb35cd","repo":"coleam00/Archon","slug":"cannot-generate-dry-run-stub-for-node-node-id","errorCode":null,"errorMessage":"Cannot generate dry-run stub for node '${node.id}': asynchronous output_format schemas are unsupported","messagePattern":"Cannot generate dry-run stub for node '(.+?)': asynchronous output_format schemas are unsupported","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflows/src/dry-run.ts","lineNumber":165,"sourceCode":"      return null;\n    case 'string': {\n      const minLength =\n        typeof schema.minLength === 'number' && Number.isInteger(schema.minLength)\n          ? Math.max(0, schema.minLength)\n          : 0;\n      return minLength > 4 ? 'T'.repeat(minLength) : 'TODO';\n    }\n    default:\n      return 'TODO';\n  }\n}\n\nfunction generatedStubFor(node: DagNode): DryRunStubValue {\n  if (node.output_format === undefined) {\n    return isLoopNode(node) && node.loop.until !== undefined ? node.loop.until : 'TODO';\n  }\n  if (node.output_format.$async === true) {\n    throw new Error(\n      `Cannot generate dry-run stub for node '${node.id}': asynchronous output_format schemas are unsupported`\n    );\n  }\n\n  const value = schemaPlaceholder(node.output_format);\n  if (isLoopNode(node) && node.loop.until_field !== undefined) {\n    if (!isRecord(value)) {\n      throw new Error(\n        `Cannot generate dry-run stub for node '${node.id}': loop.until_field requires an object-typed output_format`\n      );\n    }\n    value[node.loop.until_field] = true;\n  }\n\n  let compileError: string | undefined;\n  const validation = validateStructuredOutput(value, node.output_format, message => {\n    compileError = message;\n  });","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/dry-run.ts#L147-L183","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove $async: true from the node's output_format if the node is not actually asynchronous","Exclude or replace that node for dry-run purposes with a synchronous schema stub","Run the workflow without dry-run if async output semantics are required","Restructure: split the async node so the dry-run-validated part has a synchronous output_format"],"exampleFix":"// before\noutput_format:\n  $async: true\n  type: object\n  properties:\n    result: { type: string }\n// after (for dry-run validation)\noutput_format:\n  type: object\n  properties:\n    result: { type: string }","handlingStrategy":"validation","validationCode":"if (node.output_format?.$async === true) throw new Error(`node ${node.id} uses $async output; dry-run unsupported`);","typeGuard":"function isSyncSchema(schema: OutputFormat | undefined): boolean {\n  return schema !== undefined && schema.$async !== true;\n}","tryCatchPattern":"try {\n  await engine.dryRun(workflow);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('asynchronous output_format schemas are unsupported')) {\n    // strip $async for the dry-run copy of the workflow or run for real\n  } else throw err;\n}","preventionTips":["Reserve $async schemas for real runs; keep a sync twin schema for dry-run validation","Lint workflows for $async before invoking dry-run","Split async durable-wait nodes out of dry-run-validated graphs"],"tags":["dry-run","output-format","async-schema"],"backgroundTag":"unsupported-schema-feature","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}