{"record":{"id":"e74e22978e3adab6","repo":"paperclipai/paperclip","slug":"native-provider-is-not-available-through-the-local","errorCode":null,"errorMessage":"Native provider is not available through the local runnerd transport","messagePattern":"Native provider is not available through the local runnerd transport","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/backends/codex-native-backend.ts","lineNumber":95,"sourceCode":"    case \"aws_agentcore\":\n      return {\n        kind: \"aws_agentcore_harness_api\",\n        displayName: \"AWS AgentCore Harness\",\n        version: input.provider.agentCoreProfile.qualificationRevision,\n      };\n    case \"acpx\":\n      if (input.provider.agent === \"pi\") {\n        throw new Error(\n          \"Native ACPX backend for pi is unavailable until descriptor-confined verified launch is implemented\",\n        );\n      }\n      return {\n        kind: \"acpx_runtime\",\n        displayName: `${input.provider.agent === \"claude\" ? \"Claude\" : \"Codex\"} via ACPX`,\n        version: \"0.13.1\",\n      };\n    default:\n      throw new Error(\n        \"Native provider is not available through the local runnerd transport\",\n      );\n  }\n}\n\nfunction createTransportBackedNativeSessionBackend(\n  input: NativeExecutionInput,\n  options: CodexNativeSessionBackendOptions,\n): NativeSessionBackend {\n  if (\n    options.workingDirectoryAuthority === \"remote_runner\" &&\n    !options.transportFactory\n  ) {\n    throw new Error(\n      \"Remote runner workspace authority requires a runnerd transport\",\n    );\n  }\n  const driverIdentity = transportDriverIdentity(input);","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/backends/codex-native-backend.ts#L77-L113","documentation":"transportDriverIdentity's switch has cases only for codex, opencode, claude_managed, aws_agentcore, and acpx provider kinds. Any other provider.kind (including an unknown or unset one, hitting the default branch) throws a plain Error: that native provider kind cannot be served through the local runnerd transport backed by CodexAppServerDriver.","triggerScenarios":"Calling createTransportBackedNativeSessionBackend (or driverIdentity) with input.provider.kind outside the five supported values — e.g. kind is undefined/null, a typo like 'codex-native' or 'Codex', or a newly added provider kind that codex-native-backend has not been extended to handle.","commonSituations":"A missing or malformed provider descriptor so kind falls through as undefined; a new provider kind added to the type union but not to this switch; case-sensitivity mistakes in serialized config; passing a generic/legacy provider object into the native backend factory.","solutions":["Set provider.kind to one of the supported values: 'codex', 'opencode', 'claude_managed', 'aws_agentcore', or 'acpx'.","Fix the provider descriptor source so kind is populated and spelled exactly as in the discriminated union (case-sensitive).","If a new provider kind must be supported, add a case to transportDriverIdentity in codex-native-backend.ts returning its driver identity.","Validate/parse the provider input against the NativeExecutionInput contract before invoking the native backend factory to catch bad kinds early."],"exampleFix":"// before\nconst input = { provider: { kind: undefined, model: \"x\" } }; // hits default branch, throws\n// after\nconst input = { provider: { kind: \"codex\", model: \"x\" } }; // supported kind","handlingStrategy":"type-guard","validationCode":"const SUPPORTED_KINDS = [\"codex\", \"opencode\", \"claude_managed\", \"aws_agentcore\", \"acpx\"];\nfunction isSupportedNativeKind(provider) {\n  return SUPPORTED_KINDS.includes(provider?.kind);\n}\n// before calling:\nif (!isSupportedNativeKind(input.provider)) {\n  throw new Error(`provider.kind must be one of ${SUPPORTED_KINDS.join(\", \")}, got ${JSON.stringify(input.provider?.kind)}`);\n}","typeGuard":"function isNativeExecutionProvider(p) {\n  return p !== null && typeof p === \"object\"\n    && [\"codex\", \"opencode\", \"claude_managed\", \"aws_agentcore\", \"acpx\"].includes(p.kind);\n}","tryCatchPattern":"try {\n  const backend = createTransportBackedNativeSessionBackend(input, options);\n} catch (err) {\n  if (/not available through the local runnerd transport/.test(err.message)) {\n    console.error(`Unsupported provider.kind=${JSON.stringify(input.provider?.kind)}; supported: codex, opencode, claude_managed, aws_agentcore, acpx.`);\n    return null;\n  }\n  throw err;\n}","preventionTips":["Always populate provider.kind with an exact, case-sensitive supported value.","Validate/parse provider descriptors against the NativeExecutionInput discriminated union before invoking the backend.","Watch for typos and casing mistakes like 'Codex' or 'codex_native' that fall into the default branch.","When adding a new provider kind, update transportDriverIdentity's switch in the same change and add a test for it.","Avoid passing legacy/generic provider objects into the native backend factory; construct typed inputs instead."],"tags":["unsupported-provider","runnerd-transport","discriminated-union","default-case"],"backgroundTag":"unsupported-provider-kind","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":"2026-09-02T18:44:00.616Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}