coleam00/Archon · error · Error

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

Error message

Cannot generate dry-run stub for node '${node.id}': output_format produced a placeholder of an unsupported type

What it means

Thrown by generatedStubFor after a schema compiles and validates, when the generated placeholder value itself has a type the stub machinery cannot represent (isStubValue returns false). This is an internal guard: some schema shapes yield placeholders (e.g. deeply exotic types) outside the supported stub value set.

Source

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

    value[node.loop.until_field] = true;
  }

  let compileError: string | undefined;
  const validation = validateStructuredOutput(value, node.output_format, message => {
    compileError = message;
  });
  if (compileError !== undefined) {
    throw new Error(
      `Cannot generate dry-run stub for node '${node.id}': output_format could not be compiled (${compileError})`
    );
  }
  if (!validation.valid) {
    throw new Error(
      `Cannot generate schema-valid dry-run stub for node '${node.id}': ${validation.errors.join('; ')}`
    );
  }
  if (!isStubValue(value)) {
    throw new Error(
      `Cannot generate dry-run stub for node '${node.id}': output_format produced a placeholder of an unsupported type`
    );
  }
  return value;
}

function stubSatisfiesNode(node: DagNode, stub: DryRunStubValue): boolean {
  if (node.output_format !== undefined) {
    const validation = validateStructuredOutput(stub, node.output_format);
    if (!validation.valid) return false;
  }
  if (isLoopNode(node)) {
    return loopIterationCompletes(node.loop, completedOutput(node, stub)).kind !== 'incomplete';
  }
  return true;
}

function collectsStub(node: DagNode): boolean {

View on GitHub (pinned to 0773b97458)

Solutions

  1. Restructure `output_format` to a supported shape (typically `object` with primitive/array properties).
  2. Supply a manual stub file for the node to bypass placeholder generation.
  3. Check for a library update or change in supported placeholder types if this previously worked.

Example fix

// before
output_format:
  type: "null"
// after
output_format:
  type: object
  properties: {}
Defensive patterns

Strategy: fallback

Validate before calling

const SUPPORTED_TOP_TYPES = new Set(["object", "array", "string", "number", "boolean"]);
function stubRepresentable(schema: { type?: string }): boolean {
  return !schema.type || SUPPORTED_TOP_TYPES.has(schema.type);
}

Type guard

function isStubRepresentable(v: unknown): v is string | number | boolean | object | unknown[] {
  return v !== null && v !== undefined && typeof v !== "function" && typeof v !== "symbol";
}

Try / catch

let stub: unknown;
try {
  stub = generatedStubFor(node);
} catch (err) {
  if (err instanceof Error && err.message.includes("placeholder of an unsupported type")) {
    stub = manualStubs[node.id] ?? {};
  } else throw err;
}

Prevention

When it happens

Trigger: Dry-run stub generation where `output_format` compiles and validates but the placeholder is an unsupported runtime type — e.g. a schema resolving to null-only or an unsupported top-level type.

Common situations: `output_format: { type: "null" }`, schemas that degenerate to non-serializable placeholder kinds, or library/version changes where the stub generator's supported type set shrank relative to schemas users wrote.

Related errors


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