n8n-io/n8n · error · WorkflowGenerationError
CodeWorkflowBuilder did not produce a workflow
Error message
CodeWorkflowBuilder did not produce a workflow
What it means
Post-run invariant error in createCodeWorkflowBuilderGenerator, raised as WorkflowGenerationError. It fires when the CodeWorkflowBuilder chat stream completed (including timeout cleanup) but no workflow message was ever captured in streamState — the builder streamed output without producing a workflow.
Solutions
- Inspect the streamed builder messages for errors or refusals; the run ended without emitting a workflow.
- Re-run the case; LLM non-determinism can produce a chat-only reply with no workflow.
- Check the prompt and feature flags — a prompt that only asks questions yields no workflow.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/ai-workflow-builder.ee/evaluations/cli/index.ts:400 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/a8a428f3a0fd4603.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/ai-workflow-builder.ee/evaluations/cli/index.ts:400
try {
for await (const output of builder.chat(
payload,
EVAL_USERS.LANGSMITH,
abortController.signal,
historyContext,
)) {
for (const message of output.messages) {
processCodeBuilderMessage(message, streamState);
}
}
} finally {
if (timeoutId !== undefined) {
clearTimeout(timeoutId);
}
}
if (!streamState.workflow) {
throw new WorkflowGenerationError('CodeWorkflowBuilder did not produce a workflow');
}
// Report accumulated token usage
if (collectors?.tokenUsage && (totalInputTokens > 0 || totalOutputTokens > 0)) {
collectors.tokenUsage({ inputTokens: totalInputTokens, outputTokens: totalOutputTokens });
}
return {
workflow: streamState.workflow,
generatedCode: streamState.generatedCode,
agentTextResponse: streamState.textParts.join('') || undefined,
};
};
}
/**
* Load test cases from various sources.
*/View on GitHub (pinned to 5ac6606e81)