{"record":{"id":"fbf6edd7fc7bfbb9","repo":"paperclipai/paperclip","slug":"paperclip-returned-no-result-while-action","errorCode":null,"errorMessage":"Paperclip returned no result while ${action}.","messagePattern":"Paperclip returned no result while (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/test-drive.ts","lineNumber":93,"sourceCode":"    adapterType: \"opencode_local\",\n    credentialTarget: \"OPENROUTER_API_KEY\",\n    credentialName: \"OpenRouter API Key\",\n  },\n};\n\nconst NON_PAPERCLIP_ISOLATED_ENV_KEYS = [\n  \"DATABASE_URL\",\n  \"DATABASE_MIGRATION_URL\",\n  \"HOST\",\n  \"PORT\",\n  \"SERVE_UI\",\n  \"BETTER_AUTH_URL\",\n  \"BETTER_AUTH_BASE_URL\",\n] as const;\n\nfunction requiredApiResult<T>(value: T | null, action: string): T {\n  if (value === null) {\n    throw new Error(`Paperclip returned no result while ${action}.`);\n  }\n  return value;\n}\n\nfunction errorMessage(error: unknown): string {\n  if (error instanceof Error) return error.message || error.name;\n  if (typeof error === \"string\") return error;\n  try {\n    return JSON.stringify(error);\n  } catch {\n    return String(error);\n  }\n}\n\nexport function redactTestDriveText(text: string, credentials: Array<string | undefined>): string {\n  let redacted = text;\n  for (const credential of credentials) {\n    if (!credential) continue;","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/test-drive.ts#L75-L111","documentation":"Thrown when a PRP run rotation must be performed without an exact authority match and with no warm recovery available, but the local control-plane state needed to rotate the local authority epoch is missing — either there is no local provider or the tracked controlPlaneState is null. The library cannot rotate an authority epoch from nothing, so it throws.","triggerScenarios":"Authority identity differs from the current one (exactAuthority is false), warm recovery is unavailable (null), and either `localProvider` is falsy or `controlPlaneState` is null at the rotation point.","commonSituations":"Restarting a runner against a fresh state file so no prior control-plane state exists; disabling the local provider in configuration while relying on local rotation; corrupted or wiped runner state store losing controlPlaneState.","solutions":["Ensure the local provider is enabled and that control-plane state was loaded before reaching the rotation step.","Use warm recovery (a valid recovery proof/receipt) so the exact-authority path or warm-recovery path can be taken instead of local rotation.","Restore or regenerate the runner's persisted control-plane state so controlPlaneState is non-null at rotation time."],"exampleFix":"// before\n// rotation attempted with no prior state loaded\ncontrolPlaneState = rotateLocalAuthorityEpoch(root, null, desiredIdentity, ...);\n// after\nif (!controlPlaneState) {\n  controlPlaneState = await bootstrapControlPlaneState(root, desiredIdentity);\n}\ncontrolPlaneState = rotateLocalAuthorityEpoch(root, controlPlaneState, desiredIdentity, ...);","handlingStrategy":"validation","validationCode":"const canRotateLocally = Boolean(localProvider) && controlPlaneState !== null;\nif (!exactAuthority && warmRecovery === null && !canRotateLocally) {\n  throw new Error(\"cannot rotate authority: no local state and no warm recovery\");\n}","typeGuard":"function canRotate(cpState: unknown, hasLocalProvider: boolean): boolean {\n  return hasLocalProvider && cpState !== null && typeof cpState === \"object\";\n}","tryCatchPattern":"try {\n  await transport.start(params);\n} catch (e) {\n  if (e.message === \"native_runner_prp_run_rotation_unavailable\") {\n    // bootstrap control-plane state, then retry\n    await bootstrapControlPlaneState(root, desiredIdentity);\n  }\n}","preventionTips":["Persist and reload control-plane state before enabling rotation paths.","Keep the local provider enabled if you rely on local authority rotation.","Obtain warm-recovery proofs when available instead of relying on cold rotation."],"tags":["runner","state-rotation","configuration"],"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"}