{"record":{"id":"ffdc2c5e5094e73e","repo":"paperclipai/paperclip","slug":"native-runner-warm-attachment-runner-exited-runne","errorCode":null,"errorMessage":"native_runner_warm_attachment_runner_exited: runner exited before authority rotation","messagePattern":"native_runner_warm_attachment_runner_exited: runner exited before authority rotation","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/live/runnerd-codex-transport.ts","lineNumber":3588,"sourceCode":"          this.#diagnostic(\n            \"warm runner re-authenticated before authority rotation\",\n          );\n        }\n        return;\n      }\n      if (connectionCount > 1) {\n        throw new Error(\n          `native_runner_warm_attachment_ambiguous: expected one authenticated runner, found ${connectionCount}`,\n        );\n      }\n      if (!reportedReconnectWait) {\n        reportedReconnectWait = true;\n        this.#diagnostic(\n          \"warm runner connection interrupted; waiting for re-authentication before authority rotation\",\n        );\n      }\n      if (await this.#runnerHasExited()) {\n        throw new Error(\n          \"native_runner_warm_attachment_runner_exited: runner exited before authority rotation\",\n        );\n      }\n      await Promise.race([\n        new Promise<void>((resolveWait) => setTimeout(resolveWait, 25)),\n        this.#failureSignal,\n      ]);\n    }\n    throw new Error(\n      `provider_transport_failed: warm runner did not re-authenticate within ${this.options.runnerReconnectGraceMs ?? 5_000}ms`,\n    );\n  }\n\n  async attachRun(input: {\n    runId: string;\n    turnId: string;\n    itemId: string;\n  }): Promise<void> {","sourceCodeStart":3570,"sourceCodeEnd":3606,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/live/runnerd-codex-transport.ts#L3570-L3606","documentation":"While waiting for the warm runner to re-authenticate before authority rotation, the transport periodically checks whether the runner process has exited. If it has, waiting is pointless and this error is thrown, indicating the runner died mid-transition.","triggerScenarios":"#awaitWarmRunnerConnection detects #runnerHasExited() is true during the re-auth wait loop — the runner process crashed or was killed before completing re-authentication.","commonSituations":"Runner OOM-killed or crashing on startup; operator killing the runner process; runner failing authentication and exiting; container restart policies tearing it down.","solutions":["Inspect runner stderr/logs for the crash reason (OOM, panic, auth failure)","Fix the underlying runner crash, then retry the run/rotation","Ensure the runner binary and protocol version match what the transport expects","Increase runner resource limits or fix environment issues causing premature exit"],"exampleFix":"// before\nawait transport.rotateAuthority(); // throws if runner already dead\n// after\nif (await transport.runnerHasExited()) {\n  await transport.restartRunner();\n}\nawait transport.rotateAuthority();","handlingStrategy":"retry","validationCode":"if (await transport.runnerHasExited?.()) throw new Error('runner already exited; restart before rotation');","typeGuard":null,"tryCatchPattern":"try {\n  await transport.rotateAuthority();\n} catch (e) {\n  if (String(e.message).startsWith('native_runner_warm_attachment_runner_exited')) {\n    await collectRunnerCrashLogs();\n    await transport.restartRunner();\n    await transport.rotateAuthority();\n  } else throw e;\n}","preventionTips":["Monitor the runner process (exit events, health checks) continuously","Set adequate memory limits to avoid OOM kills","Check runner liveness before every rotation attempt"],"tags":["codex","native-runner","process-exited","warm-attachment"],"backgroundTag":"process-crashed","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"}