{"record":{"id":"7e65a4c85557aeae","repo":"paperclipai/paperclip","slug":"reconciled-persisted-runtime-services-from-a-previ","errorCode":null,"errorMessage":"reconciled persisted runtime services from a previous server process","messagePattern":"reconciled persisted runtime services from a previous server process","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/index.ts","lineNumber":963,"sourceCode":"  let startupListenerBound = false;\n  try {\n  setupRunnerPrpWebSocketServer(server, { apiUrl: configuredApiUrl });\n  setupEnvironmentCustomImageTerminalWebSocketServer(server, db as any, {\n    pluginWorkerManager,\n  });\n  setupLiveEventsWebSocketServer(server, db as any, {\n    deploymentMode: config.deploymentMode,\n    resolveSessionFromHeaders,\n    // Cloud-proxied browsers carry trusted x-paperclip-cloud-* headers instead\n    // of a local Better Auth session; without this lane every live-events\n    // upgrade behind the Cloud front door 403s forever. The resolver is\n    // self-gating: it returns null unless PAPERCLIP_CLOUD_TENANT_SERVER_TOKEN\n    // is configured and the request presents the matching trust token, so\n    // self-hosted deployments never take this path.\n    resolveCloudActor: async (req) => {\n      const actor = await resolveCloudTenantActor(\n        db as any,\n        cloudActorHeaderSourceFromHeaders(req.headers),\n      );\n      if (!actor?.userId || !actor.companyIds) return null;\n      return { userId: actor.userId, companyIds: actor.companyIds };\n    },\n  });\n\n  setStartupRecoveryPhase(\"recovering\");\n  // Bind the shared HTTP/PRP listener before native startup recovery. A\n  // runnerd process that survived a controller crash is already reconnecting\n  // to this address; delaying listen until after orphan reconciliation makes\n  // authenticated adoption impossible and turns a healthy process into a\n  // duplicate-provider risk.\n  await new Promise<void>((resolveListen, rejectListen) => {\n    const onError = (err: Error) => {\n      server.off(\"error\", onError);\n      rejectListen(err);\n    };\n    server.once(\"error\", onError);","sourceCodeStart":945,"sourceCodeEnd":981,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/index.ts#L945-L981","documentation":"Startup reconciliation log in startServer. Fires when reconcilePersistedRuntimeServicesOnStartup repaired persisted runtime service state from a previous process (reconciled/restarted/backfilled counts non-zero); services are restored to match DB state.","triggerScenarios":"Thrown at server/src/index.ts:842 when the library encounters an invalid state.","commonSituations":"Logged at startup when runtime service records persisted by a previous server process are reconciled against current reality.","solutions":["Informational only; persisted runtime service records from a previous process were reconciled with actual state.","If services appear stuck, verify the managed runtime processes are actually running and restart them if needed."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}