{"record":{"id":"48468da7bdf16765","repo":"paperclipai/paperclip","slug":"native-runner-authority-rotation-seed-unavailable","errorCode":"native_runner_authority_rotation_seed_unavailable","errorMessage":"native_runner_authority_rotation_seed_unavailable","messagePattern":"native_runner_authority_rotation_seed_unavailable","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/live/runnerd-codex-transport.ts","lineNumber":437,"sourceCode":"  const commands = Array.isArray(state.commands)\n    ? state.commands.map(record)\n    : [];\n  const persistedTemplate =\n    state.runAttachTemplate !== null &&\n    typeof state.runAttachTemplate === \"object\" &&\n    !Array.isArray(state.runAttachTemplate)\n      ? (state.runAttachTemplate as Record<string, unknown>)\n      : null;\n  const commandSeed = [...commands]\n    .reverse()\n    .find(\n      (command) =>\n        (command.type === \"run.prepare\" || command.type === \"run.attach\") &&\n        record(command.payload).provider !== undefined,\n    );\n  const seed = persistedTemplate ?? record(commandSeed?.payload);\n  if (seed.provider === undefined)\n    throw new Error(\"native_runner_authority_rotation_seed_unavailable\");\n  return retargetRunAttachPayload(\n    seed,\n    desired,\n    authorizedTools,\n    completionContract,\n  );\n}\n\nfunction retargetRunAttachPayload(\n  seedPayload: Record<string, unknown>,\n  desired: DurableRecoveryIdentity,\n  authorizedTools: Record<string, unknown> | null,\n  completionContract:\n    { revision: string; criterionIds: readonly string[] } | undefined,\n): Record<string, unknown> {\n  const payload = structuredClone(seedPayload);\n  const provider = record(payload.provider);\n  if (provider.kind === \"acpx\" || provider.provider === \"acpx\") {","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/live/runnerd-codex-transport.ts#L419-L455","documentation":"rotatedRunAttachPayload needs a seed run-attach/prepare payload (provider configuration) to retarget onto the new epoch. It looks for a persisted template and a command seed; if neither contains a provider field, there is no basis for constructing the rotated attach payload, so it throws this error. Without the seed, the library refuses to fabricate runner configuration.","triggerScenarios":"Calling rotatedRunAttachPayload (via runAttachTemplate) when no persisted template exists and no run.prepare/run.attach command in the seed has a defined provider field — e.g., rotation is attempted before the runner ever persisted its attach configuration.","commonSituations":"Resuming a runner whose initial run.prepare command was never durably recorded; a data root where control-plane state was archived/removed before the template was written; invoking authority rotation on a freshly created session with no prior attach command; truncation or corruption of the command log.","solutions":["Ensure a run.prepare/run.attach command with a provider payload was recorded before attempting rotation","Restore the persisted template or command seed from backup or from the archived control-plane state","Re-create the runner session from scratch if no durable seed ever existed (rotation is not applicable)","Verify the command-log filter conditions (type run.prepare/run.attach, provider defined) are not excluding your stored commands due to version changes"],"exampleFix":"// before\nconst payload = rotatedRunAttachPayload(...); // throws when no seed provider\n// after\nconst seed = findRunAttachSeed(commands);\nif (!seed || seed.payload.provider === undefined) {\n  throw new SkipRotationError(\"no attach seed; resume without epoch rotation\");\n}\nconst payload = rotatedRunAttachPayload(...);","handlingStrategy":"validation","validationCode":"const seed = persistedTemplate ?? record(commandSeed?.payload);\nif (seed?.provider === undefined) {\n  throw new Error(\"no run.prepare/run.attach seed with provider persisted; rotation unavailable\");\n}","typeGuard":"const hasAttachSeed = (cmd?: { type: string; payload: unknown }) =>\n  cmd != null && (cmd.type === \"run.prepare\" || cmd.type === \"run.attach\") &&\n  typeof cmd.payload === \"object\" && cmd.payload !== null &&\n  (cmd.payload as Record<string, unknown>).provider !== undefined;","tryCatchPattern":"try {\n  payload = rotatedRunAttachPayload(...);\n} catch (err) {\n  if ((err as Error).message === \"native_runner_authority_rotation_seed_unavailable\") {\n    return resumeWithoutRotation(); // re-create session instead\n  } else throw err;\n}","preventionTips":["Ensure run.prepare/run.attach commands are durably recorded before enabling rotation","Back up the persisted template alongside control-plane state","Do not archive/remove command logs before rotation completes"],"tags":["seed","configuration","state-rotation"],"backgroundTag":"missing-config-value","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}