{"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/8321021c54d670126ce3b2969d5deb880b4b0c2a/skills/council-multi-model/scripts/review-with-codex.js#L127-L163","documentation":"The script pins Codex to exactly SUPPORTED_CODEX_VERSION ('0.146.0'). verifyToollessSupport() throws this error when `codex --version` reports any other version, because tool-less review behavior is only guaranteed for that exact release. The message includes the detected version and the required one.","triggerScenarios":"verifyToollessSupport() called by runTests/runReview; `codex --version` outputs a parseable `codex-cli <version>` line where versionMatch[1] !== '0.146.0' — any older or newer installed Codex.","commonSituations":"Automatic global npm updates bumped codex past the pin; CI images ship a different Codex version; a developer has multiple Codex installs and PATH resolves to the wrong one.","solutions":["Install the exact required version: `npm install -g @openai/codex@0.146.0`","Check `which codex` / `codex --version` to make sure PATH resolves to the pinned install","Pin the version in CI (e.g. install step with @0.146.0) to avoid drift","If you intentionally want a different version, update SUPPORTED_CODEX_VERSION in review-with-codex.js after verifying tool-less behavior"],"exampleFix":"// before\n$ codex --version\ncodex-cli 0.158.1   // newer than pin\n// after\nnpm install -g @openai/codex@0.146.0\n$ codex --version\ncodex-cli 0.146.0","handlingStrategy":"validation","validationCode":"const { SUPPORTED_CODEX_VERSION } = require('./review-with-codex');\nconst { execSync } = require('child_process');\nfunction codexVersionMatches() {\n  const out = execSync('codex --version', { encoding: 'utf8' });\n  const m = out.match(/^codex-cli\\s+([^\\s]+)$/m);\n  return m != null && m[1] === SUPPORTED_CODEX_VERSION;\n}","typeGuard":null,"tryCatchPattern":"try {\n  verifyToollessSupport();\n} catch (err) {\n  const m = err.message.match(/unsupported Codex version (\\S+);/);\n  if (m) {\n    console.error(`Install codex-cli 0.146.0 (found ${m[1]}): npm i -g @openai/codex@0.146.0`);\n  } else throw err;\n}","preventionTips":["Pin @openai/codex@0.146.0 in package.json/CI install steps","Disable auto-update for the global Codex install","Check `which codex` when multiple installs exist","Re-check the pin after intentional upgrades"],"tags":["codex","version-mismatch","pinning","cli"],"backgroundTag":"incompatible-source-type","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}