{"record":{"id":"be02216be328243a","repo":"paperclipai/paperclip","slug":"opencode-evals-require-exact-version-1-18-17-rece","errorCode":null,"errorMessage":"OpenCode evals require exact version 1.18.17; received ${version}","messagePattern":"OpenCode evals require exact version 1\\.18\\.17; received (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/cli/eval-session.ts","lineNumber":60,"sourceCode":"      throw new Error(`unknown argument: ${args[index] ?? \"\"}`);\n    }\n    if (args[index + 1] === undefined) throw new Error(`missing ${args[index]}`);\n  }\n  return {\n    requestPath: argument(args, \"--request\"),\n    outputPath: argument(args, \"--output\"),\n  };\n}\n\nasync function sha256(path: string): Promise<string> {\n  return createHash(\"sha256\").update(await readFile(path)).digest(\"hex\");\n}\n\nfunction providerVersion(request: EvalSessionRequest): string | null {\n  if (request.provider === \"opencode\") {\n    const version = request.opencodeVersion ?? \"1.18.17\";\n    if (version !== \"1.18.17\") {\n      throw new Error(`OpenCode evals require exact version 1.18.17; received ${version}`);\n    }\n    return version;\n  }\n  if (request.provider === \"acpx\") {\n    return resolveQualifiedAcpxProfile(\n      request.acpxAgent ?? \"codex\",\n      request.model,\n    ).acpxVersion;\n  }\n  if (request.provider === \"claude_managed\") {\n    return request.managedProfile!.agentVersion;\n  }\n  if (request.provider === \"aws_agentcore\") {\n    return request.agentCoreProfile!.harnessVersion;\n  }\n  return null;\n}\n","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/paperclipai/paperclip/blob/5716fe907e596ce73501408fc6efdb19fb61edf2/packages/paperclip-runner/src/cli/eval-session.ts#L42-L78","documentation":"providerVersion pins OpenCode eval sessions to exactly version 1.18.17. If request.opencodeVersion is set to anything else (or, conceptually, if the default pin ever changes upstream), the eval session refuses to start. This keeps eval artifacts reproducible against a single qualified harness version.","triggerScenarios":"Building an EvalSessionRequest JSON with provider \"opencode\" and opencodeVersion set to any value other than \"1.18.17\" (e.g. \"1.19.0\", \"latest\", \"1.18\"). Omitting the field is fine — it defaults to \"1.18.17\".","commonSituations":"Upgrading opencode locally and updating the request file to match; templating the version from an environment variable or package manager output; hand-editing a request JSON copied from an older/newer eval.","solutions":["Remove opencodeVersion from the request JSON so the built-in pin \"1.18.17\" applies","Set opencodeVersion explicitly to \"1.18.17\" in the request file","If a newer opencode is genuinely required, this is an intentional pin: update the qualified version in packages/paperclip-runner (and its tests) deliberately, not per-request"],"exampleFix":"// before (request JSON)\n{ \"provider\": \"opencode\", \"opencodeVersion\": \"1.19.0\", ... }\n// after\n{ \"provider\": \"opencode\", \"opencodeVersion\": \"1.18.17\", ... }","handlingStrategy":"validation","validationCode":"const REQUIRED_OPENCODE_VERSION = \"1.18.17\";\nfunction assertValidOpencodeRequest(request: { provider?: string; opencodeVersion?: string }): void {\n  if (request.provider === \"opencode\" &&\n      request.opencodeVersion !== undefined &&\n      request.opencodeVersion !== REQUIRED_OPENCODE_VERSION) {\n    throw new Error(\n      `opencodeVersion must be \"${REQUIRED_OPENCODE_VERSION}\" or omitted (got ${request.opencodeVersion})`,\n    );\n  }\n}","typeGuard":"function hasPinnedOpencodeVersion(request: { opencodeVersion?: string }): boolean {\n  return request.opencodeVersion === undefined || request.opencodeVersion === \"1.18.17\";\n}","tryCatchPattern":"try {\n  await runEvalSessionCli(args);\n} catch (error) {\n  if (error instanceof Error && error.message.includes(\"require exact version 1.18.17\")) {\n    console.error(`Unsupported opencode version: ${error.message}. Pin opencodeVersion to \"1.18.17\" or omit it.`);\n    process.exitCode = 1;\n    return;\n  }\n  throw error;\n}","preventionTips":["Omit opencodeVersion from request JSON and let the built-in pin apply","Do not template opencodeVersion from environment variables or lockfiles in eval request generators","When intentionally upgrading the qualified opencode, update the pin in packages/paperclip-runner and regenerate all request fixtures in the same change","Add a schema/Zod validator on the request JSON that rejects non-pinned opencodeVersion values before invoking the CLI"],"tags":["version-pinning","configuration","opencode"],"backgroundTag":"unsupported-version","analyzedSha":"5716fe907e596ce73501408fc6efdb19fb61edf2","analyzedAt":"2026-09-02T18:44:00.616Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}