n8n-io/n8n · error · Error
Seed artifact id "${id}" is too short to remap safely (need
Error message
Seed artifact id "${id}" is too short to remap safely (need ≥8 chars) What it means
Thrown by remapSeedArtifactIds() when a workflow or agent id in the seed is shorter than 8 characters. The remap rewrites ids with a global string replaceAll over the serialized seed; a short id risks matching unrelated substrings inside message text or other fields, corrupting the seed. The harness refuses rather than perform an unsafe rewrite. Artifact ids are expected to be long random tokens.
Source
Thrown at packages/@n8n/instance-ai/evaluations/harness/conversation-seed.ts:364
// Workflows and agents share one id space: a fresh id must miss every original,
// or this sequential replace could rewrite a not-yet-processed artifact's id.
const originalIds = new Set([
...seed.workflows.map((workflow) => workflow.id),
...seed.agents.map((agent) => agent.id),
]);
let serialized = JSON.stringify({
messages: seed.messages,
workflows: seed.workflows,
agents: seed.agents,
});
// Longest id first, for the same reason the name pass below sorts: if one id were a
// prefix of another ("abcdefgh" / "abcdefgh12"), rewriting the short one first would
// eat the long one's prefix and leave it with a derived id no later pass matches.
for (const id of [...originalIds].sort((a, b) => b.length - a.length)) {
// Artifact ids are long random tokens; a short id would risk rewriting
// unrelated substrings, so refuse instead of corrupting the seed.
if (id.length < 8) {
throw new Error(`Seed artifact id "${id}" is too short to remap safely (need ≥8 chars)`);
}
let newId = generateNanoId();
while (originalIds.has(newId)) newId = generateNanoId();
serialized = serialized.replaceAll(id, newId);
}
const remapped = ConversationSeedSchema.parse(jsonParse(serialized));
// n8n itself allows duplicate workflow names, so a scrubbed real seed could
// legitimately carry two. This harness can't take them: the rename below rewrites
// mentions by matching the name text, so both workflows' mentions would collapse
// onto the first one's new name and the history would point at the wrong workflow.
// Refuse rather than mangle — a limit of the rewrite, not an n8n rule.
const names = remapped.workflows.map((workflow) => workflow.name);
const duplicate = names.find((name, index) => names.indexOf(name) !== index);
if (duplicate !== undefined) {
throw new Error(
`Seed declares two workflows named "${duplicate}". The harness rewrites seed workflow ` +View on GitHub (pinned to 5ac6606e81)
Solutions
- Replace any short id with a real nano id or any token ≥8 characters that does not appear as a substring elsewhere in the seed.
- When authoring fixtures, generate ids with the same generator the runtime uses (generateNanoId).
- Avoid ids that are substrings of message text.
Example fix
// before
workflows: [{ id: 'wf1', name: 'Report', ... }]
// after
workflows: [{ id: 'wf_8Kq2pR9xT', name: 'Report', ... }] Defensive patterns
Strategy: validation
Validate before calling
// Validate id length before the remap runs.
function assertIdsRemappable(seed: ConversationSeed): void {
const ids = [...seed.workflows.map((w) => w.id), ...seed.agents.map((a) => a.id)];
const tooShort = ids.find((id) => id.length < 8);
if (tooShort) throw new Error(`Artifact id "${tooShort}" is <8 chars; use a long random token so replaceAll is safe.`);
} Prevention
- Author ids with generateNanoId (or any ≥8-char random token).
- Add a fixture linter enforcing the 8-char floor at author time.
- Avoid ids that appear as substrings of message text.
When it happens
Trigger: A seed fixture whose workflow/agent id is a hand-typed short string (e.g. 'wf1', 'a'). The 8-char floor is a safety bound on the replaceAll-based remap, not an n8n rule.
Common situations: Hand-authored fixture using a mnemonic id; a placeholder id never replaced with a real nano id; truncation during scrubbing.
Related errors
- Seed declares two agents with id "${duplicateAgentId}". Each
- Seed declares two workflows named "${duplicate}". The harnes
- Cannot decrease maxIterations when resuming a run. Expected
- Checkpoint for runId ${this.runId} has pending tool calls —
- Model ID is required
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/897134523a5e3e3f.
Report an issue: GitHub.