thedotmack/claude-mem · warning
Could not parse Codex CLI version from
Error message
Could not parse Codex CLI version from "${output || '<empty>'}". Continuing; plugin marketplace support requires ${MIN_CODEX_MARKETPLACE_VERSION} or newer. What it means
Like the non-zero-exit case, this fires when the Codex version command succeeded but its output did not contain a parseable semver (extractSemver returned nothing). claude-mem cannot verify marketplace support, so it warns (including the raw output, or '<empty>' if blank) and continues the install rather than aborting.
Solutions
- Run the version command manually and inspect the output; remove anything polluting it (shell banners, update checks)
- Reinstall the official Codex CLI so `codex --version` prints a standard semver
- If the version genuinely supports marketplaces, ignore the warning — install continues
- Compare the installed version to MIN_CODEX_MARKETPLACE_VERSION yourself to confirm compatibility
Example fix
// before: polluted version output $ codex --version Checking for updates... // after: clean semver output $ codex --version 0.42.0
Defensive patterns
Strategy: validation
Validate before calling
const out = execSync('codex --version').toString().trim();
if (!/\d+\.\d+\.\d+/.test(out)) console.warn('codex --version has no parseable semver:', out || '<empty>'); Type guard
function hasSemver(s: string): boolean {
return /\d+\.\d+\.\d+/.test(s);
} Try / catch
const out = (r.stdout + '\n' + r.stderr).trim();
const m = out.match(/\d+\.\d+\.\d+/);
if (!m) console.warn('Could not parse Codex version from', out || '<empty>'); Prevention
- Ensure `codex --version` prints a plain x.y.z semver
- Remove shell profile banners/update notices that pollute command output
- Reinstall the official Codex CLI if using a fork with odd version strings
- Compare your version against MIN_CODEX_MARKETPLACE_VERSION manually
When it happens
Trigger: assertCodexMarketplaceSupported captures stdout+stderr, result.status === 0, but extractSemver(output) finds no x.y.z pattern — e.g. output is empty, localized text, or a non-semver build string.
Common situations: Codex CLI forks/rebranded builds with non-standard version strings; output polluted by shell profile banners or update notices; a stubbed `codex` script printing nothing.
Related errors
- Could not determine Codex CLI version. Continuing; plugin…
- Codex marketplace is already registered from another…
- Native Codex hooks registered, but failed to disable legacy…
- Native Codex hooks registered, but failed to remove legacy…
- Claude Code is not installed. Claude-mem works best in…
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/bf8a0c81ab9b376e.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/integrations/CodexCliInstaller.ts:370
function extractSemver(value: string): string | null {
return value.match(/\d+\.\d+\.\d+/)?.[0] ?? null;
}
function assertCodexMarketplaceSupported(): void {
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) {View on GitHub (pinned to d8bc9755e7)