thedotmack/claude-mem · error
Codex CLI is too old for plugin marketplace support. Update…
Error message
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 What it means
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.
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.
Example fix
// before codex --version # 0.20.0 (too old) npx claude-mem@latest install // Error: Codex CLI 0.20.0 is too old for plugin marketplace support... // after npm i -g @openai/codex@latest codex --version # >= MIN_CODEX_MARKETPLACE_VERSION npx claude-mem@latest install
Defensive patterns
Strategy: validation
Validate before calling
import { execFileSync } from 'child_process';
const out = execFileSync('codex', ['--version'], { encoding: 'utf8' });
const version = out.match(/\d+\.\d+\.\d+/)?.[0];
const MIN = 'MIN_CODEX_MARKETPLACE_VERSION'; // substitute actual constant
if (version && version.localeCompare(MIN, undefined, { numeric: true }) < 0) {
throw new Error(`Update Codex CLI to ${MIN}+ before installing`);
} Prevention
- 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.
When it happens
Trigger: performCodexInstall() -> assertCodexMarketplaceSupported() runs `codex --version` (or equivalent), parses a version like '0.x.y', and localeCompare(numeric) finds it < MIN_CODEX_MARKETPLACE_VERSION.
Common situations: 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.
Related errors
- codex failed with exit code ` : ''}
- Could not determine Codex CLI version. Continuing; plugin…
- Could not determine Codex CLI version. Continuing; plugin…
- API key prompt cancelled — leaving existing configuration…
- CLAUDE_CODE_PATH is set to
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/aaf664cf5f2f6fee.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/integrations/CodexCliInstaller.ts:375
const result = codexSpawn(['--version']);
const output = `${result.stdout ?? ''}\n${result.stderr ?? ''}`.trim();
if (result.error) {
throw result.error;
}
if (result.status !== 0) {
console.warn(` Could not determine Codex CLI version. Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer.${output ? `\n${output}` : ''}`);
return;
}
const version = extractSemver(output);
if (!version) {
console.warn(` Could not parse Codex CLI version from "${output || '<empty>'}". Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer.`);
return;
}
if (version.localeCompare(MIN_CODEX_MARKETPLACE_VERSION, undefined, { numeric: true }) < 0) {
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`);
}
}
function removeCodexAgentsMdContext(): boolean {
if (!existsSync(CODEX_AGENTS_MD_PATH)) return true;
const startTag = '<claude-mem-context>';
const endTag = '</claude-mem-context>';
try {
readAndStripContextTags(startTag, endTag);
return true;
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
logger.warn('WORKER', 'Failed to clean AGENTS.md context', { error: message });
return false;
}
}View on GitHub (pinned to d8bc9755e7)