{"record":{"id":"05751ba2326f48f1","repo":"paperclipai/paperclip","slug":"runtime-service-servicename-could-not-start-b","errorCode":null,"errorMessage":"Runtime service \"${serviceName}\" could not start because port ${conflictPort} has a cross-workspace port conflict with ${ownerDescription}; requested workspace: ${serviceCwd}. Stop the other service or configure a different port.","messagePattern":"Runtime service \"(.+?)\" could not start because port (.+?) has a cross-workspace port conflict with (.+?); requested workspace: (.+?)\\. Stop the other service or configure a different port\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/workspace-runtime.ts","lineNumber":5795,"sourceCode":"  // range instead, and both ports in that pair were already probed free before\n  // the lease was taken — so checking the pinned port here would reject a\n  // legacy `port: 45439` service purely because the pre-backfill instance still\n  // holds 45439, which is exactly the workspace this feature has to upgrade.\n  const conflictPort = reservedExposure ? null : port;\n  if (conflictPort) {\n    const ownerPid = await readLocalServicePortOwner(conflictPort);\n    if (ownerPid) {\n      if (canAllocateFixedPort || portType === \"auto\") {\n        throw new RuntimeServicePortBindCollision(conflictPort);\n      }\n      const ownerCwd = await readLocalServiceProcessCwd(ownerPid);\n      const ownerIsInWorkspace = ownerCwd\n        ? await isLocalServiceProcessInWorkspace(ownerCwd, serviceCwd)\n        : null;\n      const ownerDescription = ownerCwd ? `pid ${ownerPid} (cwd: ${ownerCwd})` : `pid ${ownerPid} (cwd unavailable)`;\n      releasePortReservation(reservedPort);\n      if (ownerIsInWorkspace === false) {\n        throw new Error(\n          `Runtime service \"${serviceName}\" could not start because port ${conflictPort} has a cross-workspace port conflict with ${ownerDescription}; requested workspace: ${serviceCwd}. Stop the other service or configure a different port.`,\n        );\n      }\n      throw new Error(\n        `Runtime service \"${serviceName}\" could not start because port ${conflictPort} is already in use by ${ownerDescription}`,\n      );\n    }\n    // A configured port that is free right now can still be taken by a sibling workspace that\n    // is mid-start. Claiming it in-process makes the loser fail terminally here instead of\n    // silently racing to bind and then hanging on a readiness probe it can never satisfy.\n    // `conflictPort !== reservedPort` guards the port this start allocated for itself: we\n    // must not fail a start by colliding with our own reservation.\n    if (!claimRuntimeServiceBindPort(conflictPort, reservedPort)) {\n      releasePortReservation(reservedPort);\n      throw new Error(\n        `Runtime service \"${serviceName}\" could not start because configured port ${conflictPort} is already being claimed by another managed start in this instance. Retry once that start settles, or configure a different port.`,\n      );\n    }","sourceCodeStart":5777,"sourceCodeEnd":5813,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/workspace-runtime.ts#L5777-L5813","documentation":"Error \"Runtime service \"${serviceName}\" could not start because port ${conflictPort} has a cross-workspace port conflict with ${ownerDescription}; requested workspace: ${serviceCwd}. Stop the other service or configure a different port.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at server/src/services/workspace-runtime.ts:5483 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Stop the other workspace service that owns the conflicting port, then start this service.","Configure a different port for \"${serviceName}\" to avoid the cross-workspace conflict."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}