coleam00/Archon · error · Error

Node '${node.id}': output_format declared but the provider r

Error message

Node '${node.id}': output_format declared but the provider returned no schema-valid structured output. The model likely replied with prose, refused, or emitted unparseable JSON.

What it means

A node declared output_format but the provider returned no schema-valid structured output and the turn did NOT idle-time out — the model finished without producing valid structured data (prose answer, refusal, or JSON that failed to parse). The executor throws this explanatory error instead of treating the turn as an empty-success.

Source

Thrown at packages/workflows/src/dag-executor.ts:3073

      }

      // No structured output at all (prose / refusal / parse miss / timeout).
      getLog().warn(
        { nodeId: node.id, workflowRunId: workflowRun.id },
        'dag.structured_output_missing'
      );
      if (canReask) {
        await scheduleReask(['no JSON object was found in the response']);
        continue;
      }
      // Surface the real cause: a timeout/abort produces no structured output too,
      // and reporting it as "the model replied with prose" would mislead.
      if (nodeIdleTimedOut) {
        throw new Error(
          `Node '${node.id}': timed out (no output for ${String(effectiveIdleTimeout / 60000)} min) before producing the required structured output.`
        );
      }
      throw new Error(
        `Node '${node.id}': output_format declared but the provider returned no schema-valid structured output. ` +
          'The model likely replied with prose, refused, or emitted unparseable JSON.'
      );
    }

    // Only post "completed via idle timeout" when output exists — zero-output timeout falls through to the empty-output guard below.
    if (nodeIdleTimedOut && (nodeOutputText.trim() !== '' || structuredOutput !== undefined)) {
      getLog().warn(
        { nodeId: node.id, timeoutMs: effectiveIdleTimeout },
        'dag_node_completed_via_idle_timeout'
      );
      await safeSendMessage(
        platform,
        conversationId,
        `⚠️ Node \`${node.id}\` completed via idle timeout (no output for ${String(effectiveIdleTimeout / 60000)} min). The AI likely finished but the subprocess didn't exit cleanly.`,
        nodeContext
      );
    }

View on GitHub (pinned to 0773b97458)

Solutions

  1. Strengthen the prompt: explicitly demand a single raw JSON object matching output_format, with an example.
  2. Check whether the model refused and rephrase the task or switch models.
  3. Enable/raise reask attempts so the model gets another chance after a parse miss.
  4. Simplify the output_format schema, or split it across nodes.

Example fix

// before
prompt: "Analyze this code and tell me what you find."
// after
prompt: "Analyze this code. Respond with ONLY a JSON object: {\"findings\": [...]}"
+ output_format:
  type: object
  required: [findings]
Defensive patterns

Strategy: try-catch

Validate before calling

// smoke-test the prompt/schema pair before production
const probe = await askModel(promptRequiringJson);
if (!extractsJsonObject(probe)) console.warn('Prompt does not reliably yield JSON');

Type guard

function extractsJsonObject(text: string): text is string {
  try { return typeof JSON.parse(stripFences(text)) === 'object'; } catch { return false; }
}

Try / catch

try {
  await runNode(node);
} catch (e) {
  if (String(e).includes('no schema-valid structured output')) console.error('Model replied with prose/refusal — strengthen JSON instructions or switch model');
  else throw e;
}

Prevention

When it happens

Trigger: Model replied in prose, refused the task, or emitted JSON that could not be parsed into an object; all reask attempts (asking for valid JSON) were exhausted or not possible.

Common situations: Prompt does not request JSON strongly enough; model refuses due to safety/policy; model wraps JSON in markdown fences or explanation text the parser misses; schema so complex the model never satisfies it and gives up.

Related errors


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