{"record":{"id":"aaf664cf5f2f6fee","repo":"thedotmack/claude-mem","slug":"codex-cli-version-is-too-old-for-plugin-marketp","errorCode":null,"errorMessage":"Codex CLI ${version} is too old for plugin marketplace support. Update Codex CLI to ${MIN_CODEX_MARKETPLACE_VERSION} or newer, then run: npx claude-mem@latest install","messagePattern":"Codex CLI (.+?) is too old for plugin marketplace support\\. Update Codex CLI to (.+?) or newer, then run: npx claude-mem@latest install","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/services/integrations/CodexCliInstaller.ts","lineNumber":375,"sourceCode":"  const result = codexSpawn(['--version']);\n  const output = `${result.stdout ?? ''}\\n${result.stderr ?? ''}`.trim();\n\n  if (result.error) {\n    throw result.error;\n  }\n  if (result.status !== 0) {\n    console.warn(`  Could not determine Codex CLI version. Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer.${output ? `\\n${output}` : ''}`);\n    return;\n  }\n\n  const version = extractSemver(output);\n  if (!version) {\n    console.warn(`  Could not parse Codex CLI version from \"${output || '<empty>'}\". Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer.`);\n    return;\n  }\n\n  if (version.localeCompare(MIN_CODEX_MARKETPLACE_VERSION, undefined, { numeric: true }) < 0) {\n    throw new Error(`Codex CLI ${version} is too old for plugin marketplace support. Update Codex CLI to ${MIN_CODEX_MARKETPLACE_VERSION} or newer, then run: npx claude-mem@latest install`);\n  }\n}\n\nfunction removeCodexAgentsMdContext(): boolean {\n  if (!existsSync(CODEX_AGENTS_MD_PATH)) return true;\n\n  const startTag = '<claude-mem-context>';\n  const endTag = '</claude-mem-context>';\n\n  try {\n    readAndStripContextTags(startTag, endTag);\n    return true;\n  } catch (error) {\n    const message = error instanceof Error ? error.message : String(error);\n    logger.warn('WORKER', 'Failed to clean AGENTS.md context', { error: message });\n    return false;\n  }\n}","sourceCodeStart":357,"sourceCodeEnd":393,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/integrations/CodexCliInstaller.ts#L357-L393","documentation":"assertCodexMarketplaceSupported() parses the installed Codex CLI's version and compares it against MIN_CODEX_MARKETPLACE_VERSION. If the detected version sorts lower than the minimum, it throws, because plugin marketplace support (marketplace add / plugin install subcommands) does not exist in older Codex releases. An unparseable version only warns and continues.","triggerScenarios":"performCodexInstall() -> assertCodexMarketplaceSupported() runs `codex --version` (or equivalent), parses a version like '0.x.y', and localeCompare(numeric) finds it < MIN_CODEX_MARKETPLACE_VERSION.","commonSituations":"A system-wide codex installed months ago via an old package manager pin; a distro-packaged codex that lags upstream; npx resolving an old cached codex binary; CI images with frozen tool versions.","solutions":["Update the Codex CLI: npm i -g @openai/codex@latest (or the applicable update command) so the version is >= MIN_CODEX_MARKETPLACE_VERSION.","Re-run npx claude-mem@latest install after updating.","If multiple codex binaries exist, ensure the one on PATH (which codex; codex --version) is the updated one."],"exampleFix":"// before\ncodex --version  # 0.20.0 (too old)\nnpx claude-mem@latest install\n// Error: Codex CLI 0.20.0 is too old for plugin marketplace support...\n\n// after\nnpm i -g @openai/codex@latest\ncodex --version  # >= MIN_CODEX_MARKETPLACE_VERSION\nnpx claude-mem@latest install","handlingStrategy":"validation","validationCode":"import { execFileSync } from 'child_process';\nconst out = execFileSync('codex', ['--version'], { encoding: 'utf8' });\nconst version = out.match(/\\d+\\.\\d+\\.\\d+/)?.[0];\nconst MIN = 'MIN_CODEX_MARKETPLACE_VERSION'; // substitute actual constant\nif (version && version.localeCompare(MIN, undefined, { numeric: true }) < 0) {\n  throw new Error(`Update Codex CLI to ${MIN}+ before installing`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin/verify codex >= MIN_CODEX_MARKETPLACE_VERSION in setup scripts and CI images.","Run `codex --version` as a preflight check in install automation.","Avoid frozen package-manager pins that hold codex below the minimum."],"tags":["codex","cli","version","compatibility"],"backgroundTag":"cli-version-unsupported","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}