{"record":{"id":"f01e4f7f66d6d941","repo":"paperclipai/paperclip","slug":"verified-runtime-executable-is-unsupported-on-this","errorCode":null,"errorMessage":"Verified runtime executable is unsupported on this platform","messagePattern":"Verified runtime executable is unsupported on this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/drivers/acpx/verified-runtime-executable.ts","lineNumber":47,"sourceCode":"    throw new Error(\"Verified runtime executable descriptor is invalid\");\n  }\n\n  if (platform === \"darwin\") {\n    if (\n      !isAbsolute(fallback) ||\n      resolve(fallback) !== fallback ||\n      configured !== fallback\n    ) {\n      throw new Error(\"Verified runtime executable path is invalid\");\n    }\n    // The Rust supervisor materializes the authenticated runtime as a private,\n    // read-only executable and starts this process from that exact pathname.\n    // Descendants may inherit the handoff variable, but they cannot nominate a\n    // different absolute path and have it treated as verified.\n    return fallback;\n  }\n\n  throw new Error(\n    \"Verified runtime executable is unsupported on this platform\",\n  );\n}\n\n/**\n * Project the current verified runtime into a chosen child descriptor. The\n * caller must place sourceFd at child targetFd in its stdio table.\n */\nexport function verifiedRuntimeExecutableHandoff(\n  targetFd: number,\n  environment: NodeJS.ProcessEnv = process.env,\n  platform: NodeJS.Platform = process.platform,\n  currentPid: number = process.pid,\n  fallback: string = process.execPath,\n): VerifiedRuntimeExecutableHandoff {\n  if (!Number.isSafeInteger(targetFd) || targetFd < 3) {\n    throw new Error(\"Verified runtime executable target descriptor is invalid\");\n  }","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/drivers/acpx/verified-runtime-executable.ts#L29-L65","documentation":"verifiedRuntimeExecutable() only supports the Linux (/proc/self/fd descriptor) and macOS (exact execPath) verified-handoff schemes. On any other platform, when the handoff env var is set, the function throws this error because no verified-executable recovery scheme exists there.","triggerScenarios":"Running on Windows (or another non-linux/darwin platform) with PAPERCLIP_VERIFIED_RUNTIME_EXECUTABLE set in the environment; a CI matrix executing Linux-specific handoff config on an unsupported OS.","commonSituations":"Windows dev machines inheriting env vars from shared dotfiles/containers; a generic launcher exporting the env var unconditionally across platforms; WSL/Windows boundary leaking the variable.","solutions":["Unset PAPERCLIP_VERIFIED_RUNTIME_EXECUTABLE on unsupported platforms so the fallback execPath is used","Gate env-var export on process.platform being linux or darwin","Run the runner under Linux/macOS when verified-executable handoff is required","Use platform-conditional setup in CI so the variable is only exported on supported OSes"],"exampleFix":"// before\nenv.PAPERCLIP_VERIFIED_RUNTIME_EXECUTABLE = fdPath; // exported everywhere\n// after\nif (process.platform === \"linux\" || process.platform === \"darwin\") {\n  env.PAPERCLIP_VERIFIED_RUNTIME_EXECUTABLE = fdPath;\n}","handlingStrategy":"validation","validationCode":"if (process.env.PAPERCLIP_VERIFIED_RUNTIME_EXECUTABLE !== undefined &&\n    !['linux','darwin'].includes(process.platform)) {\n  delete process.env.PAPERCLIP_VERIFIED_RUNTIME_EXECUTABLE;\n}","typeGuard":"function platformSupportsVerifiedHandoff(p) {\n  return p === \"linux\" || p === \"darwin\";\n}","tryCatchPattern":"try {\n  const exe = verifiedRuntimeExecutable();\n} catch (err) {\n  if (err.message.includes(\"unsupported on this platform\")) {\n    const { [VERIFIED_RUNTIME_EXECUTABLE_ENV]: _omit, ...clean } = process.env;\n    return verifiedRuntimeExecutable(clean);\n  }\n  throw err;\n}","preventionTips":["Export the handoff var only on linux/darwin via platform checks","Scrub cross-platform env leakage in shared dotfiles and CI matrices","Run verified-handoff flows on supported OSes only","Document the platform requirement for operators on Windows"],"tags":["platform","windows","env-var","unsupported"],"backgroundTag":"unsupported-platform","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"}