n8n-io/n8n · error · Error
Seeding failed: ${error instanceof Error ? error.message : S
Error message
Seeding failed: ${error instanceof Error ? error.message : String(error)} What it means
A wrapper thrown at build-workflow.ts:402 that catches any error from the seed-resolution switch (the 'thread' reconstruction, 'inline' assignment, or unhandled-mode throw above) and re-throws it prefixed with 'Seeding failed:'. It also sets seedingFailed = true so the CLI attributes the failure as a framework_issue rather than an agent build failure. The inner message is preserved if the caught value is an Error, otherwise stringified. This is the outer guard for seed resolution, distinct from the later restore wrapper at line 490.
Source
Thrown at packages/@n8n/instance-ai/evaluations/harness/build-workflow.ts:402
// The arm is a superset of the restore payload — `mode` is the case
// schema's discriminant and never reaches restore-thread.
seed = config.seed;
break;
case undefined:
break;
default: {
// A new arm must decide what to restore here; without this the case
// would silently run UNSEEDED, which is the failure this slot exists
// to make impossible.
const unhandled: never = config.seed;
throw new Error(`Unhandled seed mode: ${JSON.stringify(unhandled)}`);
}
}
} catch (error: unknown) {
// A seed that can't be resolved is a harness/framework problem, not an
// agent build failure — tag it and fail before spending a live turn.
seedingFailed = true;
throw new Error(`Seeding failed: ${error instanceof Error ? error.message : String(error)}`);
}
const openingMessage = conversation[0]?.text ?? '';
const isMultiTurn = isMultiTurnConversation(conversation);
logger.info(
` Running case${isMultiTurn ? ' [multi-turn]' : ''}: "${truncate(openingMessage, 60)}"${config.laneTag ?? ''}`,
);
const projectId = await client.getPersonalProjectId();
await client.ensureThread(threadId, projectId);
// Pin the thread's credential view to the case's declared set (empty by
// default) before the first message, so every build-workflow call inside
// the build sees the same deterministic environment.
const declaredCredentials = config.credentials ?? [];
// Shared with UserProxyLlm's mid-run credential creation (if any) so a
// credential created during the run doesn't collide on display name with
// one declared here — both would otherwise default to e.g. "[eval] Slack".View on GitHub (pinned to 5ac6606e81)
Solutions
- Read the inner message after 'Seeding failed:' — it carries the root cause (e.g. 'Unhandled seed mode', a LangSmith error, a Zod parse error).
- If the inner cause is a thread-reconstruction network/auth failure, fix LANGSMITH_* env or the thread id and retry.
- If it is 'Unhandled seed mode', treat it as the framework bug in 446.
Defensive patterns
Strategy: try-catch
Try / catch
// The harness already wraps resolution; callers should surface the inner cause.
try {
await buildWorkflowCase(config);
} catch (e) {
const msg = e instanceof Error ? e.message : String(e);
if (msg.startsWith('Seeding failed:')) {
const inner = msg.slice('Seeding failed:'.length).trim();
logger.error(`Framework-side seed resolution failure: ${inner}`);
}
throw e;
} Prevention
- Treat 'Seeding failed:' as a framework_issue label — read the inner message to find the real cause (446, LangSmith error, schema parse).
- Keep seed schema and switch arms in sync so this path stays for genuine framework bugs.
When it happens
Trigger: Any failure resolving config.seed into a ConversationSeed: the unhandled-mode throw (446), a LangSmith thread reconstruction failure, an inline seed that fails schema parse. The wrapper tags all of them as framework-side.
Common situations: A new seed mode thrown by the exhaustiveness guard; a reconstructed seed from a LangSmith thread that fails downstream schema validation; network/auth errors during thread reconstruction surfacing here.
Related errors
- Unhandled seed mode: ${JSON.stringify(unhandled)}
- Pre-seeding created ${String(dataTableIds.length)} data tabl
- The opening turn attaches seeded workflow "${attachedSeedWor
- error?.description || error?.message
- error?.description || error?.message || 'Unknown error'
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/965573a0a1da4d9e.
Report an issue: GitHub.