{"record":{"id":"96145e5952030db4","repo":"paperclipai/paperclip","slug":"native-runtime-request-handoff-unavailable","errorCode":"native_runtime_request_handoff_unavailable","errorMessage":"native_runtime_request_handoff_unavailable","messagePattern":"native_runtime_request_handoff_unavailable","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/backends/harness-driver-backend.ts","lineNumber":738,"sourceCode":"      NonNullable<HarnessSession[\"resolveRuntimeRequest\"]>\n    >[0][\"resolution\"];\n  }) {\n    this.#assertProtocolIntegrity();\n    if (this.#session.resolveRuntimeRequest === undefined) {\n      throw new Error(\"native_runtime_request_resolution_unavailable\");\n    }\n    return this.#withProtocolIntegrity(() => this.#session.resolveRuntimeRequest!(input));\n  }\n\n  handoffRuntimeRequest(input: {\n    requestId: string;\n    turnId: string;\n    reason: \"durable_handoff\";\n    signal: AbortSignal;\n  }) {\n    this.#assertProtocolIntegrity();\n    if (this.#session.handoffRuntimeRequest === undefined) {\n      throw new Error(\"native_runtime_request_handoff_unavailable\");\n    }\n    return this.#session.handoffRuntimeRequest(input);\n  }\n\n  goal(input: Parameters<NonNullable<HarnessSession[\"goal\"]>>[0]) {\n    this.#assertProtocolIntegrity();\n    if (this.#session.goal === undefined) {\n      throw new Error(\"native_session_goal_unavailable\");\n    }\n    return this.#withProtocolIntegrity(() => this.#session.goal!(input));\n  }\n\n  async result() {\n    this.#assertProtocolIntegrity();\n    if (this.#explicitlyCancelled) return null;\n    const snapshot = await this.#harnessSnapshot();\n    if (\n      snapshot.semanticResult === undefined ||","sourceCodeStart":720,"sourceCodeEnd":756,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/backends/harness-driver-backend.ts#L720-L756","documentation":"handoffRuntimeRequest delegates a durable handoff of an outstanding runtime request to the HarnessSession's optional handoffRuntimeRequest capability. When the driver does not implement it, the backend throws native_runtime_request_handoff_unavailable: the session cannot transfer the pending request to another run/session.","triggerScenarios":"Calling handoffRuntimeRequest({ requestId, reason: 'durable_handoff', ... }) on a session whose driver lacks handoffRuntimeRequest; attempting durable handoff across a driver restart boundary on a driver without handoff support.","commonSituations":"Migrating a pending permission/input request to a new run after a crash or deploy on a driver that predates handoff support; adapters where handoff is intentionally not implemented (session-bound requests).","solutions":["Upgrade the driver to a version implementing handoffRuntimeRequest","Re-issue the request fresh in the new run instead of handing off the old one","Expire/cancel the pending request and let the new run raise its own","Feature-detect handoff support before attempting a durable handoff"],"exampleFix":"// before\nawait backend.handoffRuntimeRequest({ requestId, turnId, reason: 'durable_handoff', signal });\n// after\nif (!backend.canHandoffRuntimeRequests()) {\n  await backend.resolveRuntimeRequest({ requestId, resolution: { kind: 'cancel' } }).catch(() => {});\n} else {\n  await backend.handoffRuntimeRequest({ requestId, turnId, reason: 'durable_handoff', signal });\n}","handlingStrategy":"try-catch","validationCode":"if (typeof session.handoffRuntimeRequest !== 'function') planRequestReissueInstead();","typeGuard":"const canHandoff = (s: HarnessSession): s is HarnessSession & { handoffRuntimeRequest: NonNullable<HarnessSession['handoffRuntimeRequest']> } => typeof s.handoffRuntimeRequest === 'function';","tryCatchPattern":"try { await backend.handoffRuntimeRequest({ requestId, turnId, reason: 'durable_handoff', signal }); } catch (e) { if (e.message === 'native_runtime_request_handoff_unavailable') { await reissueRequestInNewRun(requestId); } else throw e; }","preventionTips":["Feature-detect handoff before durable migrations","Cancel and re-raise requests when handoff is unsupported","Test handoff paths on driver upgrades"],"tags":["runtime-request","handoff","capability-missing"],"backgroundTag":"unsupported-operation","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"}