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 could not be compiled (${compileError})

What it means

Thrown by generatedStubFor in packages/workflows/src/dry-run.ts when compiling a node's `output_format` JSON schema into a placeholder value fails during dry-run stub generation. The schema compiler (validateStructuredOutput) reports a compile error via the callback, and the function converts it into this error naming the node. The dry run cannot fabricate an output for the node, so it aborts rather than run with an unrepresentable stub.

Source

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

    );
  }

  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;
  });
  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) {

View on GitHub (pinned to 0773b97458)

Solutions

  1. Read the embedded compileError in parentheses for the exact schema fault (node id is named in the message).
  2. Fix the node's `output_format` to be a valid JSON Schema: correct `type` values, matching keyword/type pairs.
  3. Validate the schema with a JSON Schema linter or validator before running the dry run.
  4. If the node needs no structured output, remove `output_format` so no stub compilation is attempted.

Example fix

// before
output_format:
  type: str
  properties:
    ok: { type: boolean }
// after
output_format:
  type: object
  properties:
    ok: { type: boolean }
Defensive patterns

Strategy: validation

Validate before calling

import Ajv from "ajv";
function isCompilableSchema(outputFormat: unknown): boolean {
  try { new Ajv().compile(outputFormat as object); return true; } catch { return false; }
}
// run per node before dry run
const bad = nodes.filter(n => n.output_format && !isCompilableSchema(n.output_format));

Type guard

function isJsonObject(v: unknown): v is Record<string, unknown> {
  return typeof v === "object" && v !== null && !Array.isArray(v);
}

Try / catch

try {
  const stubs = await generateStubs(dag);
} catch (err) {
  if (err instanceof Error && err.message.includes("output_format could not be compiled")) {
    console.error("Fix output_format schema; see message:", err.message);
  } else throw err;
}

Prevention

When it happens

Trigger: Calling the dry-run flow (scaffold/stubs/placeholder/hydrated paths) on a DAG node whose `output_format` contains an un-compilable schema — e.g. malformed JSON Schema keywords, unsupported type combinations, or a syntactically invalid schema definition.

Common situations: Hand-authoring `output_format` YAML with typos (e.g. `type: str` instead of `type: string`), mixing incompatible keywords like `items` on a non-array type, or schemas copied from other tools that use unsupported draft keywords.

Related errors


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