{"record":{"id":"c82d2424a65b6e2d","repo":"deepseek-ai/deepseek-harness","slug":"harness-definetool-path-oneof-must-contain-at-l","errorCode":null,"errorMessage":"harness.defineTool ${path}.oneOf must contain at least two schemas","messagePattern":"harness\\.defineTool (.+?)\\.oneOf must contain at least two schemas","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/guard.ts","lineNumber":389,"sourceCode":"    if (ancestors.has(value)) throw new Error(`harness.defineTool ${path} is circular`)\n    ancestors.add(value)\n    const requiredKey = task.parameterProperty && !task.raw ? ['required'] : []\n    if (task.parameterProperty && task.raw && Object.hasOwn(value, 'required') && value.type !== 'object') {\n      throw new Error(`harness.defineTool ${path}.required belongs to the containing raw object schema`)\n    }\n    if (task.parameterProperty && !task.raw && Object.hasOwn(value, 'required') && value.required !== true) {\n      throw new Error(`harness.defineTool ${path}.required must be true when present`)\n    }\n    const prop: Record<string, unknown> = {}\n    assignNormalizedValue(task.destination, prop)\n    tasks.push({ kind: 'leave', value })\n    if (task.forceRequired || value.required === true) prop.required = true\n    copyAnnotations(value, prop, path)\n\n    if (Object.hasOwn(value, 'oneOf')) {\n      assertSchemaKeys(value, path, ['oneOf', ...requiredKey, ...ANNOTATION_KEYS])\n      if (!isDensePlainArray(value.oneOf) || value.oneOf.length < 2) {\n        throw new Error(`harness.defineTool ${path}.oneOf must contain at least two schemas`)\n      }\n      const oneOf: Record<string, unknown>[] = []\n      prop.oneOf = oneOf\n      for (let index = value.oneOf.length - 1; index >= 0; index--) {\n        tasks.push({\n          kind: 'value',\n          value: value.oneOf[index],\n          path: `${path}.oneOf[${index}]`,\n          forceRequired: false,\n          raw: task.raw,\n          parameterProperty: false,\n          destination: { kind: 'one-of', target: oneOf, index },\n        })\n      }\n      continue\n    }\n\n    if (task.raw && !Object.hasOwn(value, 'type')) {","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/guard.ts#L371-L407","documentation":"Error \"harness.defineTool ${path}.oneOf must contain at least two schemas\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/guard.ts:389 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"}