{"record":{"id":"c82c893adc00e8a2","repo":"deepseek-ai/deepseek-harness","slug":"multiple-complete-prompt-sections-are-active-co","errorCode":null,"errorMessage":"multiple complete prompt sections are active: ${completeSections.map(section => JSON.stringify(section.name)).join(', ')}","messagePattern":"multiple complete prompt sections are active: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/system-prompt/src/index.ts","lineNumber":507,"sourceCode":"      ...scopeLayers.flatMap(layer => [...layer.toolProviders.values()]),\n    ]\n    const collected: ToolSchema[] = []\n    const knownNames = new Set<string>()\n    for (const provider of providers) {\n      const result = provider(context)\n      const schemas = result.schemas.map(({ name, description, parameters }): ToolSchema => ({\n        name,\n        description,\n        parameters: structuredClone(parameters),\n      }))\n      const acceptedKnownNames = result.knownNames ?? schemas.map(tool => tool.name)\n      collected.push(...schemas)\n      for (const name of acceptedKnownNames) knownNames.add(name)\n    }\n    const sectionDefinitions = [...sectionByName.values()].sort((a, b) => a.order - b.order)\n    const completeSections = sectionDefinitions.filter(section => section.complete === true)\n    if (completeSections.length > 1) {\n      throw new Error(`multiple complete prompt sections are active: ${completeSections.map(section => JSON.stringify(section.name)).join(', ')}`)\n    }\n    let completeSection: AssembledSection | undefined\n    const sections = sectionDefinitions\n      .map((section) => {\n        const assembled = {\n          name: section.name,\n          text: typeof section.text === 'function' ? section.text(context) : section.text,\n        }\n        if (section.complete === true) completeSection = { ...assembled }\n        return assembled\n      })\n    const assembly: PromptAssembly = {\n      sections,\n      contexts: runtimeContextSuppressed\n        ? []\n        : [...contextByName.values()]\n          .sort((a, b) => a.order - b.order)\n          .map(entry => ({","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/core/system-prompt/src/index.ts#L489-L525","documentation":"Error \"multiple complete prompt sections are active: ${completeSections.map(section => JSON.stringify(section.name)).join(', ')}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/core/system-prompt/src/index.ts:507 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":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}