{"record":{"id":"f7bf185ccde3778c","repo":"paperclipai/paperclip","slug":"native-runner-warm-transition-activation-pending","errorCode":null,"errorMessage":"native_runner_warm_transition_activation_pending","messagePattern":"native_runner_warm_transition_activation_pending","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/live/runnerd-codex-transport.ts","lineNumber":3685,"sourceCode":"        void registration.failure.catch((error: unknown) => {\n          this.#failTransport(\n            error instanceof Error ? error : new Error(String(error)),\n          );\n        });\n      }\n      await this.#awaitRegistrationReady(registration?.ready);\n      const activationDeadline =\n        Date.now() + (this.options.runnerReconnectGraceMs ?? 5_000);\n      while (\n        !recoveryIdentityMatches(core.store.state.identity, desired) ||\n        core.store.state.warmTransition !== undefined ||\n        core.activeRunnerConnectionCount() === 0\n      ) {\n        if (\n          Date.now() >= activationDeadline ||\n          (await this.#runnerHasExited())\n        ) {\n          throw new Error(\"native_runner_warm_transition_activation_pending\");\n        }\n        await new Promise<void>((resolveWait) => setTimeout(resolveWait, 10));\n      }\n      this.#eventIdentity = structuredClone(desired);\n      this.#eventSourceSeq = 0;\n      this.#deferredTurnStartEvents = [];\n      this.#durableTurnId = desired.turnId;\n      await previousRelease?.();\n      previousReleased = true;\n      this.#controlPlaneRelease = registration?.release ?? null;\n    } catch (error) {\n      const failure = error instanceof Error ? error : new Error(String(error));\n      // The future route is ours from registration onward, including failures\n      // in template construction, capability admission, and result waiting.\n      // Keep the prior release owned by close until its handoff is confirmed.\n      this.#controlPlaneRelease = previousReleased ? null : previousRelease;\n      await Promise.resolve()\n        .then(() => registration?.release())","sourceCodeStart":3667,"sourceCodeEnd":3703,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/live/runnerd-codex-transport.ts#L3667-L3703","documentation":"After issuing the run rotation, the transport waits for the activation phase — the runner to be attached/activated with zero pending connections — polling every 10ms until activationDeadline. If the deadline expires or the runner exits first, activation never happened and this error is thrown.","triggerScenarios":"During attachRun's activation loop: Date.now() >= activationDeadline or #runnerHasExited() is true while core state still shows the transition incomplete / zero active runner connections.","commonSituations":"Runner too slow to complete activation within the deadline; runner crashed mid-activation; overloaded machine making the 10ms-poll window's deadline too tight.","solutions":["Check runner logs for a crash or error during activation","Increase the activation deadline if activation is merely slow","Restart the runner and retry the attach","Verify no deadlock between the transport and runner command queue"],"exampleFix":"// before\nawait transport.attachRun(input); // tight activation deadline\n// after\ntry {\n  await transport.attachRun(input);\n} catch (e) {\n  if (e.message === 'native_runner_warm_transition_activation_pending') {\n    await restartRunnerAndReattach(input);\n  } else throw e;\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await transport.attachRun(input);\n} catch (e) {\n  if (e.message === 'native_runner_warm_transition_activation_pending') {\n    if (await transport.runnerHasExited?.()) {\n      await transport.restartRunner();\n    }\n    await backoffRetry(() => transport.attachRun(input), { attempts: 2 });\n  } else throw e;\n}","preventionTips":["Confirm the runner is healthy and responsive before starting attach","Allow generous activation deadlines on slow or loaded hosts","Watch for runner exit events during transitions and restart promptly"],"tags":["codex","native-runner","activation","warm-transition"],"backgroundTag":"invalid-state-transition","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"}