{"record":{"id":"483b60cb339f1c4c","repo":"coleam00/Archon","slug":"unknown-run-config-key-key","errorCode":null,"errorMessage":"Unknown run config key '${key}'.","messagePattern":"Unknown run config key '(.+?)'\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/config/run-config.ts","lineNumber":181,"sourceCode":"    ...(layer.assistants === undefined ? {} : { assistants }),\n    ...(layer.tiers === undefined ? {} : { tiers }),\n    ...(layer.aliases === undefined ? {} : { aliases }),\n  };\n}\n\n/** Parse one explicitly selected sparse run config. Unlike shared config loading, this is fail-fast. */\nexport function parseWorkflowRunConfig(\n  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');","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/config/run-config.ts#L163-L199","documentation":"parseWorkflowRunConfig() only accepts known run config keys, checked against keyClassifications. Any unrecognized top-level key is rejected so typos and stale keys fail loudly instead of being silently ignored.","triggerScenarios":"Passing a run config document with a top-level key not in the ConfigKey set (typo like 'asistant', renamed key, leftover from an older version).","commonSituations":"Typo in a run config YAML file; following outdated docs or an example from an older release; copy-pasting keys from a different config surface.","solutions":["Fix or remove the unknown key in the run config","Check the current run config key list in the docs for the exact spelling","If migrating from an older version, replace deprecated keys with their current names"],"exampleFix":"// before\nasistant: claude\n// after\nassistant: claude","handlingStrategy":"validation","validationCode":"const KNOWN_KEYS = new Set(['assistant','defaultAssistant','docs','assistants']); function assertKnownKeys(doc) { for (const k of Object.keys(doc)) if (!KNOWN_KEYS.has(k)) throw new Error(`Unknown run config key '${k}'`); }","typeGuard":"function hasOnlyKnownKeys(v, known) { return typeof v === 'object' && v !== null && Object.keys(v).every(k => known.has(k)); }","tryCatchPattern":"try { cfg = parseWorkflowRunConfig(doc, source); } catch (e) { const m = String(e.message).match(/Unknown run config key '(\\S+)'/); if (m) console.error(`Remove or rename key: ${m[1]}`); throw e; }","preventionTips":["Keep a current list of valid run config keys handy or generate one from the schema","Run config files through schema validation (zod/JSON schema) before loading","Watch for renames between Archon versions when upgrading"],"tags":["config","validation","typo"],"backgroundTag":"unknown-config-key","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}