{"record":{"id":"2ef7d7c55c3fe985","repo":"affaan-m/ECC","slug":"unsupported-codex-version-versionmatch-1-tool","errorCode":null,"errorMessage":"unsupported Codex version ${versionMatch[1]}; tool-less review requires exactly ${SUPPORTED_CODEX_VERSION}","messagePattern":"unsupported Codex version (.+?); tool-less review requires exactly (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"skills/council-multi-model/scripts/review-with-codex.js","lineNumber":145,"sourceCode":"}\n\nfunction verifyToollessSupport(dependencies = {}) {\n  const spawn = dependencies.spawnSync || spawnSync;\n  const options = {\n    cwd: os.tmpdir(),\n    env: buildEnvironment(dependencies.env || process.env),\n    encoding: 'utf8',\n    timeout: 5_000,\n    maxBuffer: 256 * 1024,\n    windowsHide: true,\n  };\n  const versionText = probeCodex(spawn, ['--version'], options, 'version');\n  const versionMatch = versionText.match(/^codex-cli\\s+([^\\s]+)$/m);\n  if (!versionMatch) {\n    throw new Error('Codex version could not be verified for tool-less review');\n  }\n  if (versionMatch[1] !== SUPPORTED_CODEX_VERSION) {\n    throw new Error(\n      `unsupported Codex version ${versionMatch[1]}; `\n      + `tool-less review requires exactly ${SUPPORTED_CODEX_VERSION}`\n    );\n  }\n\n  const featuresText = probeCodex(spawn, ['features', 'list'], options, 'feature');\n  const stages = new Map();\n  for (const line of featuresText.split('\\n')) {\n    const match = line.trim().match(\n      /^(\\S+)\\s+(stable|under development|experimental|deprecated|removed)\\s+(true|false)$/\n    );\n    if (match) stages.set(match[1], match[2]);\n  }\n  const unavailable = REQUIRED_TOOLLESS_FEATURES.filter(\n    (feature) => stages.get(feature) !== 'stable'\n  );\n  if (unavailable.length > 0) {\n    throw new Error(","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/skills/council-multi-model/scripts/review-with-codex.js#L127-L163","documentation":"Thrown by verifyToollessSupport() when the Codex version was parsed successfully but does not equal SUPPORTED_CODEX_VERSION (currently '0.146.0'). The review script pins an exact version because the tool-less safety contract depends on specific feature toggles and CLI behavior; even a minor version drift is treated as unsupported until verified. Both the detected and required versions are printed.","triggerScenarios":"Having any Codex version other than 0.146.0 installed, e.g. 0.145.0, 0.147.0, or a newer release. The check is exact-equality, not a range.","commonSituations":"Auto-updated Codex CLI that moved past the pinned version; a team member on a different version; an older CI image with a stale Codex; downgrading/upgrade mid-stream.","solutions":["Install exactly the pinned version: `codex-cli 0.146.0` (use the project's documented install/pin step).","If you intentionally upgraded, update SUPPORTED_CODEX_VERSION in the script after re-validating the feature set.","Pin Codex in CI (e.g. a specific npm/brew version) so it does not drift."],"exampleFix":"// before: installed 0.147.0\nError: unsupported Codex version 0.147.0; tool-less review requires exactly 0.146.0\n\n// after\n$ npm install -g @openai/codex@0.146.0\n$ codex --version\ncodex-cli 0.146.0","handlingStrategy":"validation","validationCode":"const SUPPORTED_CODEX_VERSION = '0.146.0';\nfunction assertSupportedVersion(detected) {\n  if (detected !== SUPPORTED_CODEX_VERSION) {\n    throw new Error(`unsupported Codex version ${detected}; requires exactly ${SUPPORTED_CODEX_VERSION}`);\n  }\n  return detected;\n}","typeGuard":"function isSupportedCodexVersion(detected, supported) {\n  return typeof detected === 'string' && detected === (supported || '0.146.0');\n}","tryCatchPattern":"try {\n  verifyToollessSupport({ spawnSync });\n} catch (error) {\n  if (/^unsupported Codex version/.test(error.message)) {\n    // install the pinned version, then retry\n  } else {\n    throw error;\n  }\n}","preventionTips":["Pin the Codex CLI to exactly the supported version in CI and local setup.","Treat the version as an exact-match contract; do not assume newer is compatible.","When intentionally upgrading, re-validate the feature set and bump SUPPORTED_CODEX_VERSION."],"tags":["runtime","environment","codex","version","pinning","compatibility"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}