{"record":{"id":"1304f74ff0f8cf04","repo":"paperclipai/paperclip","slug":"runnerd-exited-before-provider-startup","errorCode":null,"errorMessage":"runnerd exited before provider startup","messagePattern":"runnerd exited before provider startup","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/live/runnerd-codex-transport.ts","lineNumber":5529,"sourceCode":"\n  async #waitForProviderIdentity(\n    expectedEventType?: \"harness.ready\" | \"session.started\" | \"session.resumed\",\n  ): Promise<void> {\n    const deadline = Date.now() + 30_000;\n    while (Date.now() < deadline) {\n      this.#throwIfFailed();\n      this.#pumpEvents();\n      if (\n        this.#threadId.length > 0 &&\n        (this.#checkpointProviderIdentityExpectation !== null ||\n          this.#evidence.providerExecutionKind === \"remote_service\" ||\n          this.#evidence.providerPid !== null) &&\n        (expectedEventType === undefined ||\n          this.#providerIdentityEventType === expectedEventType)\n      )\n        return;\n      if (await this.#runnerHasExited())\n        throw new Error(\"runnerd exited before provider startup\");\n      await new Promise((resolveWait) => setTimeout(resolveWait, 10));\n    }\n    throw new Error(\"runnerd did not report its provider identity\");\n  }\n\n  async #waitCommand(\n    type: string,\n    commandId?: string,\n    deadline = Date.now() + 30_000,\n  ): Promise<void> {\n    while (Date.now() < deadline) {\n      this.#throwIfFailed();\n      const command =\n        commandId === undefined\n          ? this.#core?.store.state.commands.find(\n              (candidate) => candidate.type === type,\n            )\n          : this.#core?.getCommand(commandId);","sourceCodeStart":5511,"sourceCodeEnd":5547,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/live/runnerd-codex-transport.ts#L5511-L5547","documentation":"Thrown from the provider-identity wait loop while polling for runnerd's provider identity evidence. On each 10ms iteration, after checking (and not yet finding) the expected provider identity event, the loop asks `#runnerHasExited()`; if the runnerd process has terminated before publishing its identity, this error is thrown instead of spinning until the deadline.","triggerScenarios":"Waiting for provider startup (optionally for a specific `expectedEventType`) when the runnerd process dies — crash on launch, bad runnerd binary, missing runtime dependencies, or an explicit kill — before it emits the provider identity evidence with a non-null `providerPid`.","commonSituations":"runnerd binary incompatible with the host OS/arch; missing codex runtime on the runner host; OOM or port conflict killing runnerd during startup; operator stopping the runner while a turn was being admitted.","solutions":["Run runnerd manually on the host to see its launch error (missing binary, bad flags, missing runtime).","Check runnerd stderr/stdout captured by the transport for the crash reason.","Verify the runnerd binary and codex runtime are installed and executable on the target platform.","Restart the runner and retry; if startup consistently crashes, pin a known-good runnerd version."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const alive = await runnerHasExited();\nif (alive) throw new Error(\"runnerd is not running; start it before admitting turns\");","typeGuard":null,"tryCatchPattern":"try {\n  await transport.waitForProviderStartup();\n} catch (err) {\n  if (err.message.includes(\"exited before provider startup\")) {\n    await supervisor.restartRunnerd();\n  } else throw err;\n}","preventionTips":["Health-check the runnerd binary and runtime before launch.","Capture and ship runnerd stderr to logs for crash diagnosis.","Run the supported OS/arch for the runnerd build."],"tags":["runnerd","process-crash","startup","ipc"],"backgroundTag":"connection-refused","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}