{"record":{"id":"a38fb969e986afb7","repo":"deepseek-ai/deepseek-harness","slug":"planmodeconfig-has-unknown-key-s-unknown-join","errorCode":null,"errorMessage":"PlanModeConfig has unknown key(s) ${unknown.join(', ')} — config is { section }","messagePattern":"PlanModeConfig has unknown key\\(s\\) (.+?) — config is (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plan/plan-mode/src/index.ts","lineNumber":116,"sourceCode":"\n/**\n * Validate deployment-owned plan guidance. Missing, blank, non-string, or\n * unknown fields fail at plugin load rather than being ignored.\n *\n * @param config Raw plugin config.\n * @returns A detached validated config.\n */\nexport function resolveConfig(config: PlanModeConfig): PlanModeConfig {\n  const section = (config as Partial<PlanModeConfig>).section\n  if (typeof section !== 'string') {\n    throw new Error('PlanModeConfig needs a string `section`')\n  }\n  if (section.trim() === '') {\n    throw new Error('PlanModeConfig needs a non-empty `section`')\n  }\n  const unknown = Object.keys(config).filter(key => key !== 'section')\n  if (unknown.length > 0) {\n    throw new Error(`PlanModeConfig has unknown key(s) ${unknown.join(', ')} — config is { section }`)\n  }\n  return { section }\n}\n\n/**\n * Whether plan mode is active after the first `end` events. The last\n * `plan/mode` wins; a prefix with none is inactive.\n *\n * @param events The session log or any prefix of it.\n * @param end Fold `events[0, end)`; defaults to the whole log.\n * @returns Whether plan mode is active.\n */\nexport function foldPlanMode(events: readonly SessionEvent[], end = events.length): boolean {\n  let active = false\n  let index = 0\n  for (const event of events) {\n    if (index >= end) break\n    index++","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/plan/plan-mode/src/index.ts#L98-L134","documentation":"Error \"PlanModeConfig has unknown key(s) ${unknown.join(', ')} — config is { section }\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/plan/plan-mode/src/index.ts:116 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep only the section key in PlanModeConfig; remove the listed unknown keys."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}