{"record":{"id":"93f8b893a8439ddc","repo":"deepseek-ai/deepseek-harness","slug":"harness-definetool-task-path-is-circular","errorCode":null,"errorMessage":"harness.defineTool ${task.path} is circular","messagePattern":"harness\\.defineTool (.+?) is circular","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/extensions/cordis-host-runner/src/guard.ts","lineNumber":342,"sourceCode":"  raw: boolean,\n): Record<string, unknown> {\n  const holder: NormalizeRoot = {}\n  const ancestors = new Set<object>()\n  const tasks: NormalizeTask[] = [{\n    kind: 'map',\n    entries,\n    path,\n    requiredNames,\n    raw,\n    destination: { kind: 'root', holder },\n  }]\n  for (let task = tasks.pop(); task !== undefined; task = tasks.pop()) {\n    if (task.kind === 'leave') {\n      ancestors.delete(task.value)\n      continue\n    }\n    if (task.kind === 'map') {\n      if (ancestors.has(task.entries)) throw new Error(`harness.defineTool ${task.path} is circular`)\n      assertSchemaContainerKeys(task.entries, task.path)\n      ancestors.add(task.entries)\n      const spec: Record<string, unknown> = {}\n      assignNormalizedMap(task.destination, spec)\n      tasks.push({ kind: 'leave', value: task.entries })\n      const mapEntries = Object.entries(task.entries)\n      for (let index = mapEntries.length - 1; index >= 0; index--) {\n        const entry = mapEntries[index]\n        /* v8 ignore next -- the loop is bounded by the captured entry count. */\n        if (entry === undefined) continue\n        tasks.push({\n          kind: 'value',\n          value: entry[1],\n          path: `${task.path}.${entry[0]}`,\n          forceRequired: task.requiredNames.has(entry[0]),\n          raw: task.raw,\n          parameterProperty: true,\n          destination: { kind: 'property', target: spec, key: entry[0] },","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/extensions/cordis-host-runner/src/guard.ts#L324-L360","documentation":"Error \"harness.defineTool ${task.path} is circular\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/extensions/cordis-host-runner/src/guard.ts:342 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"}