{"record":{"id":"b986e5227d96bd7e","repo":"n8n-io/n8n","slug":"seed-agents-clash-name-clash-agentid-and","errorCode":null,"errorMessage":"Seed agents \"${clash.name ?? clash.agentId}\" and \"${entry.name ?? entry.agentId}\" both address as \"${entry.ref}\" — give them names that differ by more than case, spacing or punctuation","messagePattern":"Seed agents \"(.+?)\" and \"(.+?)\" both address as \"(.+?)\" — give them names that differ by more than case, spacing or punctuation","errorType":"exception","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/src/tools/orchestration/agent-target-binding.ts","lineNumber":142,"sourceCode":"\n/**\n * Same metadata `saveAgentBuilderTarget` writes, as a plain value — for eval\n * thread seeding, which has no `InstanceAiContext` to hand it. Last target wins\n * as the active one, mirroring \"most recently targeted\".\n */\nexport function agentBuilderTargetMetadata(targets: AgentBuilderTarget[]): Record<string, unknown> {\n\tconst entries = targets.map((target) =>\n\t\ttarget.ref ? { ...target, ref: normalizeAgentRef(target.ref) } : target,\n\t);\n\tconst registry: Record<string, AgentBuilderTarget> = {};\n\tfor (const entry of entries) {\n\t\tif (!entry.ref) continue;\n\t\t// Two refs normalizing to one key (\"Support Bot\" / \"support-bot\") would drop\n\t\t// an entry, and a later ref lookup would then edit the surviving agent —\n\t\t// silently the wrong one. Refuse instead, like a duplicate seed workflow name.\n\t\tconst clash = registry[entry.ref];\n\t\tif (clash && clash.agentId !== entry.agentId) {\n\t\t\tthrow new UserError(\n\t\t\t\t`Seed agents \"${clash.name ?? clash.agentId}\" and \"${entry.name ?? entry.agentId}\" both address as \"${entry.ref}\" — give them names that differ by more than case, spacing or punctuation`,\n\t\t\t);\n\t\t}\n\t\tregistry[entry.ref] = entry;\n\t}\n\treturn {\n\t\t[METADATA_KEY]: entries[entries.length - 1],\n\t\t[REGISTRY_METADATA_KEY]: registry,\n\t};\n}\n\n/** Epoch ms of a seed message's `createdAt`, or 0 when it is missing/unparseable. */\nfunction stampOf(message: Record<string, unknown>): number {\n\tconst raw = message.createdAt;\n\tif (typeof raw !== 'string') return 0;\n\tconst parsed = Date.parse(raw);\n\treturn Number.isNaN(parsed) ? 0 : parsed;\n}","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/src/tools/orchestration/agent-target-binding.ts#L124-L160","documentation":"Error \"Seed agents \"${clash.name ?? clash.agentId}\" and \"${entry.name ?? entry.agentId}\" both address as \"${entry.ref}\" — give them names that differ by more than case, spacing or punctuation\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/instance-ai/src/tools/orchestration/agent-target-binding.ts:142 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}