{"record":{"id":"defa61c2ec4d8bb2","repo":"deepseek-ai/deepseek-harness","slug":"error-diagnostic-partial","errorCode":null,"errorMessage":"${error}${diagnostic}${partial}","messagePattern":"\\$\\{error\\}\\$\\{diagnostic\\}\\$\\{partial\\}","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/subagent/tool-subagent/src/index.ts","lineNumber":183,"sourceCode":"\ntype ForegroundToolResult = {\n  readonly kind: 'foreground'\n  readonly runId: SubagentRun['id']\n  readonly output: JsonValue[]\n}\n\n/**\n * Collect and release one foreground run without letting disposal replace an\n * independent result failure.\n */\nasync function settleForegroundRun(run: SubagentRun): Promise<ForegroundToolResult> {\n  const [execution] = await Promise.allSettled([\n    run.result.then((result): ForegroundToolResult => {\n      const error = stopReasonError(result)\n      if (error !== undefined) {\n        // The registry converts this throw to isError; partial output is not\n        // success, but the preserved partial answer still reaches the parent.\n        throw new Error(withDiagnosticAndPartialText(error, result))\n      }\n      return {\n        kind: 'foreground',\n        runId: run.id,\n        // Content blocks already cross durable JSON boundaries elsewhere;\n        // the registry performs the authoritative lossless snapshot here.\n        output: result.output as unknown as JsonValue[],\n      }\n    }),\n  ])\n  const [disposal] = await Promise.allSettled([Promise.resolve().then(() => run.dispose())])\n  if (execution.status === 'rejected') {\n    if (disposal.status === 'rejected') {\n      throw new AggregateError(\n        [execution.reason, disposal.reason],\n        `subagent run failed: ${String(execution.reason)}; dispose failed: ${String(disposal.reason)}`,\n      )\n    }","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/subagent/tool-subagent/src/index.ts#L165-L201","documentation":"Error \"${error}${diagnostic}${partial}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/subagent/tool-subagent/src/index.ts:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the error, diagnostic, and partial-output parts of the message and fix the reported subagent failure."],"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"}