{"record":{"id":"c7dc4dc639f18fc1","repo":"paperclipai/paperclip","slug":"opencode-version-is-not-the-question-conformanc","errorCode":null,"errorMessage":"OpenCode ${version} is not the question-conformance-qualified ${QUALIFIED_OPENCODE_VERSION}","messagePattern":"OpenCode (.+?) is not the question-conformance-qualified (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/drivers/opencode/opencode-server-driver.ts","lineNumber":2024,"sourceCode":"      });\n    const baseUrl = `http://127.0.0.1:${port}`;\n    const health = await waitForHealth(\n      baseUrl,\n      authHeader,\n      input.options.fetch ?? globalThis.fetch,\n      child,\n      () => diagnostics,\n      input.trace,\n    );\n    const version = text(record(health).version);\n    if (!/^\\d+\\.\\d+\\.\\d+$/.test(version))\n      throw new Error(\"OpenCode health response omitted a semantic version\");\n    const qualifiedComparison = compareVersion(\n      version,\n      QUALIFIED_OPENCODE_VERSION,\n    );\n    if (qualifiedComparison !== 0) {\n      throw new Error(\n        `OpenCode ${version} is not the question-conformance-qualified ${QUALIFIED_OPENCODE_VERSION}`,\n      );\n    }\n    return {\n      baseUrl,\n      authHeader,\n      version,\n      permissionMode: input.options.permissionMode ?? \"allow\",\n      process: child,\n      bridge,\n      trace: input.trace,\n      sensitiveValues: [\n        password,\n        input.options.environment?.OPENROUTER_API_KEY,\n      ].filter((value): value is string => Boolean(value)),\n      close: async (closeInput = {}) => {\n        await bridge.close().catch(() => {});\n        if (child.exitCode === null && child.signalCode === null && child.pid) {","sourceCodeStart":2006,"sourceCodeEnd":2042,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/drivers/opencode/opencode-server-driver.ts#L2006-L2042","documentation":"Thrown when the OpenCode server's reported version is valid semver but does not exactly equal QUALIFIED_OPENCODE_VERSION. The driver is qualified (question-conformance tested) against one specific version and refuses any other, whether newer or older.","triggerScenarios":"compareVersion(version, QUALIFIED_OPENCODE_VERSION) returns non-zero — any install of OpenCode other than the pinned qualified version, including patch-level differences.","commonSituations":"npm/pnpm auto-upgraded OpenCode; CI image pinned a different version than the driver expects; developer locally runs a newer OpenCode than the qualified constant; the qualified constant was bumped without updating the installed binary.","solutions":["Install exactly the qualified OpenCode version the driver expects (read QUALIFIED_OPENCODE_VERSION in opencode-server-driver.ts) — e.g. pin it in package.json or the install script.","Check that PATH resolves the intended opencode binary (which opencode) rather than a globally installed different version.","If you intentionally upgraded, bump QUALIFIED_OPENCODE_VERSION only after re-running the question-conformance qualification.","In CI, pin the OpenCode version in the Docker image / setup step to match the driver constant."],"exampleFix":"// before\nnpm install -g opencode-ai@latest\n\n// after\nnpm install -g opencode-ai@1.2.3 // exact QUALIFIED_OPENCODE_VERSION","handlingStrategy":"validation","validationCode":"const { version } = await (await fetch(`${baseUrl}/health`)).json();\nif (version !== QUALIFIED_OPENCODE_VERSION) throw new Error(`Pin opencode to ${QUALIFIED_OPENCODE_VERSION}, found ${version}`);","typeGuard":null,"tryCatchPattern":"try {\n  await startDriver();\n} catch (e) {\n  if (e instanceof Error && /is not the question-conformance-qualified/.test(e.message)) {\n    // message contains both versions — install the qualified one and retry\n  }\n}","preventionTips":["Pin the OpenCode package to the exact qualified version in package.json and CI images","Never use @latest for OpenCode installs","After bumping QUALIFIED_OPENCODE_VERSION, update all install pins"],"tags":["version-check","pinning","compatibility","health-check"],"backgroundTag":"incompatible-source-type","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"}