{"record":{"id":"7714aef467b67c59","repo":"coleam00/Archon","slug":"run-config-cannot-set-both-assistant-and-defaul","errorCode":null,"errorMessage":"Run config cannot set both 'assistant' and 'defaultAssistant'; use one spelling.","messagePattern":"Run config cannot set both 'assistant' and 'defaultAssistant'; use one spelling\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/config/run-config.ts","lineNumber":189,"sourceCode":"  value: unknown,\n  source: WorkflowRunConfigSource\n): WorkflowRunConfigInput {\n  if (!isRecord(value)) {\n    throw new Error(\"Invalid run config at 'document': expected an object\");\n  }\n\n  for (const key of Object.keys(value)) {\n    const classification = keyClassifications[key as ConfigKey] as KeyClassification | undefined;\n    if (!classification) {\n      throw new Error(`Unknown run config key '${key}'.`);\n    }\n    if (classification.kind === 'unavailable') {\n      throw new Error(`Run config key '${key}' cannot apply: ${classification.reason}.`);\n    }\n  }\n\n  if (value.assistant !== undefined && value.defaultAssistant !== undefined) {\n    throw new Error(\n      \"Run config cannot set both 'assistant' and 'defaultAssistant'; use one spelling.\"\n    );\n  }\n\n  const docs = value.docs;\n  if (docs !== undefined) {\n    if (!isRecord(docs)) {\n      throw new Error(\"Invalid run config at 'docs': expected an object\");\n    }\n    const unknownDocsKey = Object.keys(docs).find(key => key !== 'path');\n    if (unknownDocsKey) {\n      throw new Error(`Unknown run config key 'docs.${unknownDocsKey}'.`);\n    }\n  }\n\n  const candidate = {\n    ...(value.assistant !== undefined || value.defaultAssistant !== undefined\n      ? { assistant: value.assistant ?? value.defaultAssistant }","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/config/run-config.ts#L171-L207","documentation":"'assistant' and 'defaultAssistant' are two spellings of the same setting; setting both is ambiguous, so parseWorkflowRunConfig() rejects the document rather than guessing precedence.","triggerScenarios":"Passing a run config document where both value.assistant and value.defaultAssistant are defined.","commonSituations":"Merging two config files or layers that each use a different spelling; hand-editing a config that already had one spelling and adding the other.","solutions":["Delete one of the two keys, keeping the value you want","Standardize on one spelling ('assistant') across all configs","Check for duplicated settings when merging config layers"],"exampleFix":"// before\nassistant: claude\ndefaultAssistant: codex\n// after\nassistant: claude","handlingStrategy":"validation","validationCode":"function assertSingleAssistantSpelling(doc) { if (doc.assistant !== undefined && doc.defaultAssistant !== undefined) throw new Error(\"Set only one of 'assistant' or 'defaultAssistant'\"); }","typeGuard":"function hasConflictingAssistantKeys(v) { return typeof v === 'object' && v !== null && v.assistant !== undefined && v.defaultAssistant !== undefined; }","tryCatchPattern":"try { cfg = parseWorkflowRunConfig(doc, source); } catch (e) { if (String(e.message).includes(\"'assistant' and 'defaultAssistant'\")) console.error('Keep only one assistant spelling in the config'); throw e; }","preventionTips":["Standardize on one spelling across all configs and templates","Deduplicate merged config layers before loading","Grep configs for both spellings in CI"],"tags":["config","validation","ambiguity"],"backgroundTag":"conflicting-config-values","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}