coleam00/Archon · error
Multiple bundled workflows declare the name '${name}'
Error message
Multiple bundled workflows declare the name '${name}' What it means
findBundledWorkflow resolves a name against BUNDLED_WORKFLOWS, the in-memory registry of workflows shipped inside the server bundle. It matches either the filename stem or the frontmatter `name:`; if two bundled files both match the requested name it throws instead of picking arbitrarily, keeping resolution deterministic and ambiguity loud.
Source
Thrown at packages/server/src/routes/api.ts:256
const direct = BUNDLED_WORKFLOWS[name];
if (direct !== undefined) {
const filename = `${name}.yaml`;
const parsed = parseWorkflow(direct, filename);
if (parsed.error !== null || parsed.workflow?.name === name) {
return { filename, parsed };
}
}
let match: {
filename: string;
parsed: ReturnType<typeof parseWorkflow>;
} | null = null;
for (const [filenameStem, content] of Object.entries(BUNDLED_WORKFLOWS)) {
if (filenameStem === name) continue;
const filename = `${filenameStem}.yaml`;
const parsed = parseWorkflow(content, filename);
if (parsed.workflow?.name !== name) continue;
if (match !== null) throw new Error(`Multiple bundled workflows declare the name '${name}'`);
match = { filename, parsed };
}
return match;
}
import * as conversationDb from '@archon/core/db/conversations';
import * as codebaseDb from '@archon/core/db/codebases';
import * as envVarDb from '@archon/core/db/env-vars';
import * as isolationEnvDb from '@archon/core/db/isolation-environments';
import * as workflowDb from '@archon/core/db/workflows';
import * as workflowEventDb from '@archon/core/db/workflow-events';
import * as messageDb from '@archon/core/db/messages';
import * as userDb from '@archon/core/db/users';
import {
abandonWorkflow,
approveWorkflow,
rejectWorkflow,
respondToWorkflow,
assertRespondable,View on GitHub (pinned to 0773b97458)
Solutions
- Inspect the BUNDLED_WORKFLOWS generation (owning script in package.json) and give each workflow a unique frontmatter `name:`.
- Regenerate the bundled workflow artifact with its owning script so duplicates from stale builds disappear.
- If a locally added workflow collided with a shipped name, rename yours.
- As a workaround, look the workflow up by its filename stem rather than frontmatter name if that resolves uniquely.
Example fix
// before: two bundled entries // fix-issue.yaml -> name: fix-issue // fix-issue-2.yaml -> name: fix-issue // after // fix-issue-2.yaml -> name: fix-issue-v2
Defensive patterns
Strategy: validation
Validate before calling
const seen = new Map<string, string>();
for (const [stem, content] of Object.entries(BUNDLED_WORKFLOWS)) {
const name = parseWorkflow(content, `${stem}.yaml`).workflow?.name;
if (name && seen.has(name)) throw new Error(`Duplicate bundled name '${name}': ${seen.get(name)} vs ${stem}`);
if (name) seen.set(name, stem);
} Try / catch
try {
const wf = findBundledWorkflow(name);
} catch (e) {
if (/Multiple bundled workflows declare the name/i.test(e?.message ?? '')) {
logError(`Ambiguous bundled workflow '${name}'; regenerate the bundle with unique names.`);
} else throw e;
} Prevention
- Add a uniqueness assertion to the bundled-workflow generation script.
- Regenerate bundle artifacts via their owning script after editing workflows.
- Never hand-edit generated bundled files; rename at the source.
- Cover name uniqueness with a unit test over BUNDLED_WORKFLOWS.
When it happens
Trigger: Calling the /bundled workflow lookup (bundled handler or registerApiRoutes) with a name that two entries in BUNDLED_WORKFLOWS both satisfy — identical frontmatter names, or a stem/frontmatter collision across two generated files.
Common situations: A release/build bug where the bundled-workflow generation script emitted two files with the same frontmatter `name:`; locally added a test workflow to the bundle with a name that clashes with a shipped one; a stale generated artifact duplicating a workflow under a new filename.
Related errors
- Multiple packaged workflows declare the name '${name}'
- Failed to sync repository to ${defaultBranch}. Try /reset or
- Error loading workflows: ${err.message} Hint: Check permissi
- node artifact id collision: distinct producers both map to f
- Ambiguous workflow '${workflowName}'. Did you mean:\n${candi
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/150e7ad3bebef030.
Report an issue: GitHub.