{"record":{"id":"ed431c4f5559fc8e","repo":"deepseek-ai/deepseek-harness","slug":"subagent-unauthorized","errorCode":"subagent-unauthorized","errorMessage":"subagent does not belong to this parent","messagePattern":"subagent does not belong to this parent","errorType":"error_code","errorClass":"SubagentError","httpStatus":null,"severity":"error","filePath":"packages/host/apiproxy/src/api-proxy.ts","lineNumber":861,"sourceCode":"function subagentPromptError(\n  request: RpcRequest<{ childSessionId: SessionId }>,\n  error: unknown,\n  signal: AbortSignal,\n): RpcResponse<never> {\n  const childSessionId = request.payload.childSessionId\n  if (signal.aborted) {\n    return err(request, { code: 'cancelled', message: 'subagent prompt was cancelled', details: {} })\n  }\n  if (error instanceof SubagentError) {\n    switch (error.code) {\n      case 'NOT_RESUMABLE':\n        return err(request, {\n          code: 'subagent-not-resumable',\n          message: 'subagent cannot be resumed',\n          details: { childSessionId },\n        })\n      case 'UNAUTHORIZED':\n        return err(request, {\n          code: 'subagent-unauthorized',\n          message: 'subagent does not belong to this parent',\n          details: { childSessionId },\n        })\n      case 'DRAINING':\n      case 'ACTIVATION_CLOSING':\n      case 'CONTINUATION_UNAVAILABLE':\n      case 'PERSISTENCE_UNAVAILABLE':\n        return err(request, {\n          code: 'subagent-delivery-unavailable',\n          message: 'subagent follow-up is temporarily unavailable',\n          details: { childSessionId },\n        })\n      default:\n        break\n    }\n  }\n  return err(request, { code: 'internal', message: 'subagent prompt failed', details: {} })","sourceCodeStart":843,"sourceCodeEnd":879,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/host/apiproxy/src/api-proxy.ts#L843-L879","documentation":"Error \"subagent does not belong to this parent\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/host/apiproxy/src/api-proxy.ts:861 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send the follow-up through the parent that spawned the subagent."],"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"}