{"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":"Error","httpStatus":null,"severity":"error","filePath":"src/services/integrations/CodexCliInstaller.ts","lineNumber":326,"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":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d768ba364302d12b76e69e4f021f0bb1d2d50ed6/src/services/integrations/CodexCliInstaller.ts#L308-L344","documentation":"assertCodexMarketplaceSupported() runs `codex --version`, extracts the semver, and compares it against MIN_CODEX_MARKETPLACE_VERSION (0.128.0) using localeCompare with numeric ordering. If the installed Codex CLI is older, it throws because plugin-marketplace support did not exist in that version. Unparseable or undeterminable versions only warn and continue; only an explicit too-old version throws.","triggerScenarios":"The Codex CLI on PATH reports a version strictly less than 0.128.0 (e.g. 0.120.0). The installer is about to register/use the plugin marketplace feature, which requires the newer codex.","commonSituations":"An old Codex CLI is installed and on PATH; a package manager pinned codex to an older release; the user upgraded claude-mem but not codex; multiple codex binaries and the older one resolves first on PATH.","solutions":["Update Codex CLI to 0.128.0 or newer using its official install/upgrade path.","Verify the resolved version with `codex --version` and, if multiple are installed, adjust PATH so the newer one wins.","Re-run `npx claude-mem@latest install` after the upgrade."],"exampleFix":"# before\ncodex --version   # codex 0.120.0\nnpx claude-mem@latest install --codex  # throws\n\n# after — upgrade codex, then reinstall\n# (use codex's official upgrade command)\ncodex --version   # codex 0.128.0\nnpx claude-mem@latest install --codex","handlingStrategy":"validation","validationCode":"import { execFileSync } from 'child_process';\n\nconst MIN = '0.128.0';\nfunction codexVersionSupported(): boolean {\n  try {\n    const out = execFileSync('codex', ['--version'], { encoding: 'utf-8' });\n    const v = out.match(/\\d+\\.\\d+\\.\\d+/)?.[0];\n    return !!v && v.localeCompare(MIN, undefined, { numeric: true }) >= 0;\n  } catch { return false; }\n}","typeGuard":"function isCodexTooOld(e: unknown): boolean {\n  return e instanceof Error && /Codex CLI .* is too old/i.test(e.message);\n}","tryCatchPattern":"try {\n  assertCodexMarketplaceSupported();\n} catch (e) {\n  if (e instanceof Error && /too old/i.test(e.message)) {\n    console.error('Update Codex CLI to 0.128.0+ then re-run: npx claude-mem@latest install');\n    process.exit(1);\n  }\n  throw e;\n}","preventionTips":["Check `codex --version` before running the install.","Pin/upgrade codex alongside claude-mem in CI to keep them compatible.","Resolve PATH ambiguity when multiple codex binaries exist."],"tags":["codex","version","installer","cli","upgrade"],"backgroundTag":null,"analyzedSha":"d768ba364302d12b76e69e4f021f0bb1d2d50ed6","analyzedAt":"2026-08-12T23:52:55.241Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}